summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-05-14 21:51:36 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-05-14 21:51:36 +0200
commit6c7eac5e5fc166759dbbf22f0ca28fd1b636de52 (patch)
treed892b7a712c7d49d8bb870eeef8eefe672d1795a /Makefile
parent91c5c52431c894315d5ef72a7c9480b3b09d1745 (diff)
Added profiling target with perf
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..10aff98
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+build:
+ cargo build --release
+
+test:
+ cargo test --release
+
+profile:
+ cargo build --release --features "benchmarking"
+ sudo perf record -F 99 -a -g target/release/perf-test
+ sudo perf script > out.perf
+ ../FlameGraph/stackcollapse-perf.pl out.perf > out.folded
+ ../FlameGraph/flamegraph.pl out.folded > flamegraph.svg
+
+clean:
+ cargo clean
+
+
+.PHONY: build test profile clean