diff options
author | Ahmad Sharif <asharif@chromium.org> | 2012-05-14 17:11:56 -0700 |
---|---|---|
committer | Ahmad Sharif <asharif@chromium.org> | 2012-05-14 17:11:56 -0700 |
commit | ee988c87971c07b7e6767adb63d151ea37e363f2 (patch) | |
tree | f6c6efb2049abb4a4e7c09e7a4f527dfe96e13a5 /crosperf/results_cache.py | |
parent | fd356fb31c4340851fecc750230d05c9518b125c (diff) | |
download | toolchain-utils-ee988c87971c07b7e6767adb63d151ea37e363f2.tar.gz |
Synced repos to: 60457
Diffstat (limited to 'crosperf/results_cache.py')
-rw-r--r-- | crosperf/results_cache.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/crosperf/results_cache.py b/crosperf/results_cache.py index 0b921b03..93a7a414 100644 --- a/crosperf/results_cache.py +++ b/crosperf/results_cache.py @@ -13,6 +13,7 @@ from image_checksummer import ImageChecksummer from perf_processor import PerfProcessor from utils import command_executer from utils import logger +from utils import misc SCRATCH_DIR = "/home/%s/cros_scratch" % getpass.getuser() @@ -83,7 +84,7 @@ class ResultsCache(object): def _FormCacheDir(self, list_of_strings): cache_key = " ".join(list_of_strings) - cache_dir = self._ConvertToFilename(cache_key) + cache_dir = misc.GetFilenameFromString(cache_key) cache_path = os.path.join(SCRATCH_DIR, cache_dir) return cache_path @@ -182,14 +183,6 @@ class ResultsCache(object): return PerfProcessor.PerfResults(report, output) - def _ConvertToFilename(self, text): - ret = text - ret = re.sub("/", "__", ret) - ret = re.sub(" ", "_", ret) - ret = re.sub("=", "", ret) - ret = re.sub("\"", "", ret) - return ret - class MockResultsCache(object): def Init(self, *args): |