Skip to content

Commit

Permalink
Merge branch 'master' into feature/macosx-build
Browse files Browse the repository at this point in the history
  • Loading branch information
giltene authored Mar 3, 2018
2 parents 01a8ef1 + 089c1a7 commit cdf4be4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# wrk2
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/giltene/wrk2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/giltene/wrk2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

**a HTTP benchmarking tool based mostly on wrk**

Expand Down Expand Up @@ -323,20 +323,20 @@ A note about wrk2's latency measurement technique:

The model I chose for avoiding Coordinated Omission in wrk2 combines
the use of constant throughput load generation with latency
measurement that takes the intended constant throughout into account.
measurement that takes the intended constant throughput into account.
Rather than measure response latency from the time that the actual
transmission of a request occurred, wrk2 measures response latency
from the time the transmission *should* have occurred according to the
constant throughput configured for the run. When responses take longer
than normal (arriving later than the next request should have been sent),
the true latency of the subsequent requests will be appropriately
reflected in teh recorded latency stats.
reflected in the recorded latency stats.

Note: This technique can be applied to variable throughout loaders.
Note: This technique can be applied to variable throughput loaders.
It requires a "model" or "plan" that can provide the intended
start time if each request. Constant throughout load generators
start time if each request. Constant throughput load generators
Make this trivial to model. More complicated schemes (such as
varying throughout or stochastic arrival models) would likely
varying throughput or stochastic arrival models) would likely
require a detailed model and some memory to provide this
information.

Expand Down
4 changes: 2 additions & 2 deletions src/wrk.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ int main(int argc, char **argv) {
}

uint64_t connections = cfg.connections / cfg.threads;
uint64_t throughput = cfg.rate / cfg.threads;
double throughput = (double)cfg.rate / cfg.threads;
uint64_t stop_at = time_us() + (cfg.duration * 1000000);

for (uint64_t i = 0; i < cfg.threads; i++) {
thread *t = &threads[i];
t->loop = aeCreateEventLoop(10 + cfg.connections * 3);
t->connections = connections;
t->throughput = throughput;;
t->throughput = throughput;
t->stop_at = stop_at;

t->L = script_create(cfg.script, url, headers);
Expand Down

0 comments on commit cdf4be4

Please sign in to comment.