Perf-o-matic build fix.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 04:19:05 +0000 (04:19 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Mar 2012 04:19:05 +0000 (04:19 +0000)
* Websites/webkit-perf.appspot.com/controller.py:
(RunsChartHandler.post):
* Websites/webkit-perf.appspot.com/models.py:
(Runs.chart_params):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112362 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Websites/webkit-perf.appspot.com/controller.py
Websites/webkit-perf.appspot.com/models.py

index 8434a53..bf1cfdb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-03-27  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Perf-o-matic build fix.
+
+        * Websites/webkit-perf.appspot.com/controller.py:
+        (RunsChartHandler.post):
+        * Websites/webkit-perf.appspot.com/models.py:
+        (Runs.chart_params):
+
 2012-03-27  Dave Tu  <dtu@chromium.org>
 
         Show image diffs for gpu_tests on flakiness dashboard
index 9623d93..ce93e69 100644 (file)
@@ -147,6 +147,8 @@ class RunsChartHandler(webapp2.RequestHandler):
         assert test
 
         params = Runs.update_or_insert(branch, platform, test).chart_params(display_days)
+        if not params:
+            return
         dashboard_chart_file = urllib.urlopen('http://chart.googleapis.com/chart', urllib.urlencode(params))
 
         DashboardImage.create(branch.id, platform.id, test.id, display_days, dashboard_chart_file.read())
index b25f12e..df5e19f 100644 (file)
@@ -435,6 +435,9 @@ class Runs(db.Model):
             chart_data_x.append(timestamp)
             chart_data_y.append(value)
 
+        if not chart_data_y:
+            return None
+
         dates = [end_time - timedelta(display_days / 7.0 * (7 - i)) for i in range(0, 8)]
 
         y_max = max(chart_data_y) * 1.1