Revision: 340
Author: bslatkin
Date: Sun Feb 28 23:22:07 2010
Log: hub: template tweaks for stats presentation
http://code.google.com/p/pubsubhubbub/source/detail?r=340

Modified:
 /trunk/hub/main.py
 /trunk/hub/stats_table.html

=======================================
--- /trunk/hub/main.py  Sun Feb 28 23:08:12 2010
+++ /trunk/hub/main.py  Sun Feb 28 23:22:07 2010
@@ -343,7 +343,7 @@
     success: True if the fetch was successful, False otherwise.
     latency: End-to-end fetch latency in milliseconds.
   """
-  value = int(not success)
+  value = 100 * int(not success)
   reporter.set(url, FETCH_URL_SAMPLE_MINUTE, value)
   reporter.set(url, FETCH_URL_SAMPLE_30_MINUTE, value)
   reporter.set(url, FETCH_URL_SAMPLE_HOUR, value)
@@ -506,7 +506,7 @@
     success: True if the delivery was successful, False otherwise.
     latency: End-to-end fetch latency in milliseconds.
   """
-  value = int(not success)
+  value = 100 * int(not success)
   reporter.set(url, DELIVERY_URL_SAMPLE_MINUTE, value)
   reporter.set(url, DELIVERY_URL_SAMPLE_30_MINUTE, value)
   reporter.set(url, DELIVERY_URL_SAMPLE_HOUR, value)
=======================================
--- /trunk/hub/stats_table.html Fri Feb 26 11:54:31 2010
+++ /trunk/hub/stats_table.html Sun Feb 28 23:22:07 2010
@@ -8,7 +8,7 @@
   <span>Overall rate: {{result.overall_rate|floatformat:"-4"}}</span>
   {% endif %}
 </div>
-{% if result.total_samples %}
+{% if result.unique_samples %}
 <table>
   <tr align="center">
     <th align="left">{{result.key_name}}</th>
@@ -18,7 +18,7 @@
     <th>Max</th>
     <th>Average</th>
   </tr>
- {% for sample in result.sample_objects|dictsortreversed:"frequency"| slice:":20" %} + {% for sample in result.sample_objects|dictsortreversed:"frequency"| slice:":40" %}
   <tr align="right">
     <td align="left">{{sample.key|escape}}</td>
     <td>{{sample.count}}</td>

Reply via email to