summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2019-05-26 18:23:05 +0200
committerJustin Worthe <justin@worthe-it.co.za>2019-05-26 18:23:05 +0200
commit9450ab5a6bf6b2aa57c1ebbd0be0a88c1110e140 (patch)
treecd2eedb95ee961e0be3fb15d318b50eecbe18edd /Makefile
parentd37be51f196eebdb8df57c87e8ab5bb684e1dcd9 (diff)
Setting up makefile for submission
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7b46d01
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+build:
+ cargo build --release
+
+test:
+ cargo test --release
+
+bench:
+ cargo run --release --features "benchmarking" --bin perf-test
+
+profile:
+ cargo build --release --features "benchmarking single-threaded"
+ mkdir -p target/profile
+ sudo perf record -F 1000 -a -g target/release/perf-test
+ sudo perf script > target/profile/out.perf
+ ../FlameGraph/stackcollapse-perf.pl target/profile/out.perf > target/profile/out.folded
+ ../FlameGraph/flamegraph.pl target/profile/out.folded > target/profile/flamegraph.svg
+
+clean:
+ cargo clean
+
+submission.zip:
+ zip -r9 submission.zip bot.json Cargo.lock Cargo.toml src
+
+.PHONY: build test bench profile clean