benchmark_cube.sh 1.0 KB
Newer Older
M
MRXLT 已提交
1 2
rm profile_log

M
MRXLT 已提交
3
wget https://paddle-serving.bj.bcebos.com/unittest/ctr_cube_unittest.tar.gz --no-check-certificate
M
MRXLT 已提交
4 5 6 7 8
tar xf ctr_cube_unittest.tar.gz
mv models/ctr_client_conf ./
mv models/ctr_serving_model_kv ./
mv models/data ./cube/

M
MRXLT 已提交
9
wget https://paddle-serving.bj.bcebos.com/others/cube_app.tar.gz --no-check-certificate
M
MRXLT 已提交
10 11 12 13 14 15 16
tar xf cube_app.tar.gz
mv cube_app/cube* ./cube/
sh cube_prepare.sh &

cp ../../../build_server/core/cube/cube-api/cube-cli .
python gen_key.py

M
fix ci  
MRXLT 已提交
17
for thread_num in 1 4 16 32
M
MRXLT 已提交
18
do
M
fix ci  
MRXLT 已提交
19
for batch_size in 1000
M
MRXLT 已提交
20 21 22 23 24 25 26
do
    ./cube-cli -config_file ./cube/conf/cube.conf -keys key -dict test_dict -thread_num $thread_num --batch $batch_size > profile 2>&1
    echo "batch size : $batch_size"
    echo "thread num : $thread_num"
    echo "========================================"
    echo "batch size : $batch_size" >> profile_log
    echo "thread num : $thread_num" >> profile_log
M
MRXLT 已提交
27
    tail -n 7 profile | head -n 4 >> profile_log
M
MRXLT 已提交
28
    tail -n 2 profile >> profile_log
M
MRXLT 已提交
29

M
MRXLT 已提交
30 31 32 33
done
done

ps -ef|grep 'cube'|grep -v grep|cut -c 9-15 | xargs kill -9