nostrdb/perf: add some flamegraph helpers to makefile
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
1b2f4c41df
commit
1a6568deca
@@ -159,6 +159,18 @@ testdata/many-events.json: testdata/many-events.json.zst
|
|||||||
bench: bench-ingest-many.c $(DEPS)
|
bench: bench-ingest-many.c $(DEPS)
|
||||||
$(CC) $(CFLAGS) $< $(LDS) -o $@
|
$(CC) $(CFLAGS) $< $(LDS) -o $@
|
||||||
|
|
||||||
|
perf.out: fake
|
||||||
|
perf script > $@
|
||||||
|
|
||||||
|
perf.folded: perf.out
|
||||||
|
stackcollapse-perf.pl $< > $@
|
||||||
|
|
||||||
|
ndb.svg: perf.folded
|
||||||
|
flamegraph.pl $< > $@
|
||||||
|
|
||||||
|
flamegraph: ndb.svg
|
||||||
|
browser $<
|
||||||
|
|
||||||
run-bench: testdata/many-events.json bench
|
run-bench: testdata/many-events.json bench
|
||||||
./bench
|
./bench
|
||||||
|
|
||||||
@@ -169,4 +181,4 @@ testdata/db/.dir:
|
|||||||
test: test.c $(DEPS) testdata/db/.dir
|
test: test.c $(DEPS) testdata/db/.dir
|
||||||
$(CC) $(CFLAGS) test.c $(LDS) -o $@
|
$(CC) $(CFLAGS) test.c $(LDS) -o $@
|
||||||
|
|
||||||
.PHONY: tags clean
|
.PHONY: tags clean fake
|
||||||
|
|||||||
Reference in New Issue
Block a user