Skip to content

Commit 44bf3c2

Browse files
committed
compare-valueflow-options.py: min time for reports, too short times are too flaky
1 parent 8ec8f6f commit 44bf3c2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: lib/settings.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ class CPPCHECKLIB WARN_UNUSED Settings {
511511
return jobs == 1;
512512
}
513513

514-
enum class CheckLevel: std::uint8_t {
514+
enum class CheckLevel : std::uint8_t {
515515
reduced,
516516
normal,
517517
exhaustive

Diff for: tools/compare-valueflow-options.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
import random
1515

1616

17+
# Do not report execution times below this limit, short execution time measurements are flaky
18+
TIME_LIMIT = 2
19+
20+
1721
def format_float(a, b=1):
1822
if a > 0 and b > 0:
1923
return '{:.2f}'.format(a / b)
@@ -174,7 +178,7 @@ def count_errors(errout:str, c:set):
174178
current_count = results.get(error_id, 0)
175179
if count > current_count:
176180
myfile.write(f'{id}: FN {error_id}: {current_count} of {count}\n')
177-
if time > 10 or time0 > 10:
181+
if time > TIME_LIMIT or time0 > TIME_LIMIT:
178182
myfile.write(f'{id}: Time: %.1f\n' % time)
179183
time_factor = time / time0
180184
myfile.write(f'{id}: Timefactor: %.3f\n' % time_factor)

0 commit comments

Comments
 (0)