We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent03ce7eb commit3c5b2fbCopy full SHA for 3c5b2fb
contrib/pg_dtm/tests/dtmbench.cpp
@@ -253,6 +253,10 @@ int main (int argc, char* argv[])
253
"\t-i\tinitialize datanase\n");
254
return1;
255
}
256
+if (cfg.connections.size() <2) {
257
+printf("At least two connections has to be specified\n");
258
+return1;
259
+ }
260
if (initialize) {
261
initializeDatabase();
262
@@ -287,6 +291,10 @@ int main (int argc, char* argv[])
287
291
288
292
289
293
time_t elapsed =getCurrentTime() - start;
290
-printf("TPS(updates)=%f, TPS(selects)=%f, aborts=%ld\n", (double)(nWrites*USEC)/elapsed, (double)(nReads*USEC)/elapsed, nAborts);
294
+if (elapsed ==0) {
295
+printf("Test is completed too fast\n");
296
+ }else {
297
+printf("TPS(updates)=%f, TPS(selects)=%f, aborts=%ld\n", (double)(nWrites*USEC)/elapsed, (double)(nReads*USEC)/elapsed, nAborts);
298
299
return0;
300