]> Untitled Git - lemmy.git/blobdiff - scripts/compilation_benchmark.sh
Delete migrations_testing folder (#3751)
[lemmy.git] / scripts / compilation_benchmark.sh
index 76003798012eb20be093596333c5409947174fa4..93d1b6a23c151af7e2d8b83efff62a3e51b1a4c1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
 
 times=3
@@ -8,11 +8,11 @@ for ((i=0; i < times; i++)) ; do
     echo "cargo clean"
     # to benchmark incremental compilation time, do a full build with the same compiler version first,
     # and use the following clean command:
-    #cargo clean -p lemmy_utils
-    cargo clean
+    cargo clean -p lemmy_utils
+    #cargo clean
     echo "cargo build"
     start=$(date +%s.%N)
-    RUSTC_WRAPPER='' cargo +1.47.0 build -q
+    RUSTC_WRAPPER='' cargo build -q
     end=$(date +%s.%N)
     echo "Finished iteration $i after $(bc <<< "scale=0; $end - $start") seconds"
     duration=$(bc <<< "$duration + $end - $start")
@@ -20,4 +20,4 @@ done
 
 average=$(bc <<< "scale=0; $duration / $times")
 
-echo "Average compilation time over $times runs is $average seconds"
\ No newline at end of file
+echo "Average compilation time over $times runs is $average seconds"