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

Unified Diff: client/profilers/perf/perf.py

Issue 3554003: Merge remote branch 'cros/upstream' into tempbranch3 (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 3 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 | « client/profilers/oprofile/oprofile.py ('k') | client/profilers/powertop/powertop.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/profilers/perf/perf.py
diff --git a/client/profilers/perf/perf.py b/client/profilers/perf/perf.py
index ff0a32eb2516f4fbc887ae95603f7a77ea12e22e..211d562bdaea058341afad4fcbda3b65ec0e3664 100644
--- a/client/profilers/perf/perf.py
+++ b/client/profilers/perf/perf.py
@@ -5,7 +5,8 @@ supports functionality similar to oprofile and more.
@see: http://lwn.net/Articles/310260/
"""
-import time, os, subprocess, signal
+import time, os, stat, subprocess, signal
+import logging
from autotest_lib.client.bin import profiler, os_dep, utils
@@ -51,3 +52,8 @@ class perf(profiler.profiler):
p = subprocess.Popen(cmd, shell=True, stdout=outfile,
stderr=subprocess.STDOUT)
p.wait()
+ # The raw detailed perf output is HUGE. We cannot store it by default.
+ perf_log_size = os.stat(self.logfile)[stat.ST_SIZE]
+ logging.info('Removing %s after generating reports (saving %s bytes).',
+ self.logfile, perf_log_size)
+ os.unlink(self.logfile)
« no previous file with comments | « client/profilers/oprofile/oprofile.py ('k') | client/profilers/powertop/powertop.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698