From d06438ff7414abfcc5a2a1bd13a935ee594f0842 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Sun, 5 Jun 2022 03:32:17 -0400 Subject: [Feature] Add -extended-stats for *nix platforms On *nix platforms, there is now a `-extended-stats` option that will print out some extended statistics for the test. The statistics are based on information gleaned from the `TCP_INFO` of the underlying TCP connections. What is implemented so far is just a proof of concept of the extended stats that could be calculated. Depending on what users want, we can add additional extended statistics. --- utilities/utilities.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'utilities/utilities.go') diff --git a/utilities/utilities.go b/utilities/utilities.go index 7e26ab9..76acbd2 100644 --- a/utilities/utilities.go +++ b/utilities/utilities.go @@ -123,10 +123,9 @@ func RandBetween(max int) int { return rand.New(rand.NewSource(int64(time.Now().Nanosecond()))).Int() % max } -type NotImplemented struct { - Functionality string -} - -func (ni *NotImplemented) Error() string { - return fmt.Sprintf("%v not implemented.\n", ni.Functionality) +func Max(x, y uint64) uint64 { + if x > y { + return x + } + return y } -- cgit v1.2.3