Commit 8a401ed4 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

print the query experiments while they happen refs[t:2258]

git-svn-id: file:///svn/toku/tokudb@16540 c7de825b-a66e-492c-adef-691d508d4ae1
parent 27cf5da8
...@@ -349,28 +349,25 @@ static void scanscan_range (void) { ...@@ -349,28 +349,25 @@ static void scanscan_range (void) {
r = dbc->c_get(dbc, &key, &val, DB_SET_RANGE+lock_flag); r = dbc->c_get(dbc, &key, &val, DB_SET_RANGE+lock_flag);
if (r != 0) { if (r != 0) {
assert(r == DB_NOTFOUND); assert(r == DB_NOTFOUND);
printf("%s:%d\n", __FUNCTION__, __LINE__);
goto makekey; goto makekey;
} }
#if 0
// do the range scan // do the range scan
u_int32_t f_flags = 0; long rowcounter = 0;
if (prelockflag) {
f_flags |= lock_flag;
}
long rowcounter=0;
struct extra_count e = {0,0}; struct extra_count e = {0,0};
while (0 == (r = dbc->c_getf_next(dbc, f_flags, counttotalbytes, &e))) { while (limitcount > 0 && rowcounter < limitcount) {
rowcounter++; r = dbc->c_getf_next(dbc, prelockflag ? lock_flag : 0, counttotalbytes, &e);
if (limitcount<=0 || (limitcount>0 && rowcounter>=limitcount)) if (r != 0)
break; break;
rowcounter++;
} }
#endif
r = dbc->c_close(dbc); r = dbc->c_close(dbc);
assert(r==0); assert(r==0);
texperiments[counter] = gettime() - tstart; texperiments[counter] = gettime() - tstart;
printf("%f\n", texperiments[counter]); fflush(stdout);
} }
// print the times // print the times
...@@ -381,7 +378,6 @@ static void scanscan_range (void) { ...@@ -381,7 +378,6 @@ static void scanscan_range (void) {
if (tmax == 0.0 || texperiments[counter] > tmax) if (tmax == 0.0 || texperiments[counter] > tmax)
tmax = texperiments[counter]; tmax = texperiments[counter];
tsum += texperiments[counter]; tsum += texperiments[counter];
printf("%f\n", texperiments[counter]);
} }
printf("%f %f %f/%d = %f\n", tmin, tmax, tsum, n_experiments, tsum / n_experiments); printf("%f %f %f/%d = %f\n", tmin, tmax, tsum, n_experiments, tsum / n_experiments);
} }
......
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