]> git.ozlabs.org Git - ccan/commitdiff
tdb2: add --no-sync argument to speed.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 28 Mar 2011 03:51:55 +0000 (14:21 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 28 Mar 2011 03:51:55 +0000 (14:21 +1030)
Running speed with --transaction --no-sync means no locking or syncs
are done, so we can measure raw TDB speed.

ccan/tdb2/tools/speed.c

index 06dc45f6327890f3688a74655ff66c8146b06deb..216a051fe9f060dae65d96de48fa53f9f0bb8ee3 100644 (file)
@@ -125,6 +125,11 @@ int main(int argc, char *argv[])
                argc--;
                argv++;
        }
+       if (argv[1] && strcmp(argv[1], "--no-sync") == 0) {
+               flags |= TDB_NOSYNC;
+               argc--;
+               argv++;
+       }
        if (argv[1] && strcmp(argv[1], "--stats") == 0) {
                seed.base.next = &stats;
                argc--;