projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
001b263
)
[PATCH] BTT patch: Fix problem with short runs
author
Jens Axboe
<jens.axboe@oracle.com>
Fri, 1 Dec 2006 09:52:20 +0000
(10:52 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Fri, 1 Dec 2006 09:52:20 +0000
(10:52 +0100)
Found a problem that if BTT took less than 1 second to execute, we'd get
Ktps of <nan> - this fixes that...
Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
btt/bt_timeline.c
patch
|
blob
|
blame
|
history
diff --git
a/btt/bt_timeline.c
b/btt/bt_timeline.c
index fa5678087b69de800007aa5326a5cd4ffc61f37c..e6522c9d69df1e6cdaac7bf69b01d177b3d4ae15 100644
(file)
--- a/
btt/bt_timeline.c
+++ b/
btt/bt_timeline.c
@@
-94,7
+94,8
@@
int process(void)
latency_clean();
if (verbose) {
- double tps = (double)n_traces / (double)(time(NULL) - genesis);
+ double tps = (double)n_traces /
+ (double)((time(NULL) + 1) - genesis);
printf("%10lu traces @ %.1lf Ktps\n", n_traces, tps/1000.0);
}