git.samba.org
/
sahlberg
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea2ca76
)
Avoid floating point divide by 0 in ctdb_fetch.c's bench_fetch().
author
Martin Schwenke
<martin@meltin.net>
Tue, 21 Apr 2009 06:50:37 +0000
(16:50 +1000)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Tue, 12 May 2009 04:45:14 +0000
(14:45 +1000)
Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/src/ctdb_fetch.c
patch
|
blob
|
history
diff --git
a/tests/src/ctdb_fetch.c
b/tests/src/ctdb_fetch.c
index aab4fe118f9aa12f2db30da569e2ec48433e9c27..eecbb8416ad069d6a727af8a02bd14480ba2aee8 100644
(file)
--- a/
tests/src/ctdb_fetch.c
+++ b/
tests/src/ctdb_fetch.c
@@
-132,7
+132,7
@@
static void bench_fetch(struct ctdb_context *ctdb, struct event_context *ev)
start_timer();
while (end_timer() < timelimit) {
- if (pnn == 0 && msg_count % 100 == 0) {
+ if (pnn == 0 && msg_count % 100 == 0
&& end_timer() > 0
) {
printf("Fetch: %.2f msgs/sec\r", msg_count/end_timer());
fflush(stdout);
}