tuck avatar tuck committed 013f669

categorization of performance

Comments (0)

Files changed (1)

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>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.