Commit f6b872dc authored by joreland@mysql.com's avatar joreland@mysql.com

merge

parents b9c920ba 4d52d9e5
...@@ -187,6 +187,7 @@ run_scan(){ ...@@ -187,6 +187,7 @@ run_scan(){
int sum_time= 0; int sum_time= 0;
int sample_rows = 0; int sample_rows = 0;
int tot_rows = 0;
NDB_TICKS sample_start = NdbTick_CurrentMillisecond(); NDB_TICKS sample_start = NdbTick_CurrentMillisecond();
Uint32 tot = g_paramters[P_ROWS].value; Uint32 tot = g_paramters[P_ROWS].value;
...@@ -308,6 +309,9 @@ run_scan(){ ...@@ -308,6 +309,9 @@ run_scan(){
} }
assert(check == 0); 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++){ for(int i = 0; i<g_table->getNoOfColumns(); i++){
pOp->getValue(i); pOp->getValue(i);
} }
...@@ -345,6 +349,7 @@ execute: ...@@ -345,6 +349,7 @@ execute:
int time_passed= (int)(stop - start1); int time_passed= (int)(stop - start1);
sample_rows += rows; sample_rows += rows;
sum_time+= time_passed; sum_time+= time_passed;
tot_rows+= rows;
if(sample_rows >= tot) if(sample_rows >= tot)
{ {
...@@ -357,8 +362,7 @@ execute: ...@@ -357,8 +362,7 @@ execute:
} }
} }
g_err.println("Avg time: %d ms = %u rows/sec", g_err.println("Avg time: %d ms = %u rows/sec", sum_time/tot_rows,
sum_time/iter, (1000*tot_rows)/sum_time);
(1000*iter)/sum_time);
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment