Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1051)

Issue 6946052: Fix bench_pictures.cfg and add sanity check (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by EricB
Modified:
11 years, 6 months ago
Reviewers:
epoger, rmistry
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fix bench_pictures.cfg and add sanity check Committed: https://code.google.com/p/skia/source/detail?r=6822

Patch Set 1 #

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -8 lines) Patch
M tools/bench_pictures.cfg View 1 chunk +6 lines, -6 lines 1 comment Download
M tools/bench_pictures_cfg_helper.py View 1 chunk +39 lines, -2 lines 0 comments Download
A tools/tests/bench_pictures_cfg_test.py View 1 1 chunk +36 lines, -0 lines 1 comment Download

Messages

Total messages: 2
EricB
TBR'ing this to get it submitted before leaving for offsite. Should fix bench bots and, ...
11 years, 6 months ago (2012-12-14 14:56:49 UTC) #1
epoger
11 years, 6 months ago (2012-12-14 17:59:23 UTC) #2
Message was sent while issue was closed.
LGTM with some cleanup suggestions

https://codereview.appspot.com/6946052/diff/2001/tools/bench_pictures.cfg
File tools/bench_pictures.cfg (right):

https://codereview.appspot.com/6946052/diff/2001/tools/bench_pictures.cfg#new...
tools/bench_pictures.cfg:58: RecordRTreeConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y),
This would be easier to read if the lines lined up like so:

RecordRTreeConfig(           DEFAULT_TILE_X, DEFAULT_TILE_Y),
PlaybackCreationRTreeConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y),
...etc

https://codereview.appspot.com/6946052/diff/2001/tools/tests/bench_pictures_c...
File tools/tests/bench_pictures_cfg_test.py (right):

https://codereview.appspot.com/6946052/diff/2001/tools/tests/bench_pictures_c...
tools/tests/bench_pictures_cfg_test.py:22: raise TypeError('%s is not a string!'
% str(config_name))
I think this would be cleaner:

ThrowIfNotAString(config_name)
ThrowIfNotAString(key)
...etc

def ThrowIfNotAString(obj):
  if str(obj) != obj:
    raise TypeError('%s is not a string!\n%s' % (str(obj), obj))
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b