Moved perf intermediary files to target folder
authorJustin Worthe <justin@worthe-it.co.za>
Tue, 15 May 2018 21:19:31 +0000 (23:19 +0200)
committerJustin Worthe <justin@worthe-it.co.za>
Tue, 15 May 2018 21:19:31 +0000 (23:19 +0200)
.gitignore
Makefile
src/bin/perf-test.rs

index 44ba2ac..cadf2dd 100644 (file)
@@ -7,4 +7,5 @@ state.json
 Cargo.lock
 
 # These are backup files generated by rustfmt
-**/*.rs.bk
\ No newline at end of file
+**/*.rs.bk
+/perf.data
index 5f2e069..a87c095 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,10 +6,11 @@ test:
 
 profile:
        cargo build --release --features "benchmarking"
+       mkdir -p target/profile
        sudo perf record -F 1000 -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
+       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
index 62c323c..835267e 100644 (file)
@@ -7,7 +7,7 @@ use zombot::engine::command::Command;
 
 use std::error::Error;
 
-const STATE_PATH: &str = "init_state.json";
+const STATE_PATH: &str = "tests/state0.json";
 
 const COMMAND_PATH: &str = "command.txt";