Bug 83294

Summary: perf-o-matic should include unit in runs JSON responses
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: New BugsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, haraken, morrita
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 82852    
Bug Blocks: 77037    
Attachments:
Description Flags
Patch tony: review+

Ryosuke Niwa
Reported 2012-04-05 10:38:54 PDT
perf-o-matic should include unit in runs JSON responses
Attachments
Patch (6.20 KB, patch)
2012-04-05 10:44 PDT, Ryosuke Niwa
tony: review+
Ryosuke Niwa
Comment 1 2012-04-05 10:44:21 PDT
Ryosuke Niwa
Comment 2 2012-04-05 10:45:29 PDT
Once we land this & push it to the production, we can show units on perf-o-matic :)
Ryosuke Niwa
Comment 3 2012-04-05 10:47:00 PDT
Tony Chang
Comment 4 2012-04-05 10:48:04 PDT
Comment on attachment 135856 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135856&action=review > Websites/webkit-perf.appspot.com/models.py:452 > + return '{"test_runs": [%s], "averages": {%s}, "min": %s, "max": %s, "unit": %s, "date_range": null, "stat": "ok"}' % (self.json_runs, > + self.json_averages, str(self.json_min) if self.json_min else 'null', str(self.json_max) if self.json_max else 'null', Nit: You might want to start naming the strings. E.g., %(test_runs)s .. %(averages)s .. etc. That might make it a bit easier to match up the string substitutions.
Ryosuke Niwa
Comment 5 2012-04-05 10:55:08 PDT
Comment on attachment 135856 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135856&action=review >> Websites/webkit-perf.appspot.com/models.py:452 >> + self.json_averages, str(self.json_min) if self.json_min else 'null', str(self.json_max) if self.json_max else 'null', > > Nit: You might want to start naming the strings. E.g., %(test_runs)s .. %(averages)s .. etc. That might make it a bit easier to match up the string substitutions. Yeah I guess. But then I'll have to repeat that in the string and in the dictionary and will make the code much more verbose. I could make '"min": %s, "max": %s, "unit": %s, "date_range": null, "stat": "ok"' a dictionary and just call json.dumps instead. (Can't call dumps on test_runs and json_averages since they aren't real json. On the other hand, that ends up requiring some string manipulating of { and }. Not sure if that's desirable :\
Ryosuke Niwa
Comment 6 2012-04-05 12:32:31 PDT
Note You need to log in before you can comment on or make changes to this bug.