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

Unified Diff: build/android/pylib/local/device/local_device_perf_test_run.py

Issue 2805533003: [build/android] Load/dump pickles directly form/to files (Closed)
Patch Set: Created 3 years, 8 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
Index: build/android/pylib/local/device/local_device_perf_test_run.py
diff --git a/build/android/pylib/local/device/local_device_perf_test_run.py b/build/android/pylib/local/device/local_device_perf_test_run.py
index 19e20030e93ebfb40ecb91cb40fc5474134728e0..7e4538d374cc0bbd7fdbddc69f00cc8aab0784cd 100644
--- a/build/android/pylib/local/device/local_device_perf_test_run.py
+++ b/build/android/pylib/local/device/local_device_perf_test_run.py
@@ -206,10 +206,10 @@ class TestShard(object):
pickled = os.path.join(constants.PERF_OUTPUT_DIR, result['name'])
if os.path.exists(pickled):
with file(pickled, 'r') as f:
- previous = pickle.loads(f.read())
+ previous = pickle.load(f)
result['output'] = previous['output'] + result['output']
with file(pickled, 'w') as f:
- f.write(pickle.dumps(result))
+ pickle.dump(result, f)
def _TestTearDown(self):
if self._output_dir:
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance.py ('k') | build/android/pylib/perf/perf_test_instance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698