From 7c3b95e8b573a86954a7af69cd271d0ca7b02bee Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 26 Nov 2023 20:59:22 +0100 Subject: [PATCH] vrts: fix performance testing --- cli/tools/vrts.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/tools/vrts.py b/cli/tools/vrts.py index b280eebc..adcc4d91 100644 --- a/cli/tools/vrts.py +++ b/cli/tools/vrts.py @@ -409,7 +409,7 @@ class VrtsFiles: # same file N times if self._args.performance and self._args.performance_repeat: - for i in range(self._args.performance_repeat): + for _ in range(self._args.performance_repeat): self.filenames.append(file) @@ -541,7 +541,7 @@ class VrtsApp: flag_looping = '-i' # pases all files at once, as it's faster than 1 by 1 (that has to init program every time) - if self._performance_new: + if self._args.performance_new: self._p.info("testing new performance") ts_st = time.time() @@ -551,7 +551,7 @@ class VrtsApp: ts_ed = time.time() self._p.info("done: elapsed %ss" % (ts_ed - ts_st)) - if self._performance_old: + if self._args.performance_old: self._p.info("testing old performance") ts_st = time.time() @@ -559,10 +559,10 @@ class VrtsApp: res = self._prc.call(args) ts_ed = time.time() - self._p.info("done: elapsed %ss (%s)" % (ts_ed - ts_st)) + self._p.info("done: elapsed %ss" % (ts_ed - ts_st)) #if self._performance_both: - # ... + # handled above # returns max fuzzy count, except for non-fuzzable files (that use int math)