Przeglądaj źródła

Add 'build-time' recipe to track build speed

Benjamin Sago 4 lat temu
rodzic
commit
ee96965e0e
2 zmienionych plików z 6 dodań i 0 usunięć
  1. 1 0
      .gitignore
  2. 5 0
      Justfile

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 /target
 /tarpaulin-report.html
 fuzz-*.log
+/cargo-timing*.html

+ 5 - 0
Justfile

@@ -18,6 +18,11 @@ export DOG_DEBUG := ""
     cargo build --release --verbose
     strip "${CARGO_TARGET_DIR:-target}/release/dog"
 
+# produce an HTML chart of compilation timings
+@build-time:
+    cargo +nightly clean
+    cargo +nightly build -Z timings
+
 # compile the dog binary (without some features)
 @build-quick:
     cargo build --no-default-features