Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: tools/isolate/trace_test_cases.py

Issue 10411003: Make the .test_cases file more compact when large (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/trace_test_cases.py
diff --git a/tools/isolate/trace_test_cases.py b/tools/isolate/trace_test_cases.py
index e1bdc830947a08d5ce9a92253b4a484fff104e41..ab9e99ca067d15558d9871ae40ebb4cedc240d90 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()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698