From f4a40e79b976512113993c1b3e371624e01ce041 Mon Sep 17 00:00:00 2001 From: Todd Gruben Date: Fri, 19 Nov 2021 12:08:24 -0600 Subject: [PATCH] final cleanup --- cmd/random-query/main.go | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/cmd/random-query/main.go b/cmd/random-query/main.go index 0fcd71ce9..bef9a92c2 100644 --- a/cmd/random-query/main.go +++ b/cmd/random-query/main.go @@ -42,22 +42,23 @@ import ( // RandomQueryConfig type RandomQueryConfig struct { - HostPort string - TreeDepth int - QueryCount int - Verbose bool - NumRuns int - TimeFromArg string - TimeToArg string - TimeFrom time.Time - TimeTo time.Time - TimeRange int64 - Index string - QPM int - Seed int - SrcFile string - Duration time.Duration - Target vegeta.Target + HostPort string + TreeDepth int + QueryCount int + Verbose bool + GenerateOnly bool + NumRuns int + TimeFromArg string + TimeToArg string + TimeFrom time.Time + TimeTo time.Time + TimeRange int64 + Index string + QPM int + Seed int + SrcFile string + Duration time.Duration + Target vegeta.Target IndexMap map[string]*Features @@ -441,13 +442,6 @@ func (cfg *RandomQueryConfig) AddIntField(index, field string, min, max pql.Deci f = &Features{} cfg.IndexMap[index] = f } - vprint.VV("Add: %s %v %v %v", field, min, max, scale) - /* if min.Scale != scale || max.Scale != scale { - - PanicOn(fmt.Sprintf("scale error; %v:%v min scale %d, max scale %d, field scale %d, assumed they'd be equal", - index, field, min.Scale, max.Scale, scale)) - } - */ effectiveRange := uint64(max.Value) - uint64(min.Value) + 1 // if you have INT64_MAX and INT64_MIN, effectiveRange is 1<<64, which