Delete the HUGE output file from the perf profiler after the results summaries have been computed off of it.
It is difficult to support storing the raw data from this on any autotest server. If someone _needs_ this they can implement a way to conditionally enable saving it along with a way to pass in a less frequent sampling rate. Signed-off-by: Gregory Smith <[email protected]> --- autotest/client/profilers/perf/perf.py 2010-06-22 13:09:13.000000000 -0700 +++ autotest/client/profilers/perf/perf.py 2010-09-13 17:43:03.000000000 -0700 @@ -5,7 +5,8 @@ @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 class perf(profiler.profiler): @@ -40,3 +41,8 @@ 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) _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
