Modified: trunk/ChangeLog (106435 => 106436)
--- trunk/ChangeLog 2012-02-01 07:36:21 UTC (rev 106435)
+++ trunk/ChangeLog 2012-02-01 07:47:08 UTC (rev 106436)
@@ -1,3 +1,16 @@
+2012-01-31 Ryosuke Niwa <[email protected]>
+
+ webkit-perf.appspot.com should accept test results without medians
+ https://bugs.webkit.org/show_bug.cgi?id=77513
+
+ Reviewed by Hajime Morita.
+
+ Don't store 0s when values are not in JSON.
+
+ * Websites/webkit-perf.appspot.com/report_handler.py:
+ (ReportHandler.post._float_or_none):
+ (ReportHandler.post):
+
2012-01-31 Kenneth Rohde Christiansen <[email protected]>
Tap highlighting: Support better outlines for multiline inlines
Modified: trunk/Websites/webkit-perf.appspot.com/report_handler.py (106435 => 106436)
--- trunk/Websites/webkit-perf.appspot.com/report_handler.py 2012-02-01 07:36:21 UTC (rev 106435)
+++ trunk/Websites/webkit-perf.appspot.com/report_handler.py 2012-02-01 07:47:08 UTC (rev 106436)
@@ -86,12 +86,18 @@
if not build:
return
+ def _float_or_none(dictionary, key):
+ value = dictionary.get(key)
+ if value:
+ return float(value)
+ return None
+
for test_name, result in self._body['results'].iteritems():
test = self._add_test_if_needed(test_name, branch, platform)
memcache.delete(Test.cache_key(test.id, branch.id, platform.id))
if isinstance(result, dict):
- TestResult(name=test_name, build=build, value=float(result.get('avg', 0)), valueMedian=float(result.get('median', 0)),
- valueStdev=float(result.get('stdev', 0)), valueMin=float(result.get('min', 0)), valueMax=float(result.get('max', 0))).put()
+ TestResult(name=test_name, build=build, value=float(result['avg']), valueMedian=_float_or_none(result, 'median'),
+ valueStdev=_float_or_none(result, 'stdev'), valueMin=_float_or_none(result, 'min'), valueMax=_float_or_none(result, 'max')).put()
else:
TestResult(name=test_name, build=build, value=float(result)).put()