From e9eb862dc0cb100bf2ee3de367a20587346f85aa Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 17 May 2007 02:22:29 +0000 Subject: r22962: show progress separately for each client in RAW-BENCH-LOCK, this is much more useful for seeing why we get unbalanced locking (This used to be commit 1f1f57023b6d7d7d4938803e57f30e485ccba719) --- source4/torture/raw/lockbench.c | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'source4') diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c index d603878450..690ac85f17 100644 --- a/source4/torture/raw/lockbench.c +++ b/source4/torture/raw/lockbench.c @@ -54,6 +54,7 @@ struct benchlock_state { int fnum; int offset; int count; + int lastcount; union smb_lock io; struct smb_lock_entry lock[2]; struct smbcli_request *req; @@ -216,6 +217,22 @@ static void lock_completion(struct smbcli_request *req) } } + +static void report_rate(struct event_context *ev, struct timed_event *te, + struct timeval t, void *private_data) +{ + struct benchlock_state *state = talloc_get_type(private_data, + struct benchlock_state); + int i; + for (i=0;i