summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2004-11-26 10:13:32 +0100
committerunknown <joreland@mysql.com>2004-11-26 10:13:32 +0100
commita72a5f1264eab35f3d06ad7c7bc7e6df9be8ca85 (patch)
tree80cd775eb894386392fb29e225b876e8df376022 /ndb
parent353076ad099a150cc6b2a82f80b4548a5f0958b1 (diff)
parent8d1171742ce6196875b45f1b9c1462c72101f902 (diff)
downloadmariadb-git-a72a5f1264eab35f3d06ad7c7bc7e6df9be8ca85.tar.gz
merge
Diffstat (limited to 'ndb')
-rw-r--r--ndb/test/ndbapi/testScanPerf.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/ndb/test/ndbapi/testScanPerf.cpp b/ndb/test/ndbapi/testScanPerf.cpp
index 1ef19f4037e..d388af9f642 100644
--- a/ndb/test/ndbapi/testScanPerf.cpp
+++ b/ndb/test/ndbapi/testScanPerf.cpp
@@ -187,6 +187,7 @@ run_scan(){
int sum_time= 0;
int sample_rows = 0;
+ int tot_rows = 0;
NDB_TICKS sample_start = NdbTick_CurrentMillisecond();
Uint32 tot = g_paramters[P_ROWS].value;
@@ -308,6 +309,9 @@ run_scan(){
}
assert(check == 0);
+ if(g_paramters[P_RESET].value == 1)
+ g_paramters[P_RESET].value = 2;
+
for(int i = 0; i<g_table->getNoOfColumns(); i++){
pOp->getValue(i);
}
@@ -345,6 +349,7 @@ execute:
int time_passed= (int)(stop - start1);
sample_rows += rows;
sum_time+= time_passed;
+ tot_rows+= rows;
if(sample_rows >= tot)
{
@@ -356,9 +361,8 @@ execute:
sample_start = stop;
}
}
-
- g_err.println("Avg time: %d ms = %u rows/sec",
- sum_time/iter,
- (1000*iter)/sum_time);
+
+ g_err.println("Avg time: %d ms = %u rows/sec", sum_time/tot_rows,
+ (1000*tot_rows)/sum_time);
return 0;
}