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:
@@ -145,7 +145,7 @@ endif
|
|||||||
ifdef TESTMARKS
|
ifdef TESTMARKS
|
||||||
TESTFLAGS += -o$(TEST_CSV)
|
TESTFLAGS += -o$(TEST_CSV)
|
||||||
endif
|
endif
|
||||||
ifdef BENCHMARKS
|
ifndef NO_BENCHMARKS
|
||||||
BENCHFLAGS += -o$(BENCH_CSV)
|
BENCHFLAGS += -o$(BENCH_CSV)
|
||||||
endif
|
endif
|
||||||
ifdef VERBOSE
|
ifdef VERBOSE
|
||||||
@@ -499,12 +499,12 @@ test-list list-tests: test-runner
|
|||||||
|
|
||||||
## Summarize the test results
|
## Summarize the test results
|
||||||
.PHONY: testmarks
|
.PHONY: testmarks
|
||||||
testmarks: SUMMARYFLAGS+=-spassed -Stime
|
testmarks: SUMMARYFLAGS+=-spassed -Sruntime
|
||||||
testmarks: $(TEST_CSV)
|
testmarks: $(TEST_CSV)
|
||||||
$(strip ./scripts/csv.py $^ \
|
$(strip ./scripts/csv.py $^ \
|
||||||
-bsuite \
|
-bsuite \
|
||||||
-fpassed=test_passed \
|
-fpassed=test_passed \
|
||||||
-ftime=test_time \
|
-fruntime=test_runtime \
|
||||||
$(SUMMARYFLAGS))
|
$(SUMMARYFLAGS))
|
||||||
|
|
||||||
## Save the test results
|
## Save the test results
|
||||||
@@ -517,7 +517,7 @@ testmarks-diff: $(TEST_CSV)
|
|||||||
$(strip ./scripts/csv.py $^ \
|
$(strip ./scripts/csv.py $^ \
|
||||||
-bsuite \
|
-bsuite \
|
||||||
-fpassed=test_passed \
|
-fpassed=test_passed \
|
||||||
-ftime=test_time \
|
-fruntime=test_runtime \
|
||||||
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.test.csv)
|
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.test.csv)
|
||||||
|
|
||||||
## Build the bench-runner
|
## Build the bench-runner
|
||||||
@@ -548,13 +548,11 @@ bench-list list-benches: bench-runner
|
|||||||
|
|
||||||
## Summarize the bench results
|
## Summarize the bench results
|
||||||
.PHONY: benchmarks
|
.PHONY: benchmarks
|
||||||
benchmarks: SUMMARYFLAGS+=-Serased -Sproged -Sreaded
|
|
||||||
benchmarks: $(BENCH_CSV)
|
benchmarks: $(BENCH_CSV)
|
||||||
$(strip ./scripts/csv.py $^ \
|
$(strip ./scripts/csv.py $^ \
|
||||||
-bsuite \
|
-bcase='%(case)s+%(m)s' \
|
||||||
-freaded=bench_readed \
|
-fsimtime='float(bench_simtime)/1.0e9' \
|
||||||
-fproged=bench_proged \
|
-fsimthroughput='float(n)/max(float(bench_simtime)/1.0e9,1.0e-9)' \
|
||||||
-ferased=bench_erased \
|
|
||||||
$(SUMMARYFLAGS))
|
$(SUMMARYFLAGS))
|
||||||
|
|
||||||
## Save the bench results
|
## Save the bench results
|
||||||
@@ -565,10 +563,9 @@ benchmarks-csv: $(BUILDDIR)/lfs3.bench.csv
|
|||||||
.PHONY: benchmarks-diff
|
.PHONY: benchmarks-diff
|
||||||
benchmarks-diff: $(BENCH_CSV)
|
benchmarks-diff: $(BENCH_CSV)
|
||||||
$(strip ./scripts/csv.py $^ \
|
$(strip ./scripts/csv.py $^ \
|
||||||
-bsuite \
|
-bcase='%(case)s+%(m)s' \
|
||||||
-freaded=bench_readed \
|
-fsimtime='float(bench_simtime)/1.0e9' \
|
||||||
-fproged=bench_proged \
|
-fsimthroughput='float(n)/max(float(bench_simtime)/1.0e9,1.0e-9)' \
|
||||||
-ferased=bench_erased \
|
|
||||||
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.bench.csv)
|
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.bench.csv)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1186,7 +1186,7 @@ def run_stage(name, runner, test_ids, stdout_, trace_, output_, **args):
|
|||||||
'case': case,
|
'case': case,
|
||||||
**defines,
|
**defines,
|
||||||
'test_passed': '1/1',
|
'test_passed': '1/1',
|
||||||
'test_time': '%.6f' % (
|
'test_runtime': '%.6f' % (
|
||||||
time.time() - last_time)})
|
time.time() - last_time)})
|
||||||
elif op == 'skipped':
|
elif op == 'skipped':
|
||||||
locals.seen_perms += 1
|
locals.seen_perms += 1
|
||||||
@@ -1384,7 +1384,7 @@ def run(runner, test_ids=[], **args):
|
|||||||
output = TestOutput(args['output'],
|
output = TestOutput(args['output'],
|
||||||
['suite', 'case'],
|
['suite', 'case'],
|
||||||
# defines go here
|
# defines go here
|
||||||
['test_passed', 'test_time'])
|
['test_passed', 'test_runtime'])
|
||||||
|
|
||||||
# measure runtime
|
# measure runtime
|
||||||
start = time.time()
|
start = time.time()
|
||||||
|
|||||||
Reference in New Issue
Block a user