Commits

tuck committed 013f669

categorization of performance

  • Participants
  • Parent commits 3de4f74

Comments (0)

Files changed (1)

File pyramid_perfstat/templates/reporting.mako

+<%def name="get_label_perf(avg_time)">
+	% if avg_time > 1 :
+		<font class="bad_perf">BAD</font>
+	% elif avg_time > 0.6 :
+		<font class="bpoor_perf">POOR</font>
+	% elif avg_time > 0.3 :
+		<font class="small_perf">SMALL</font>
+	% else :	
+		<font class="good_perf">GOOD</font>
+	% endif
+</%def>
+
 <%def name="get_color_perf(avg_time)">
 	% if avg_time > 1 :
 		<font class="bad_perf">${"%1.3f"%avg_time} s</font>
 	<tr>
 		<td>${id}</td>
 		<td>${get_color_perf(avg_time)}</td>
+		<td>${get_label_perf(avg_time)}</td>
 		<td>${url}</td>
 	</tr>
 </%def>
 	<tr>
 		<td>${id}</td>
 		<td>${get_color_perf(avg_time)}</td>
+		<td>${get_label_perf(avg_time)}</td>
 		<td>${url}</td>
 		<td>
                   <a href="${request.route_url("pyramid_perfstat.reporting.url_detail", id_session=id_session, id_view=id_view, id_route=id)}">${route_name}</a>
 	<tr>
 		<td>${id}</td>
 		<td>${get_color_perf(avg_time)}</td>
+		<td>${get_label_perf(avg_time)}</td>
 		<td><a href="${request.route_url("pyramid_perfstat.reporting.view_detail",id_session=id_session, id_view=id)}">${view_name}</a></td>
 		<td>${cpt}</td>
 	</tr>
 				<tr>
 					<th>id</th>
 					<th>mean time</th>
+					<th>category</th>
 					<th>matched view name</th>
 					<th>view count</th>
 				</tr>
 				<tr>
 					<th>id</th>
 					<th>mean time</th>
+					<th>category</th>
 					<th>requested url</th>
 					<th>matched route name</th>
 					<th>matched view name</th>
 				<tr>
 					<th>id</th>
 					<th>mean time</th>
+					<th>category</th>
 					<th>requested url</th>
 				</tr>
 			</thead>