loop_benchmark.sh 408 Bytes
Newer Older
zhouxiang's avatar
zhouxiang committed
1
2
3
#!/bin/bash

# 定义要运行的程序命令
zhouxiang's avatar
zhouxiang committed
4
program="./benchmark -p ../chatglm2-6b-int8.bin -f prompts/beijing.txt --loop"
zhouxiang's avatar
zhouxiang committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

# 定义要运行的实例数量
num_instances=2

# 启动后台进程
for ((i=1; i<=num_instances; i++)); do
  $program &
done

# 压测持续时间(秒)
test_duration=120

# 等待一段时间以进行压测
sleep $test_duration

# 杀死所有后台进程
pkill -f benchmark