make: Leaned into simtime in Makefile

The value of simtime isn't actually the simtime value, but the
simulated throughput, which is easy enough for our csv.py script to
calculate (with a daintily placed max to avoid divide-by-zero).

Throughput has the benefit of being somewhat size-agnostic, making
cross-benchmark comparisons easier.

I guess it's technically possible to do something similar with
readed/progged/erased numbers, but conceptually that would be really
confusing...

---

Also renamed test/bench_time -> test/bench_runtime to hopefully prevent
confusion between the two time spaces.
This commit is contained in:
Christopher Haster
2026-01-21 14:40:56 -06:00
parent d3dd927de3
commit cfafd07414
2 changed files with 12 additions and 15 deletions
+10 -13
View File
@@ -145,7 +145,7 @@ endif
ifdef TESTMARKS
TESTFLAGS += -o$(TEST_CSV)
endif
ifdef BENCHMARKS
ifndef NO_BENCHMARKS
BENCHFLAGS += -o$(BENCH_CSV)
endif
ifdef VERBOSE
@@ -499,12 +499,12 @@ test-list list-tests: test-runner
## Summarize the test results
.PHONY: testmarks
testmarks: SUMMARYFLAGS+=-spassed -Stime
testmarks: SUMMARYFLAGS+=-spassed -Sruntime
testmarks: $(TEST_CSV)
$(strip ./scripts/csv.py $^ \
-bsuite \
-fpassed=test_passed \
-ftime=test_time \
-fruntime=test_runtime \
$(SUMMARYFLAGS))
## Save the test results
@@ -517,7 +517,7 @@ testmarks-diff: $(TEST_CSV)
$(strip ./scripts/csv.py $^ \
-bsuite \
-fpassed=test_passed \
-ftime=test_time \
-fruntime=test_runtime \
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.test.csv)
## Build the bench-runner
@@ -548,13 +548,11 @@ bench-list list-benches: bench-runner
## Summarize the bench results
.PHONY: benchmarks
benchmarks: SUMMARYFLAGS+=-Serased -Sproged -Sreaded
benchmarks: $(BENCH_CSV)
$(strip ./scripts/csv.py $^ \
-bsuite \
-freaded=bench_readed \
-fproged=bench_proged \
-ferased=bench_erased \
-bcase='%(case)s+%(m)s' \
-fsimtime='float(bench_simtime)/1.0e9' \
-fsimthroughput='float(n)/max(float(bench_simtime)/1.0e9,1.0e-9)' \
$(SUMMARYFLAGS))
## Save the bench results
@@ -565,10 +563,9 @@ benchmarks-csv: $(BUILDDIR)/lfs3.bench.csv
.PHONY: benchmarks-diff
benchmarks-diff: $(BENCH_CSV)
$(strip ./scripts/csv.py $^ \
-bsuite \
-freaded=bench_readed \
-fproged=bench_proged \
-ferased=bench_erased \
-bcase='%(case)s+%(m)s' \
-fsimtime='float(bench_simtime)/1.0e9' \
-fsimthroughput='float(n)/max(float(bench_simtime)/1.0e9,1.0e-9)' \
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.bench.csv)
+2 -2
View File
@@ -1186,7 +1186,7 @@ def run_stage(name, runner, test_ids, stdout_, trace_, output_, **args):
'case': case,
**defines,
'test_passed': '1/1',
'test_time': '%.6f' % (
'test_runtime': '%.6f' % (
time.time() - last_time)})
elif op == 'skipped':
locals.seen_perms += 1
@@ -1384,7 +1384,7 @@ def run(runner, test_ids=[], **args):
output = TestOutput(args['output'],
['suite', 'case'],
# defines go here
['test_passed', 'test_time'])
['test_passed', 'test_runtime'])
# measure runtime
start = time.time()