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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124184
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-07-31 Ryosuke Niwa <rniwa@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.cesar@collabora.co.uk>
add Farstream flags/deps to WebKit, for WebRTC
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)