-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstat.sh
More file actions
36 lines (31 loc) · 1.42 KB
/
Copy pathstat.sh
File metadata and controls
36 lines (31 loc) · 1.42 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
#!/bin/bash
set -e
set -x
tsc ./number/bunny-mark.ts
commands=("./build/bin/number-calc" "./build/bin/number-calc-js" "node ./number/bunny-mark.js" "./build/bin/number-calc-c-d" "./build/bin/number-calc-c-O0" "./build/bin/number-calc-c-O1")
joined_args=$(IFS=,; echo "${commands[*]}")
python3 stat.py "$joined_args"
tsc ./number_array/bunny-mark.ts
commands=("./build/bin/number-array-calc" "./build/bin/number-array-calc-js" "node ./number_array/bunny-mark.js" "./build/bin/number-array-calc-c-d" "./build/bin/number-array-calc-c-O0" "./build/bin/number-array-calc-c-O1")
joined_args=$(IFS=,; echo "${commands[*]}")
python3 stat.py "$joined_args"
tsc ./class/bunny-mark.ts
commands=("./build/bin/number-class-calc" "./build/bin/number-class-calc-js" "node ./class/bunny-mark.js" "./build/bin/number-class-calc-c-d" "./build/bin/number-class-calc-c-O0" "./build/bin/number-class-calc-c-O1")
joined_args=$(IFS=,; echo "${commands[*]}")
python3 stat.py "$joined_args"
# commands=("./build/bin/number-calc" "./build/bin/number-calc-js" "./build/bin/number-calc-c-d" "./build/bin/number-calc-c-O0" "./build/bin/number-calc-c-O1")
#
# times=()
#
# for command in "${commands[@]}"; do
# start=$(date +%s.%N)
# $command
# end=$(date +%s.%N)
# execution_time=$(echo "scale=3; $end - $start" | bc)
# times+=("$command $execution_time")
# done
#
# echo "命令 执行时间"
# for time in "${times[@]}"; do
# echo "$time"
# done