Browse Source

tdb2: add --no-sync argument to speed.

Running speed with --transaction --no-sync means no locking or syncs
are done, so we can measure raw TDB speed.
Rusty Russell 15 years ago
parent
commit
5f388eef7e
1 changed files with 5 additions and 0 deletions
  1. 5 0
      ccan/tdb2/tools/speed.c

+ 5 - 0
ccan/tdb2/tools/speed.c

@@ -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--;