[dbench @ tridge@samba.org-20070727061212-fqo949vuzzlryi1d]
authorAndrew Tridgell <tridge@samba.org>
Fri, 27 Jul 2007 06:12:12 +0000 (16:12 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 27 Jul 2007 06:12:12 +0000 (16:12 +1000)
added --skip-cleanup

child.c
dbench.c
dbench.h

diff --git a/child.c b/child.c
index afcc5926225615067074246e3da183b4d159a936..315c709138d91a4f98bde3184f71c69bd9873631 100644 (file)
--- a/child.c
+++ b/child.c
@@ -270,7 +270,9 @@ done:
        for (child=child0;child<child0+options.clients_per_process;child++) {
                child->cleanup = 1;
                fflush(stdout);
-               nb_cleanup(child);
+               if (!options.skip_cleanup) {
+                       nb_cleanup(child);
+               }
                child->cleanup_finished = 1;
        }
 }
index d677555355f4a5216b7f5073e0e2b544f8f7ce61..c0898f68eafcf6b263d3f40e978d462e84dc8021 100644 (file)
--- a/dbench.c
+++ b/dbench.c
@@ -392,6 +392,8 @@ static int process_opts(int argc, const char **argv)
                  "check for pointless calls with stat", NULL },
                { "fake-io", 0, POPT_ARG_NONE, &options.fake_io, 0, 
                  "fake up read/write calls", NULL },
+               { "skip-cleanup", 0, POPT_ARG_NONE, &options.skip_cleanup, 0, 
+                 "skip cleanup operations", NULL },
                POPT_TABLEEND
        };
        poptContext pc;
index 75d8d5b3db0a12b4328eba55129bc39615548cf4..799ce1573f9c712efbec7479a041537873e7eda7 100644 (file)
--- a/dbench.h
+++ b/dbench.h
@@ -159,6 +159,7 @@ struct options {
        int one_byte_write_fix;
        int stat_check;
        int fake_io;
+       int skip_cleanup;
 };
 
 /* CreateDisposition field. */