diff options
author | Susan LoVerso <sue@wiredtiger.com> | 2015-12-02 15:37:12 -0500 |
---|---|---|
committer | Susan LoVerso <sue@wiredtiger.com> | 2015-12-02 15:37:12 -0500 |
commit | d04d2ba924e8874979057177ea2331d9374145f8 (patch) | |
tree | 755db553c0c9f90491f727f5b018bc0869b2dd0f | |
parent | bff6525c8382d97221a4d08452aef78ed0b8ea25 (diff) | |
download | mongo-d04d2ba924e8874979057177ea2331d9374145f8.tar.gz |
WT-2256 Fix interval timer for wtperf throttling.
-rw-r--r-- | bench/wtperf/wtperf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c index 9ac96862fa1..899e5fd2887 100644 --- a/bench/wtperf/wtperf.c +++ b/bench/wtperf/wtperf.c @@ -2427,6 +2427,11 @@ worker_throttle(int64_t throttle, int64_t *ops, struct timespec *interval) if (usecs_to_complete < USEC_PER_SEC) (void)usleep((useconds_t)(USEC_PER_SEC - usecs_to_complete)); + /* + * After sleeping, set the interval to the current time. + */ + if (__wt_epoch(NULL, &now) != 0) + return; *ops = 0; *interval = now; } |