rakyll / hey

HTTP load generator, ApacheBench (ab) replacement
Apache License 2.0
17.65k stars 1.17k forks source link

Fix DNS dialup detailed output in print.go #207

Closed tstraley closed 3 years ago

tstraley commented 4 years ago

This addresses a bug that had the default 'Details' output showing the total fastest and total slowest request times in the DNS dialup min / max categories.

tstraley commented 4 years ago

Example with fixed output:

$ ./bin/hey_linux http://google.co.nz

Summary: Total: 0.5907 secs Slowest: 0.2314 secs Fastest: 0.0930 secs Average: 0.1384 secs Requests/sec: 338.5961

Response time histogram: 0.093 [1] |■ 0.107 [17] |■■■■■■■■■■■ 0.121 [63] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 0.135 [53] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 0.148 [11] |■■■■■■■ 0.162 [5] |■■■ 0.176 [13] |■■■■■■■■ 0.190 [14] |■■■■■■■■■ 0.204 [7] |■■■■ 0.218 [10] |■■■■■■ 0.231 [6] |■■■■

Latency distribution: 10% in 0.1107 secs 25% in 0.1167 secs 50% in 0.1240 secs 75% in 0.1628 secs 90% in 0.1937 secs 95% in 0.2127 secs 99% in 0.2275 secs

Details (average, fastest, slowest): DNS+dialup: 0.0094 secs, 0.0000 secs, 0.0463 secs DNS-lookup: 0.0052 secs, 0.0000 secs, 0.0290 secs req write: 0.0001 secs, 0.0000 secs, 0.0003 secs resp wait: 0.0749 secs, 0.0503 secs, 0.1155 secs resp read: 0.0029 secs, 0.0008 secs, 0.0091 secs

Status code distribution: [200] 200 responses

Notice that the Details section, DNS+dialup is now correct data relevant to the connection, rather than just a copy of the fastest and slowest requests (which is still presented in the summary).

FYI: looks like this bug was introduced in https://github.com/rakyll/hey/pull/97 when it moved from using ConnLats in the old print function to this current behavior.

tstraley commented 4 years ago

@rakyll is this repo still active? Any chance we can get some reviews on this tiny PR?