summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2004-11-26 10:46:15 +0100
committerunknown <joreland@mysql.com>2004-11-26 10:46:15 +0100
commitb0ca1533cc114d12b28e70be9fb500cdd2227d8d (patch)
tree61e2a37dfe5982296017479954169fe04e0db9b7 /ndb
parentb18b1be91323358b1078e5eb409b3c2042a54786 (diff)
parent8d1171742ce6196875b45f1b9c1462c72101f902 (diff)
downloadmariadb-git-b0ca1533cc114d12b28e70be9fb500cdd2227d8d.tar.gz
Merge mysql.com:/home/jonas/src/mysql-4.1-fix
into mysql.com:/home/jonas/src/mysql-4.1 ndb/test/ndbapi/testScanPerf.cpp: Auto merged
Diffstat (limited to 'ndb')
-rw-r--r--ndb/test/ndbapi/testScanPerf.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/ndb/test/ndbapi/testScanPerf.cpp b/ndb/test/ndbapi/testScanPerf.cpp
index ee2a92e88a9..45f0468bc70 100644
--- a/ndb/test/ndbapi/testScanPerf.cpp
+++ b/ndb/test/ndbapi/testScanPerf.cpp
@@ -222,6 +222,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;
@@ -296,7 +297,7 @@ run_scan(){
break;
}
}
- if(g_paramters[P_RESET].value == 1)
+ if(g_paramters[P_RESET].value == 2)
goto execute;
}
assert(pOp);
@@ -330,6 +331,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);
}
@@ -364,6 +368,7 @@ execute:
int time_passed= (int)(stop - start1);
sample_rows += rows;
sum_time+= time_passed;
+ tot_rows+= rows;
if(sample_rows >= tot)
{
@@ -375,8 +380,8 @@ execute:
sample_start = stop;
}
}
-
- g_err.println("Avg time: %d ms = %u rows/sec", sum_time/iter,
- (1000*tot*iter)/sum_time);
+
+ g_err.println("Avg time: %d ms = %u rows/sec", sum_time/tot_rows,
+ (1000*tot_rows)/sum_time);
return 0;
}