Bug 79838

Summary: perf-o-matic: generate dashboard images using Google Chart Tools
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: WebKit WebsiteAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, kling, morrita, ojan, playmobil, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 77037    
Attachments:
Description Flags
First patch; generate images
none
Make the style bot happy none

Description Ryosuke Niwa 2012-02-28 15:00:53 PST
webkit-perf.appspot.com/ doesn't load anymore because it's got way too many iframes. We need to replace all these iframes by actual images.

Thankfully, Google chart tools generate png images that we can then cache:
http://code.google.com/apis/chart/image/docs/gallery/line_charts.html
Comment 1 Ryosuke Niwa 2012-02-28 15:10:55 PST
Created attachment 129338 [details]
First patch; generate images
Comment 2 Ryosuke Niwa 2012-02-28 15:12:18 PST
Comment on attachment 129338 [details]
First patch; generate images

View in context: https://bugs.webkit.org/attachment.cgi?id=129338&action=review

> Websites/webkit-perf.appspot.com/json_generators.py:217
> +            'cht': 'lxy',  # Specify with X and Y coordinates
> +            'chxt': 'x,y',  # Display both X and Y axies
> +            'chxl': '0:|' + '|'.join([date.strftime('%b %d') for date in dates]),  # X-axis labels
> +            'chxr': '1,0,%f,%f' % (int(y_max + 0.5), y_axis_label_step),  # Y-axis range: min=0, max, step
> +            'chds': '%f,%f,%f,%f' % (start_timestamp, end_timestamp, 0, y_max),  # X, Y data range
> +            'chxs': '1,676767,11.167,0,l,676767', # Y-axis label: 1,color,font-size,centerd on tick,axis line/no ticks, tick color
> +            'chs': '360x240', # Image size: 360px by 240px
> +            'chco': 'ff0000', # Plot line color
> +            'chg': '%f,%f,0,0' % (100 / (len(dates) - 1), y_grid_step), # X, Y grid line step sizes - max for X is 100.
> +            'chls': '3', # Line thickness
> +            'chf': 'bg,s,eff6fd', # Transparent background
> +            'chd': 't:' + ','.join([str(x) for x in chart_data_x]) + '|' + ','.join([str(y) for y in chart_data_y]), # X, Y data

I know it looks horrible :( but there isn't much I can do unfortunately...
Comment 3 WebKit Review Bot 2012-02-28 15:15:57 PST
Attachment 129338 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'ChangeLog', u'Websites/webkit-perf.appspot..." exit_code: 1
Websites/webkit-perf.appspot.com/json_generators.py:211:  at least two spaces before inline comment  [pep8/E261] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Ryosuke Niwa 2012-02-28 15:20:11 PST
Created attachment 129341 [details]
Make the style bot happy
Comment 5 Hajime Morrita 2012-02-28 16:31:23 PST
Comment on attachment 129341 [details]
Make the style bot happy

I don't think we need to save images on appengine. We can just redirect to the chart API image URL.
I'm pretty sure they have their own cache (or something for speed) and serve the image well.
Comment 6 Ryosuke Niwa 2012-02-28 16:42:53 PST
(In reply to comment #5)
> (From update of attachment 129341 [details])
> I don't think we need to save images on appengine. We can just redirect to the chart API image URL.
> I'm pretty sure they have their own cache (or something for speed) and serve the image well.

You think so? FYI, we'll be making something like 300 chart requests per page load.
Comment 7 Hajime Morrita 2012-02-28 21:59:12 PST
Comment on attachment 129341 [details]
Make the style bot happy

Looks good. Let's try.
Comment 8 Ryosuke Niwa 2012-02-28 22:07:04 PST
Comment on attachment 129341 [details]
Make the style bot happy

Clearing flags on attachment: 129341

Committed r109190: <http://trac.webkit.org/changeset/109190>
Comment 9 Ryosuke Niwa 2012-02-28 22:07:16 PST
All reviewed patches have been landed.  Closing bug.