Commit 59e5f197 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Get scanrace back into the test suite, with a small enough test set to run fast. Refs #1469.

git-svn-id: file:///svn/toku/tokudb@9718 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4257a034
......@@ -53,9 +53,9 @@ check-default: $(TARGET_TDB)
check-x: $(TARGET_TDB)
$(VGRIND) ./$(TARGET_TDB) $(VERBVERBOSE) -x --xcount 1000 --periter 100000 --env x.dir 10 $(SUMMARIZE_CMD)
# Warning, this cannot actually run in parallel with the other tests since it uses the same env
# check-scanrace: VGRIND=tcheck_cl -w 140 -s 4 -p nothreads,delay=2,stall=900,noverbose
check-scanrace: $(SCANRACE_TDB) $(TARGET_TDB)
./$(TARGET_TDB) --env scanrace.tokudb 1
./$(TARGET_TDB) --env scanrace.tokudb --periter 10000 --pagesize 4096 1
$(VGRIND) ./$(SCANRACE_TDB) --env scanrace.tokudb $(SUMMARIZE_CMD)
# A fast transaction test that detects #455.
......
......@@ -15,7 +15,7 @@
static const char *pname;
static long limitcount=-1;
static u_int32_t cachesize = 4*1024*1024;
static u_int32_t cachesize = 16*1024*1024;
#define STRINGIFY2(s) #s
#define STRINGIFY(s) STRINGIFY2(s)
......@@ -116,23 +116,20 @@ counttotalbytes (DBT const *key, DBT const *data, void *extrav) {
static void scanrace_lwc (void) {
int r;
int counter=0;
for (counter=0; counter<2; counter++) {
struct extra_count e = {0,0};
double prevtime = gettime();
DBC *dbc;
r = db->cursor(db, tid, &dbc, 0); assert(r==0);
long rowcounter=0;
while (0 == (r = dbc->c_getf_next(dbc, DB_PRELOCKED, counttotalbytes, &e))) {
if (rowcounter%128==0) { printf("."); fflush(stdout); }
rowcounter++;
if (limitcount>0 && rowcounter>=limitcount) break;
}
r = dbc->c_close(dbc); assert(r==0);
double thistime = gettime();
double tdiff = thistime-prevtime;
printf("LWC Scan %lld bytes (%d rows) in %9.6fs at %9fMB/s\n", e.totalbytes, e.rowcounter, tdiff, 1e-6*e.totalbytes/tdiff);
struct extra_count e = {0,0};
double prevtime = gettime();
DBC *dbc;
r = db->cursor(db, tid, &dbc, 0); assert(r==0);
long rowcounter=0;
while (0 == (r = dbc->c_getf_next(dbc, DB_PRELOCKED, counttotalbytes, &e))) {
//if (rowcounter%128==0) { printf("."); fflush(stdout); }
rowcounter++;
if (limitcount>0 && rowcounter>=limitcount) break;
}
r = dbc->c_close(dbc); assert(r==0);
double thistime = gettime();
double tdiff = thistime-prevtime;
printf("LWC Scan %lld bytes (%d rows) in %9.6fs at %9fMB/s\n", e.totalbytes, e.rowcounter, tdiff, 1e-6*e.totalbytes/tdiff);
}
int main (int argc, const char *argv[]) {
......
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