Title: [124184] trunk
Revision
124184
Author
rn...@webkit.org
Date
2012-07-31 02:00:33 -0700 (Tue, 31 Jul 2012)

Log Message

Perf-o-matic: dashboard images are not generated properly from incrementally updated JSON
https://bugs.webkit.org/show_bug.cgi?id=92717

Reviewed by Hajime Morita.

Sort the values by timestamp. Unfortunately, there isn't a good way of testing this fix.

* Websites/webkit-perf.appspot.com/models.py:
(Runs.chart_params):

Modified Paths

Diff

Modified: trunk/ChangeLog (124183 => 124184)


--- trunk/ChangeLog	2012-07-31 08:53:05 UTC (rev 124183)
+++ trunk/ChangeLog	2012-07-31 09:00:33 UTC (rev 124184)
@@ -1,3 +1,15 @@
+2012-07-31  Ryosuke Niwa  <rn...@webkit.org>
+
+        Perf-o-matic: dashboard images are not generated properly from incrementally updated JSON
+        https://bugs.webkit.org/show_bug.cgi?id=92717
+
+        Reviewed by Hajime Morita.
+
+        Sort the values by timestamp. Unfortunately, there isn't a good way of testing this fix.
+
+        * Websites/webkit-perf.appspot.com/models.py:
+        (Runs.chart_params):
+
 2012-07-31  Danilo Cesar Lemes de Paula  <danilo.ce...@collabora.co.uk>
 
         add Farstream flags/deps to WebKit, for WebRTC

Modified: trunk/Websites/webkit-perf.appspot.com/models.py (124183 => 124184)


--- trunk/Websites/webkit-perf.appspot.com/models.py	2012-07-31 08:53:05 UTC (rev 124183)
+++ trunk/Websites/webkit-perf.appspot.com/models.py	2012-07-31 09:00:33 UTC (rev 124184)
@@ -455,11 +455,12 @@
     def chart_params(self, display_days):
         chart_data_x = []
         chart_data_y = []
-        runs = json.loads('[' + self.json_runs + ']')
+        timestamp_from_entry = lambda entry: Runs._timestamp_and_value_from_json_entry(entry)[0]
+        runs = sorted(json.loads('[' + self.json_runs + ']'), lambda a, b: int(timestamp_from_entry(a) - timestamp_from_entry(b)))
         if not runs:
             return None
 
-        end_timestamp = Runs._timestamp_and_value_from_json_entry(runs[-1])[0]
+        end_timestamp = timestamp_from_entry(runs[-1])
         start_timestamp = end_timestamp - display_days * 24 * 3600
         for entry in runs:
             timestamp, value = Runs._timestamp_and_value_from_json_entry(entry)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to