summaryrefslogtreecommitdiff
path: root/source4/torture/nbench
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2004-10-18 13:58:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:00:01 -0500
commit9529b4948ec5ba1fe7268c86e8107174ac19f766 (patch)
tree41f89aa8537c6cd7dd44919e6a9c0ca698d4d7d9 /source4/torture/nbench
parent142d295aa8e70477c85d1835f2907f81c4c3c519 (diff)
downloadsamba-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)
Diffstat (limited to 'source4/torture/nbench')
-rw-r--r--source4/torture/nbench/nbench.c2
-rw-r--r--source4/torture/nbench/nbio.c6
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;