-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbenchmark_tests.sh
More file actions
executable file
·41 lines (35 loc) · 1.04 KB
/
benchmark_tests.sh
File metadata and controls
executable file
·41 lines (35 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# This script is used to run the benchmark tests
BUILD_DIR="build"
DATA_DIR="data"
mkdir -p $BUILD_DIR $DATA_DIR
git submodule update --init --recursive
# compile and run benchmark test for each model
# Build the project using CMake
cd $BUILD_DIR
cmake .. -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_TESTING=OFF
make
cd ..
# Run the benchmark tests
# save data to benchmark_results.txt in the data directory
./$BUILD_DIR/benchmark_bc --benchmark_format=console --benchmark_out=$DATA_DIR/bc_benchmark_results.txt
if [ $? -eq 0 ]; then
echo "Benchmark tests passed"
else
echo "Benchmark tests failed"
exit 1
fi
./$BUILD_DIR/benchmark_cv --benchmark_format=console --benchmark_out=$DATA_DIR/cv_benchmark_results.txt
if [ $? -eq 0 ]; then
echo "Benchmark tests passed"
else
echo "Benchmark tests failed"
exit 1
fi
./$BUILD_DIR/benchmark_gi --benchmark_format=console --benchmark_out=$DATA_DIR/gi_benchmark_results.txt
if [ $? -eq 0 ]; then
echo "Benchmark tests passed"
else
echo "Benchmark tests failed"
exit 1
fi