make: Added benchmark/testmark-bottlenecks to help find slow cases
This is mostly useful for finding slow test cases, but may be useful for benches in the future? I've been running a separate script for this, but adding a rule to the Makefile makes it a bit easier: TESTMARKS=1 make test -j && make testmarks-bottlenecks
This commit is contained in:
@@ -540,6 +540,16 @@ testmarks-diff: $(TEST_CSV)
|
|||||||
-fruntime=test_runtime \
|
-fruntime=test_runtime \
|
||||||
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.test.csv)
|
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.test.csv)
|
||||||
|
|
||||||
|
## Show which tests took the most time
|
||||||
|
.PHONY: testmarks-bottlenecks
|
||||||
|
testmarks-bottlenecks: SUMMARYFLAGS+=-Sruntime
|
||||||
|
testmarks-bottlenecks: $(TEST_CSV)
|
||||||
|
$(strip ./scripts/csv.py $^ \
|
||||||
|
-bcase \
|
||||||
|
-fpassed=test_passed \
|
||||||
|
-fruntime=test_runtime \
|
||||||
|
$(SUMMARYFLAGS))
|
||||||
|
|
||||||
## Build the bench-runner
|
## Build the bench-runner
|
||||||
.PHONY: bench-runner build-benches
|
.PHONY: bench-runner build-benches
|
||||||
bench-runner build-benches: CFLAGS+=$(BENCH_CFLAGS)
|
bench-runner build-benches: CFLAGS+=$(BENCH_CFLAGS)
|
||||||
@@ -587,11 +597,23 @@ 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 $^ \
|
||||||
-bcase='%(case)s+%(m)s' \
|
-bprobe='%(case)s+%(probe)s' \
|
||||||
-fsimtime='float(bench_simtime)/1.0e9' \
|
-fthroughput='avg( \
|
||||||
-fsimthroughput='float(n)/max(float(bench_simtime)/1.0e9,1.0e-9)' \
|
float(delta(n, case, probe)) \
|
||||||
|
/ max(float(bench_simtime)/1.0e9, 1.0e-9))' \
|
||||||
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.bench.csv)
|
$(SUMMARYFLAGS) -d $(BUILDDIR)/lfs3.bench.csv)
|
||||||
|
|
||||||
|
## Show which tests took the most time
|
||||||
|
.PHONY: benchmarks-bottlenecks
|
||||||
|
benchmarks-bottlenecks: SUMMARYFLAGS+=-Sruntime
|
||||||
|
benchmarks-bottlenecks: $(BENCH_CSV)
|
||||||
|
$(strip ./scripts/csv.py $^ \
|
||||||
|
-bcase='%(case)s+%(probe)s' \
|
||||||
|
-fn='delta(n, case, probe)' \
|
||||||
|
-ft='float(bench_simtime)/1.0e9' \
|
||||||
|
-fruntime='delta(bench_runtime, case, probe)' \
|
||||||
|
$(SUMMARYFLAGS))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# low-level rules
|
# low-level rules
|
||||||
|
|||||||
Reference in New Issue
Block a user