diff options
Diffstat (limited to 'cpp/tests/topic_publisher.cpp')
| -rw-r--r-- | cpp/tests/topic_publisher.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cpp/tests/topic_publisher.cpp b/cpp/tests/topic_publisher.cpp index b95abd9d66..6d17b7034f 100644 --- a/cpp/tests/topic_publisher.cpp +++ b/cpp/tests/topic_publisher.cpp @@ -138,13 +138,15 @@ int main(int argc, char** argv){ int64_t sum(0); for(int i = 0; i < batchSize; i++){ if(i > 0 && args.getDelay()) sleep(args.getDelay()); - Time time = publisher.publish( - args.getMessages(), args.getSubscribers(), args.getSize()); - if(!max || time > max) max = time; - if(!min || time < min) min = time; - sum += time; + int64_t msecs = + publisher.publish(args.getMessages(), + args.getSubscribers(), + args.getSize()) / TIME_MSEC; + if(!max || msecs > max) max = msecs; + if(!min || msecs < min) min = msecs; + sum += msecs; std::cout << "Completed " << (i+1) << " of " << batchSize - << " in " << time/TIME_MSEC << "ms" << std::endl; + << " in " << msecs << "ms" << std::endl; } publisher.terminate(); int64_t avg = sum / batchSize; |
