diff --git a/Makefile b/Makefile index fe1959dd..248d6f1b 100644 --- a/Makefile +++ b/Makefile @@ -592,6 +592,7 @@ bench-marks: SUMMARYFLAGS+=-Si bench-marks: $(BENCH_CSV) $(strip ./scripts/csv.py \ <(./scripts/csv.py $^ \ + -Dprobe=create,delete,fetch,lookup,write \ -bprobe='%(case)s+%(probe)s' \ -Fi='min(enumerate())' \ -fn='max(n)' \ @@ -612,12 +613,14 @@ bench-marks-csv: $(BUILDDIR)/lfs3.bench.csv bench-marks-diff: $(BENCH_CSV) $(strip ./scripts/csv.py \ <(./scripts/csv.py $^ \ + -Dprobe=create,delete,fetch,lookup,write \ -bprobe='%(case)s+%(probe)s' \ -Fi='min(enumerate())' \ -fn='max(n)' \ -ft='max(float(bench_simtime)/1.0e9)' \ -o-) \ -d <(./scripts/csv.py $(BUILDDIR)/lfs3.bench.csv \ + -Dprobe=create,delete,fetch,lookup,write \ -bprobe='%(case)s+%(probe)s' \ -Fi='min(enumerate())' \ -fn='max(n)' \ @@ -633,6 +636,7 @@ bench-bottlenecks: SUMMARYFLAGS+=-Sruntime bench-bottlenecks: $(BENCH_CSV) $(strip ./scripts/csv.py \ <(./scripts/csv.py $^ \ + -Dprobe=create,delete,fetch,lookup,write \ -bprobe='%(case)s+%(probe)s' \ -Fi='min(enumerate())' \ -fn='max(n)' \ @@ -650,6 +654,7 @@ bench-bottlenecks: $(BENCH_CSV) bench-ops: SUMMARYFLAGS+=-Si bench-ops: $(BENCH_CSV) $(strip ./scripts/csv.py $^ \ + -Dprobe=create,delete,fetch,lookup,write \ -bprobe='%(case)s+%(probe)s' \ -Fi='min(enumerate())' \ -freads='bench_reads' \ @@ -665,6 +670,7 @@ bench-ops: $(BENCH_CSV) bench-widths: SUMMARYFLAGS+=-Si bench-widths: $(BENCH_CSV) $(strip ./scripts/csv.py $^ \ + -Dprobe=create,delete,fetch,lookup,write \ -bprobe='%(case)s+%(probe)s' \ -Fi='min(enumerate())' \ -freaded="avg(ffrac( \ @@ -687,6 +693,35 @@ bench-widths: $(BENCH_CSV) | sed -n 's/^ERASE_WIDTH=\(.*\)/\1/p'))))" \ $(SUMMARYFLAGS)) +## Show heap/stack/disk usage +.PHONY: bench-usage +bench-usage: SUMMARYFLAGS+=-Si +bench-usage: $(BENCH_CSV) + $(strip ./scripts/csv.py \ + <(./scripts/csv.py $^ \ + -Dprobe=stack \ + -bcase \ + -Fi='min(enumerate())' \ + -fstack='max(bench_simtime)' \ + -o-) \ + <(./scripts/csv.py $^ \ + -Dprobe=heap \ + -bcase \ + -Fi='min(enumerate())' \ + -fheap='max(bench_simtime)' \ + -o-) \ + <(./scripts/csv.py $^ \ + -Dprobe=usage \ + -bcase \ + -Fi='min(enumerate())' \ + -fdisk='max(bench_simtime)' \ + -o-) \ + -bcase \ + -fstack \ + -fheap \ + -fdisk \ + $(SUMMARYFLAGS)) + diff --git a/benches/bench_wt.toml b/benches/bench_wt.toml index d9703aa3..0db7c698 100644 --- a/benches/bench_wt.toml +++ b/benches/bench_wt.toml @@ -82,6 +82,14 @@ code = ''' // report the amount we managed to write BENCH_STOP("write", written); + // report the total stack/heap usage after the benchmark + #ifdef BENCH_YES_STACK + BENCH_RESULT("stack", written, BENCH_STACK()); + #endif + #ifdef BENCH_YES_HEAP + BENCH_RESULT("heap", written, BENCH_HEAP()); + #endif + lfs3_unmount(&lfs3) => 0; ''' @@ -129,6 +137,14 @@ code = ''' // report the amount we managed to write BENCH_STOP("write", written); + // report the total stack/heap usage after the benchmark + #ifdef BENCH_YES_STACK + BENCH_RESULT("stack", written, BENCH_STACK()); + #endif + #ifdef BENCH_YES_HEAP + BENCH_RESULT("heap", written, BENCH_HEAP()); + #endif + lfs3_unmount(&lfs3) => 0; ''' @@ -196,6 +212,14 @@ code = ''' // report the amount we managed to write BENCH_STOP("write", written); + // report the total stack/heap usage after the benchmark + #ifdef BENCH_YES_STACK + BENCH_RESULT("stack", written, BENCH_STACK()); + #endif + #ifdef BENCH_YES_HEAP + BENCH_RESULT("heap", written, BENCH_HEAP()); + #endif + lfs3_unmount(&lfs3) => 0; ''' @@ -253,6 +277,14 @@ code = ''' // report the amount we managed to write BENCH_STOP("write", written); + // report the total stack/heap usage after the benchmark + #ifdef BENCH_YES_STACK + BENCH_RESULT("stack", written, BENCH_STACK()); + #endif + #ifdef BENCH_YES_HEAP + BENCH_RESULT("heap", written, BENCH_HEAP()); + #endif + lfs3_unmount(&lfs3) => 0; '''