From 4a523db779674cd88c01c57e9dc5dcef143c8512 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 31 Jul 2020 15:12:34 -0300 Subject: [PATCH] Testing performance of toString() method (windows). --- client/src/testprogram/testprogram.cc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/client/src/testprogram/testprogram.cc b/client/src/testprogram/testprogram.cc index 6241095..fe1a6dd 100644 --- a/client/src/testprogram/testprogram.cc +++ b/client/src/testprogram/testprogram.cc @@ -129,13 +129,21 @@ host.connect(); - cout << "------------------------------" << endl; - auto start = time(nullptr); - for(size_t ix = 0; ix < 100; ix++) { - host.waitForReady(5); + { + auto start = time(nullptr); + for(size_t ix = 0; ix < 100; ix++) { + host.waitForReady(5); + } + cout << endl << "Time for waitForReady method: " << (time(nullptr) - start) << endl << endl; + } + + { + auto start = time(nullptr); + for(size_t ix = 0; ix < 100; ix++) { + host.toString(14,1,80,0); + } + cout << endl << "Time for toString method: " << (time(nullptr) - start) << endl << endl; } - cout << "Time: " << (time(nullptr) - start) << std::endl; - cout << "------------------------------" << endl; host.disconnect(); -- libgit2 0.21.2