diff options
| author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-03-04 11:10:17 +0300 |
|---|---|---|
| committer | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-05-04 11:37:26 +0300 |
| commit | 8c8407fe4525151e3c396adc667e1d4b0aab2c99 (patch) | |
| tree | 6166ebcc9da95069934ebf08bca57f109ca8f1c9 /scripts/simplebench/bench-backup.py | |
| parent | 8fa4ee1b00e97bfac21550f1ac5b506a94ce7ba4 (diff) | |
| download | focaccia-qemu-8c8407fe4525151e3c396adc667e1d4b0aab2c99.tar.gz focaccia-qemu-8c8407fe4525151e3c396adc667e1d4b0aab2c99.zip | |
simplebench/bench-backup: add --drop-caches argument
Add an option to drop caches before each test run. It may probably improve reliability of results when testing in cached mode. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Diffstat (limited to 'scripts/simplebench/bench-backup.py')
| -rwxr-xr-x | scripts/simplebench/bench-backup.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/simplebench/bench-backup.py b/scripts/simplebench/bench-backup.py index 092fed5816..5a0675c593 100755 --- a/scripts/simplebench/bench-backup.py +++ b/scripts/simplebench/bench-backup.py @@ -156,7 +156,8 @@ def bench(args): }) result = simplebench.bench(bench_func, test_envs, test_cases, - count=args.count, initial_run=args.initial_run) + count=args.count, initial_run=args.initial_run, + drop_caches=args.drop_caches) with open('results.json', 'w') as f: json.dump(result, f, indent=4) print(results_to_text(result)) @@ -221,4 +222,7 @@ Number of test runs per table cell''') Do additional initial run per cell which doesn't count in result, default true''') + p.add_argument('--drop-caches', action='store_true', help='''\ +Do "sync; echo 3 > /proc/sys/vm/drop_caches" before each test run''') + bench(p.parse_args()) |