summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Peres <martin.peres@linux.intel.com>2016-01-25 17:11:57 +0200
committerMartin Peres <martin.peres@linux.intel.com>2016-01-25 17:11:57 +0200
commita15ae9ce39b67efeeb2d669885eb799a6e21f36f (patch)
tree12d593b065fa2ff7850664672ba727bb8a757c92
parentba34558f35619c9a2a9f38ef85889e9633c252db (diff)
ezbench.py: reduce the usage of regular expressions when listing files
On insane reports, this allows to save more than 17% of the execution time of genPerformanceReport.
-rw-r--r--utils/ezbench.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/ezbench.py b/utils/ezbench.py
index a3a62b3..1fe2257 100644
--- a/utils/ezbench.py
+++ b/utils/ezbench.py
@@ -1062,7 +1062,8 @@ def genPerformanceReport(log_folder, silentMode = False):
commit = Commit(sha1, full_name, compile_log, patch, label)
# find all the benchmarks
- benchFiles = glob.glob("{sha1}_bench_*".format(sha1=commit.sha1));
+ pattern = "{sha1}_bench".format(sha1=commit.sha1)
+ benchFiles = [f for f in os.listdir(".") if f.startswith(pattern)]
benchs_txt = ""
for benchFile in benchFiles:
# Skip when the file is a run file (finishes by #XX)