5b8c4168d4807c729fc8b1f199d9eb03c9411069 galt Thu Mar 3 18:40:54 2016 -0800 Replacing simple literal NOSQLINJ in string with the #define NOSQLINJ. This is slightly better because the compiler can catch a mis-spelling of the NOSQLINJ keyword. This was suggested by Angie. diff --git src/hg/qa/timePosTable.c src/hg/qa/timePosTable.c index de28652..a71c301 100644 --- src/hg/qa/timePosTable.c +++ src/hg/qa/timePosTable.c @@ -135,31 +135,31 @@ static double timePass(int pass, struct sqlConnection *conn, char *table, int size, struct chromSize *chroms) /* one time pass for the given size */ { struct chromRange *ranges = buildRanges(size, chroms); long startTime = clock1000(); struct chromRange *range; for (range = ranges; range != NULL; range = range->next) queryRange(conn, table, range); double elapsed = ((double)(clock1000()-startTime))/1000.0; printf("pass: %d range size: %d ranges: %d time: %g seconds\n", pass, size, slCount(ranges), elapsed); slFreeList(&ranges); -sqlUpdate(conn, "NOSQLINJ flush tables"); +sqlUpdate(conn, NOSQLINJ "flush tables"); return elapsed; } static void timePosTableIter(char *db, char *table, int minSize, int maxSize, int sizeMult, int iter, struct chromSize *chroms) /* run one iteration of test */ { struct sqlConnection *conn = sqlConnect(db); double totalTime = 0.0; int sz; int pass = 0; for (sz = minSize; sz <= maxSize; sz *= sizeMult, pass++) totalTime += timePass(pass, conn, table, sz, chroms); printf("iteration: %d passes: %d time: %g seconds\n", iter, pass, totalTime);