Added bench.py and bench_runner.c for benchmarking

These are really just different flavors of test.py and test_runner.c
without support for power-loss testing, but with support for measuring
the cumulative number of bytes read, programmed, and erased.

Note that the existing define parameterization should work perfectly
fine for running benchmarks across various dimensions:

./scripts/bench.py \
    runners/bench_runner \
    bench_file_read \
    -gnor \
    -DSIZE='range(0,131072,1024)'

Also added a couple basic benchmarks as a starting point.
This commit is contained in:
Christopher Haster
2022-09-20 02:01:59 -05:00
parent 20ec0be875
commit 4fe0738ff4
20 changed files with 4253 additions and 405 deletions

View File

@@ -28,7 +28,8 @@ MERGES = {
'add': (
['code_size', 'data_size', 'stack_frame', 'struct_size',
'coverage_lines', 'coverage_branches',
'test_passed'],
'test_passed',
'bench_read', 'bench_prog', 'bench_erased'],
lambda xs: sum(xs[1:], start=xs[0])
),
'mul': (