Commit 4a523db779674cd88c01c57e9dc5dcef143c8512
1 parent
4a90d914
Exists in
master
and in
1 other branch
Testing performance of toString() method (windows).
Showing
1 changed file
with
14 additions
and
6 deletions
Show diff stats
client/src/testprogram/testprogram.cc
... | ... | @@ -129,13 +129,21 @@ |
129 | 129 | |
130 | 130 | host.connect(); |
131 | 131 | |
132 | - cout << "------------------------------" << endl; | |
133 | - auto start = time(nullptr); | |
134 | - for(size_t ix = 0; ix < 100; ix++) { | |
135 | - host.waitForReady(5); | |
132 | + { | |
133 | + auto start = time(nullptr); | |
134 | + for(size_t ix = 0; ix < 100; ix++) { | |
135 | + host.waitForReady(5); | |
136 | + } | |
137 | + cout << endl << "Time for waitForReady method: " << (time(nullptr) - start) << endl << endl; | |
138 | + } | |
139 | + | |
140 | + { | |
141 | + auto start = time(nullptr); | |
142 | + for(size_t ix = 0; ix < 100; ix++) { | |
143 | + host.toString(14,1,80,0); | |
144 | + } | |
145 | + cout << endl << "Time for toString method: " << (time(nullptr) - start) << endl << endl; | |
136 | 146 | } |
137 | - cout << "Time: " << (time(nullptr) - start) << std::endl; | |
138 | - cout << "------------------------------" << endl; | |
139 | 147 | |
140 | 148 | host.disconnect(); |
141 | 149 | ... | ... |