From 4ddadd99121cbdf4928fd5011af48364920db44f Mon Sep 17 00:00:00 2001 From: wangguibao Date: Tue, 2 Apr 2019 10:20:45 +0800 Subject: [PATCH] Fix press test case Change-Id: Ib4390db59f7a9f34f1bd4095be5b44e9296c3474 --- sdk-cpp/demo/text_classification_press.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk-cpp/demo/text_classification_press.cpp b/sdk-cpp/demo/text_classification_press.cpp index fcd51f17..fff8fd69 100644 --- a/sdk-cpp/demo/text_classification_press.cpp +++ b/sdk-cpp/demo/text_classification_press.cpp @@ -341,10 +341,11 @@ int main(int argc, char **argv) { LOG(INFO) << "Total requests: " << round_times.size(); LOG(INFO) << "Max concurrency: " << FLAGS_concurrency; LOG(INFO) << "Elapse ms (wall-time): " << elapse_ms; + LOG(INFO) << "Total ms (absolute time): " << total_ms; double qps = 0.0; if (elapse_ms != 0) { - qps = (static_cast(count) / (elapse_ms / FLAGS_concurrency)) * 1000; + qps = (static_cast(count) / (total_ms / FLAGS_concurrency)) * 1000; } LOG(INFO) << "QPS: " << qps / FLAGS_batch_size << "/s"; -- GitLab