From 7d065b60de484867467b9472d3c7dcd3172aae7d Mon Sep 17 00:00:00 2001 From: Valentin Kuznetsov Date: Thu, 22 Sep 2022 10:44:20 -0400 Subject: [PATCH] Fix MB/GB total count --- httpgo.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/httpgo.go b/httpgo.go index 67be524..5f90d95 100644 --- a/httpgo.go +++ b/httpgo.go @@ -65,6 +65,12 @@ func genRecords(size string) ([]Record, error) { if err != nil { return nil, err } + if suffix == "MB" { + total *= 1024 + } + if suffix == "BB" { + total *= 1024 * 1024 + } records = genNRecords(total) return records, nil }