loop_benchmark.sh 422 Bytes
Newer Older
zhouxiang's avatar
zhouxiang committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# 定义要运行的程序命令
program="./benchmark -p ../../models/chatglm-6b/chatglm_flm/chatglm_6b_test_int8.bin --loop"

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

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

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

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

# 杀死所有后台进程
zhouxiang's avatar
zhouxiang committed
21
pkill -f benchmark