Closed dewey closed 7 years ago
I think I found a small bug in the code that does the calculations for the total amount of time. If you set all values to 0 (for example if there's an outtage) the result is 9223372036854 instead of 0.
9223372036854
0
result := httpstat.Result{ DNSLookup: 0.0, TCPConnection: 0.0, TLSHandshake: 0.0, ServerProcessing: 0.0, NameLookup: 0.0, Connect: 0.0, Pretransfer: 0.0, StartTransfer: 0.0, } result.End(time.Now())
If you print result:
result
TLSHandshake: 0 ms, Total: 9223372036854 ms, StartTransfer: 0 ms, DNSLookup: 0 ms, TCPConnection: 0 ms, ServerProcessing: 0 ms, ContentTransfer: 9223372036854 ms, NameLookup: 0 ms, Connect: 0 ms, Pretransfer: 0 ms
Thank you for reporting issue.
Fixed it on https://github.com/tcnksm/go-httpstat/pull/9
I think I found a small bug in the code that does the calculations for the total amount of time. If you set all values to 0 (for example if there's an outtage) the result is
9223372036854
instead of0
.If you print
result
: