diff options
author | Jim McDonough <jmcd@samba.org> | 2004-10-18 13:58:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:00:01 -0500 |
commit | 9529b4948ec5ba1fe7268c86e8107174ac19f766 (patch) | |
tree | 41f89aa8537c6cd7dd44919e6a9c0ca698d4d7d9 | |
parent | 142d295aa8e70477c85d1835f2907f81c4c3c519 (diff) | |
download | samba-9529b4948ec5ba1fe7268c86e8107174ac19f766.tar.gz samba-9529b4948ec5ba1fe7268c86e8107174ac19f766.tar.bz2 samba-9529b4948ec5ba1fe7268c86e8107174ac19f766.zip |
r3040: Add sleeps between operations to nbench. Submitted by aliguori@us.ibm.com.
(This used to be commit b1bbf0a431a9bcfc786b773be1adf39eaccb0b6e)
-rw-r--r-- | source4/torture/nbench/nbench.c | 2 | ||||
-rw-r--r-- | source4/torture/nbench/nbio.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c index 316e87ce99..a649b5fa15 100644 --- a/source4/torture/nbench/nbench.c +++ b/source4/torture/nbench/nbench.c @@ -139,6 +139,8 @@ again: status); } else if (!strcmp(params[0],"Flush")) { nb_flush(ival(params[1]), status); + } else if (!strcmp(params[0],"Sleep")) { + nb_sleep(ival(params[1]), status); } else { printf("[%d] Unknown operation %s\n", nbench_line_count, params[0]); } diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c index 9b6ec7943d..35147c6de9 100644 --- a/source4/torture/nbench/nbio.c +++ b/source4/torture/nbench/nbio.c @@ -618,6 +618,12 @@ void nb_flush(int fnum, NTSTATUS status) check_status("Flush", status, ret); } +void nb_sleep(int usec, NTSTATUS status) +{ + (void)status; + sys_usleep(usec); +} + void nb_deltree(const char *dname) { int total_deleted; |