From 8df0b88998c965675f202740df35dbfcc82bc748 Mon Sep 17 00:00:00 2001 From: MRXLT Date: Wed, 15 Jul 2020 11:57:33 +0800 Subject: [PATCH] fix cube benchmark script --- core/cube/cube-api/src/cube_cli.cpp | 11 +++++------ .../examples/criteo_ctr_with_cube/benchmark_cube.sh | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/core/cube/cube-api/src/cube_cli.cpp b/core/cube/cube-api/src/cube_cli.cpp index 038ed711..4a29ef46 100644 --- a/core/cube/cube-api/src/cube_cli.cpp +++ b/core/cube/cube-api/src/cube_cli.cpp @@ -163,7 +163,6 @@ int run_m(int argc, char** argv) { uint64_t max_time = 0; uint64_t min_time = 1000000; std::vector all_time_list; - all_time_list.resize(turns * thread_num); for (int i = 0; i < thread_num; i++) { for (int j = 0; j < request_list[i]; j++) { sum_time += time_list[i][j]; @@ -191,11 +190,11 @@ int run_m(int argc, char** argv) { << std::to_string(all_time_list[static_cast(0.9 * request_num)]) << "\n99 percent: " << std::to_string(all_time_list[static_cast(0.99 * request_num)]) - << "\n999 percent: " - << std::to_string(all_time_list[static_cast(0.999 * request_num)]); - LOG(INFO) << "\ntotal_request: " << std::to_string(request_num) << "\nspeed: " - << std::to_string(turns * 1000000 / main_time) // mean_time us - << " query per second"; + << "\n99.9 percent: " + << std::to_string(all_time_list[static_cast(0.999 * request_num)]) + << "\ntotal_request: " << std::to_string(request_num) << "\nspeed: " + << std::to_string(turns * 1000000 / main_time) // mean_time us + << " query per second"; return 0; } diff --git a/python/examples/criteo_ctr_with_cube/benchmark_cube.sh b/python/examples/criteo_ctr_with_cube/benchmark_cube.sh index e4a2cb36..cb89bb1f 100755 --- a/python/examples/criteo_ctr_with_cube/benchmark_cube.sh +++ b/python/examples/criteo_ctr_with_cube/benchmark_cube.sh @@ -1,13 +1,13 @@ rm profile_log -wget https://paddle-serving.bj.bcebos.com/unittest/ctr_cube_unittest.tar.gz --no-check-certificate -tar xf ctr_cube_unittest.tar.gz +#wget https://paddle-serving.bj.bcebos.com/unittest/ctr_cube_unittest.tar.gz --no-check-certificate +#tar xf ctr_cube_unittest.tar.gz mv models/ctr_client_conf ./ mv models/ctr_serving_model_kv ./ mv models/data ./cube/ -wget https://paddle-serving.bj.bcebos.com/others/cube_app.tar.gz --no-check-certificate -tar xf cube_app.tar.gz +#wget https://paddle-serving.bj.bcebos.com/others/cube_app.tar.gz --no-check-certificate +#tar xf cube_app.tar.gz mv cube_app/cube* ./cube/ sh cube_prepare.sh & @@ -24,8 +24,7 @@ do echo "========================================" echo "batch size : $batch_size" >> profile_log echo "thread num : $thread_num" >> profile_log - tail -n 7 profile | head -n 4 >> profile_log - tail -n 2 profile >> profile_log + tail -n 8 profile >> profile_log done done -- GitLab