mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
8fa4ee1b00
commit
8c8407fe45
2 changed files with 15 additions and 2 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue