projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Provide some consistency in rate_* options
[fio.git]
/
backend.c
diff --git
a/backend.c
b/backend.c
index 85a981dc4d3fdf05183661fd9b012522a60c2aed..b329fa31f62dc929a5bb7c5796b27a2dd03d1cd2 100644
(file)
--- a/
backend.c
+++ b/
backend.c
@@
-783,9
+783,15
@@
static long long usec_for_io(struct thread_data *td, enum fio_ddir ddir)
bps = td->rate_bps[ddir];
if (td->o.poisson_rate) {
bps = td->rate_bps[ddir];
if (td->o.poisson_rate) {
+ uint64_t val;
iops = bps / td->o.bs[ddir];
iops = bps / td->o.bs[ddir];
- td->last_usec += (int64_t) (1000000 / iops) *
- -logf(__rand_0_1(&td->poisson_state));
+ val = (int64_t) (1000000 / iops) *
+ -logf(__rand_0_1(&td->poisson_state));
+ if (val) {
+ dprint(FD_RATE, "poisson rate iops=%llu\n",
+ (unsigned long long) 1000000 / val);
+ }
+ td->last_usec += val;
return td->last_usec;
} else if (bps) {
secs = bytes / bps;
return td->last_usec;
} else if (bps) {
secs = bytes / bps;