diff --git a/paddle/fluid/inference/tests/book/test_inference_nlp.cc b/paddle/fluid/inference/tests/book/test_inference_nlp.cc index 962358d761c3ff4c5c14f0c484cdf465e3d20cfd..378e1620a090243e9429ffcf59c4a42d005830eb 100644 --- a/paddle/fluid/inference/tests/book/test_inference_nlp.cc +++ b/paddle/fluid/inference/tests/book/test_inference_nlp.cc @@ -202,11 +202,13 @@ TEST(inference, nlp) { &fetch_targets, !FLAGS_prepare_vars); } 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 << " threads : " << (stop_ms - start_ms) / 1000.0 - << " sec, avg time per seq: " - << (stop_ms - start_ms) / datasets.size() << " ms"; + << " sec, QPS: " << datasets.size() / ((stop_ms - start_ms) / 1000); delete scope; }