提交 3206bcd9 编写于 作者: T tensor-tang

refine log and add QPS

上级 06adccf6
...@@ -202,11 +202,13 @@ TEST(inference, nlp) { ...@@ -202,11 +202,13 @@ TEST(inference, nlp) {
&fetch_targets, !FLAGS_prepare_vars); &fetch_targets, !FLAGS_prepare_vars);
} }
stop_ms = GetCurrentMs(); stop_ms = GetCurrentMs();
LOG(INFO) << "Tid: 0, process " << datasets.size()
<< " samples, avg time per sample: "
<< (stop_ms - start_ms) / datasets.size() << " ms";
} }
LOG(INFO) << "Total inference time with " << FLAGS_num_threads LOG(INFO) << "Total inference time with " << FLAGS_num_threads
<< " threads : " << (stop_ms - start_ms) / 1000.0 << " threads : " << (stop_ms - start_ms) / 1000.0
<< " sec, avg time per seq: " << " sec, QPS: " << datasets.size() / ((stop_ms - start_ms) / 1000);
<< (stop_ms - start_ms) / datasets.size() << " ms";
delete scope; delete scope;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册