diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 15:29:29 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 15:29:29 +0000 |
commit | 51cbf44db361602d1583c6d1326747f37074b2df (patch) | |
tree | 4f9465fa1981996c1fc79afbb34bdf52b61a88e6 /tools | |
parent | 0e92e36ab29d02eb7822bf9893dd4012724a554b (diff) | |
download | chromium_src-51cbf44db361602d1583c6d1326747f37074b2df.zip chromium_src-51cbf44db361602d1583c6d1326747f37074b2df.tar.gz chromium_src-51cbf44db361602d1583c6d1326747f37074b2df.tar.bz2 |
Make the .test_cases file more compact when large
This significantly reduce the file size.
NOTRY=true
R=mad@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10411003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137867 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/isolate/trace_test_cases.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/isolate/trace_test_cases.py b/tools/isolate/trace_test_cases.py index e1bdc83..ab9e99c 100755 --- a/tools/isolate/trace_test_cases.py +++ b/tools/isolate/trace_test_cases.py @@ -148,7 +148,12 @@ def trace_test_cases( raise finally: with open('%s.test_cases' % executable, 'w') as f: - json.dump(out, f, indent=2, sort_keys=True) + if len(out) > 20: + # Pack it dense since the file is going to be pretty large. + json.dump(out, f, separators=(',',':')) + else: + # Keep it human readable. + json.dump(out, f, indent=2, sort_keys=True) pool.close() pool.join() |