-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
26 lines (19 loc) · 942 Bytes
/
run.sh
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
#!/bin/bash
make clean; clear;
echo "--------------------"
echo "Compiling program..."
echo "--------------------"
make || exit
echo "Running program..."
echo "--------------------"
# Setting CPU in max performance mode (requires root permission)
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor > /dev/null
# Running our process on isolated CPU core
taskset -c 1 ./google_benchmark_library_example
# Different output formats
# taskset -c 1 ./google_benchmark_library_example --benchmark_format=console # default
# taskset -c 1 ./google_benchmark_library_example --benchmark_format=json
# taskset -c 1 ./google_benchmark_library_example --benchmark_format=csv
# Re-setting CPU performance mode (requires root permission)
echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor > /dev/null
echo "================================================================================"