Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/project/flagsets' into task/sdk-…
Browse files Browse the repository at this point in the history
…controller-fagsets
  • Loading branch information
mredolatti committed Nov 11, 2023
2 parents ef035eb + fd643a5 commit c114120
Show file tree
Hide file tree
Showing 7 changed files with 207 additions and 23 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/gin-gonic/gin v1.9.1
github.com/google/uuid v1.3.0
github.com/splitio/gincache v1.0.1
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231004184048-81902536fc1f
github.com/splitio/go-toolkit/v5 v5.3.2-0.20230920032539-d08915cf020a
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231107204809-f5ccd6663702
github.com/splitio/go-toolkit/v5 v5.3.2-0.20231106173125-49e72b9823dc
github.com/stretchr/testify v1.8.4
go.etcd.io/bbolt v1.3.6
)
Expand All @@ -28,7 +28,6 @@ require (
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
Expand All @@ -43,9 +42,10 @@ require (
github.com/ugorji/go/codec v1.2.11 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
19 changes: 10 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand Down Expand Up @@ -90,10 +90,10 @@ github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUA
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/splitio/gincache v1.0.1 h1:dLYdANY/BqH4KcUMCe/LluLyV5WtuE/LEdQWRE06IXU=
github.com/splitio/gincache v1.0.1/go.mod h1:CcgJDSM9Af75kyBH0724v55URVwMBuSj5x1eCWIOECY=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231004184048-81902536fc1f h1:g3rsXA0cdMx2uz3MrTEz2tiittf+HDXpHooyYnuYg6w=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231004184048-81902536fc1f/go.mod h1:ksVZQYLs+3ZuzU81vEvf1aCjk24pdrVWjUXNq6Qcayo=
github.com/splitio/go-toolkit/v5 v5.3.2-0.20230920032539-d08915cf020a h1:2wjh5hSGlFRuh6Lbmodr0VRqtry2m9pEBNmwiLsY+ss=
github.com/splitio/go-toolkit/v5 v5.3.2-0.20230920032539-d08915cf020a/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231107204809-f5ccd6663702 h1:cwtkbzpL53TtVmWyE4o+JuT8KuDImvuZXscdKBR28/0=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231107204809-f5ccd6663702/go.mod h1:PSkBLDXQW7NAhZ7JO1va7QJyTeDvpE7MEDnTdn5evRM=
github.com/splitio/go-toolkit/v5 v5.3.2-0.20231106173125-49e72b9823dc h1:14jdJE/rBEYfs1CO8kOQrj/8azszRFU4yw5FQIGpoJg=
github.com/splitio/go-toolkit/v5 v5.3.2-0.20231106173125-49e72b9823dc/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
Expand Down Expand Up @@ -124,6 +124,8 @@ golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
Expand All @@ -136,15 +138,14 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
Expand Down
2 changes: 1 addition & 1 deletion splitio/commitversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ This file is created automatically, please do not edit
*/

// CommitVersion is the version of the last commit previous to release
const CommitVersion = "4867a2d"
const CommitVersion = "ef035eb"
30 changes: 25 additions & 5 deletions splitio/producer/storage/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,15 @@ func setLatency(result MultiMethodLatencies, metadata *dtos.Metadata, method str

if _, ok := result[*metadata]; !ok {
result[*metadata] = dtos.MethodLatencies{
Treatment: make([]int64, telemetry.LatencyBucketCount),
Treatments: make([]int64, telemetry.LatencyBucketCount),
TreatmentWithConfig: make([]int64, telemetry.LatencyBucketCount),
TreatmentsWithConfig: make([]int64, telemetry.LatencyBucketCount),
Track: make([]int64, telemetry.LatencyBucketCount),
Treatment: make([]int64, telemetry.LatencyBucketCount),
Treatments: make([]int64, telemetry.LatencyBucketCount),
TreatmentWithConfig: make([]int64, telemetry.LatencyBucketCount),
TreatmentsWithConfig: make([]int64, telemetry.LatencyBucketCount),
TreatmentsByFlagSet: make([]int64, telemetry.LatencyBucketCount),
TreatmentsByFlagSets: make([]int64, telemetry.LatencyBucketCount),
TreatmentsWithConfigByFlagSet: make([]int64, telemetry.LatencyBucketCount),
TreatmentsWithConfigByFlagSets: make([]int64, telemetry.LatencyBucketCount),
Track: make([]int64, telemetry.LatencyBucketCount),
}
}

Expand All @@ -194,6 +198,14 @@ func setLatency(result MultiMethodLatencies, metadata *dtos.Metadata, method str
result[*metadata].TreatmentWithConfig[bucket] = count
case telemetry.TreatmentsWithConfig:
result[*metadata].TreatmentsWithConfig[bucket] = count
case telemetry.TreatmentsByFlagSet:
result[*metadata].TreatmentsByFlagSet[bucket] = count
case telemetry.TreatmentsByFlagSets:
result[*metadata].TreatmentsByFlagSets[bucket] = count
case telemetry.TreatmentsWithConfigByFlagSet:
result[*metadata].TreatmentsWithConfigByFlagSet[bucket] = count
case telemetry.TreatmentsWithConfigByFlagSets:
result[*metadata].TreatmentsWithConfigByFlagSets[bucket] = count
case telemetry.Track:
result[*metadata].Track[bucket] = count
default:
Expand Down Expand Up @@ -232,6 +244,14 @@ func setException(result MultiMethodExceptions, metadata *dtos.Metadata, method
curr.TreatmentWithConfig = count
case telemetry.TreatmentsWithConfig:
curr.TreatmentsWithConfig = count
case telemetry.TreatmentsByFlagSet:
curr.TreatmentsByFlagSet = count
case telemetry.TreatmentsByFlagSets:
curr.TreatmentsByFlagSets = count
case telemetry.TreatmentsWithConfigByFlagSet:
curr.TreatmentsWithConfigByFlagSet = count
case telemetry.TreatmentsWithConfigByFlagSets:
curr.TreatmentsWithConfigByFlagSets = count
case telemetry.Track:
curr.Track = count
default:
Expand Down
132 changes: 132 additions & 0 deletions splitio/producer/storage/telemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ func TestRedisTelemetryExceptions(t *testing.T) {
producer1.RecordException(telemetry.Treatment)
producer1.RecordException(telemetry.Treatments)
producer1.RecordException(telemetry.Treatments)
producer1.RecordException(telemetry.TreatmentsByFlagSet)
producer1.RecordException(telemetry.TreatmentsByFlagSet)
producer1.RecordException(telemetry.TreatmentsByFlagSet)
producer1.RecordException(telemetry.TreatmentsByFlagSet)
producer1.RecordException(telemetry.TreatmentsByFlagSets)
producer1.RecordException(telemetry.TreatmentsByFlagSets)
producer1.RecordException(telemetry.TreatmentsWithConfigByFlagSet)
producer1.RecordException(telemetry.TreatmentsWithConfigByFlagSet)
producer1.RecordException(telemetry.TreatmentsWithConfigByFlagSet)
producer1.RecordException(telemetry.TreatmentsWithConfigByFlagSets)
producer1.RecordException(telemetry.TreatmentsWithConfigByFlagSets)
producer1.RecordException(telemetry.TreatmentsWithConfigByFlagSets)
producer1.RecordException(telemetry.TreatmentsWithConfigByFlagSets)
producer1.RecordException(telemetry.TreatmentsWithConfigByFlagSets)
producer1.RecordException(telemetry.TreatmentWithConfig)
producer1.RecordException(telemetry.TreatmentWithConfig)
producer1.RecordException(telemetry.TreatmentWithConfig)
Expand All @@ -81,6 +95,16 @@ func TestRedisTelemetryExceptions(t *testing.T) {
producer2.RecordException(telemetry.Treatments)
producer2.RecordException(telemetry.Treatments)
producer2.RecordException(telemetry.Treatments)
producer2.RecordException(telemetry.TreatmentsByFlagSet)
producer2.RecordException(telemetry.TreatmentsByFlagSet)
producer2.RecordException(telemetry.TreatmentsByFlagSet)
producer2.RecordException(telemetry.TreatmentsByFlagSets)
producer2.RecordException(telemetry.TreatmentsWithConfigByFlagSet)
producer2.RecordException(telemetry.TreatmentsWithConfigByFlagSet)
producer2.RecordException(telemetry.TreatmentsWithConfigByFlagSets)
producer2.RecordException(telemetry.TreatmentsWithConfigByFlagSets)
producer2.RecordException(telemetry.TreatmentsWithConfigByFlagSets)

producer2.RecordException(telemetry.TreatmentWithConfig)
producer2.RecordException(telemetry.TreatmentWithConfig)
producer2.RecordException(telemetry.TreatmentWithConfig)
Expand Down Expand Up @@ -120,6 +144,22 @@ func TestRedisTelemetryExceptions(t *testing.T) {
t.Error("exception count for track in metadata1 should be 5. Was: ", excsForM1.Track)
}

if excsForM1.TreatmentsByFlagSet != 4 {
t.Error("exception count for treatmentsByFlagSet in metadata1 should be 4. Was: ", excsForM1.TreatmentsByFlagSet)
}

if excsForM1.TreatmentsByFlagSets != 2 {
t.Error("exception count for treatmentsByFlagSets in metadata1 should be 2. Was: ", excsForM1.TreatmentsByFlagSets)
}

if excsForM1.TreatmentsWithConfigByFlagSet != 3 {
t.Error("exception count for treatmentsWithConfigByFlagSet in metadata1 should be 3. Was: ", excsForM1.TreatmentsWithConfigByFlagSet)
}

if excsForM1.TreatmentsWithConfigByFlagSets != 5 {
t.Error("exception count for treatmentsWithConfigByFlagSets in metadata1 should be 5. Was: ", excsForM1.TreatmentsWithConfigByFlagSets)
}

excsForM2, ok := exceptions[metadata2]
if !ok {
t.Error("exceptions for metadata2 should be present")
Expand All @@ -145,6 +185,22 @@ func TestRedisTelemetryExceptions(t *testing.T) {
t.Error("exception count for track in metadata1 should be 1. Was: ", excsForM2.Track)
}

if excsForM2.TreatmentsByFlagSet != 3 {
t.Error("exception count for treatmentsByFlagSet in metadata2 should be 3. Was: ", excsForM2.TreatmentsByFlagSet)
}

if excsForM2.TreatmentsByFlagSets != 1 {
t.Error("exception count for treatmentsByFlagSets in metadata2 should be 1. Was: ", excsForM2.TreatmentsByFlagSets)
}

if excsForM2.TreatmentsWithConfigByFlagSet != 2 {
t.Error("exception count for treatmentsWithConfigByFlagSet in metadata2 should be 2. Was: ", excsForM2.TreatmentsWithConfigByFlagSet)
}

if excsForM2.TreatmentsWithConfigByFlagSets != 3 {
t.Error("exception count for treatmentsWithConfigByFlagSets in metadata2 should be 3. Was: ", excsForM2.TreatmentsWithConfigByFlagSets)
}

exceptions = consumer.PopExceptions()
if len(exceptions) > 0 {
t.Error("no more exceptions should have been fetched from redis. Got:", exceptions)
Expand Down Expand Up @@ -172,12 +228,24 @@ func TestRedisTelemetryLatencies(t *testing.T) {
producer1.RecordLatency(telemetry.Treatments, 2*time.Second)
producer1.RecordLatency(telemetry.TreatmentWithConfig, 3*time.Second)
producer1.RecordLatency(telemetry.TreatmentsWithConfig, 4*time.Second)
producer1.RecordLatency(telemetry.TreatmentsByFlagSet, 2*time.Second)
producer1.RecordLatency(telemetry.TreatmentsByFlagSets, 4*time.Second)
producer1.RecordLatency(telemetry.TreatmentsWithConfigByFlagSet, 3*time.Second)
producer1.RecordLatency(telemetry.TreatmentsWithConfigByFlagSet, 6*time.Second)
producer1.RecordLatency(telemetry.TreatmentsWithConfigByFlagSets, 5*time.Second)
producer1.RecordLatency(telemetry.Track, 5*time.Second)

producer2.RecordLatency(telemetry.Treatment, 5*time.Second)
producer2.RecordLatency(telemetry.Treatments, 4*time.Second)
producer2.RecordLatency(telemetry.TreatmentWithConfig, 3*time.Second)
producer2.RecordLatency(telemetry.TreatmentsWithConfig, 2*time.Second)
producer2.RecordLatency(telemetry.TreatmentsByFlagSet, 4*time.Second)
producer2.RecordLatency(telemetry.TreatmentsByFlagSet, 1*time.Second)
producer2.RecordLatency(telemetry.TreatmentsByFlagSets, 2*time.Second)
producer2.RecordLatency(telemetry.TreatmentsWithConfigByFlagSet, 5*time.Second)
producer2.RecordLatency(telemetry.TreatmentsWithConfigByFlagSets, 1*time.Second)
producer2.RecordLatency(telemetry.TreatmentsWithConfigByFlagSets, 2*time.Second)
producer2.RecordLatency(telemetry.TreatmentsWithConfigByFlagSets, 3*time.Second)
producer2.RecordLatency(telemetry.Track, 1*time.Second)

consumer := NewRedisTelemetryCosumerclient(client, logger)
Expand Down Expand Up @@ -224,6 +292,38 @@ func TestRedisTelemetryLatencies(t *testing.T) {
t.Error("latency count for .TreatmentsWithConfig should be 1. Is: ", l1TreatmentsWithConfig)
}

l1TreatmentsByFlagSet := int64(0)
for _, count := range latsForM1.TreatmentsByFlagSet {
l1TreatmentsByFlagSet += count
}
if l1TreatmentsByFlagSet != int64(1) {
t.Error("latency count for .TreatmentsByFlagSet should be 1. Is: ", l1TreatmentsByFlagSet)
}

l1TreatmentsByFlagSets := int64(0)
for _, count := range latsForM1.TreatmentsByFlagSets {
l1TreatmentsByFlagSets += count
}
if l1TreatmentsByFlagSets != int64(1) {
t.Error("latency count for .TreatmentsByFlagSet should be 1. Is: ", l1TreatmentsByFlagSets)
}

l1TreatmentsWithConfigByFlagSet := int64(0)
for _, count := range latsForM1.TreatmentsWithConfigByFlagSet {
l1TreatmentsWithConfigByFlagSet += count
}
if l1TreatmentsWithConfigByFlagSet != int64(2) {
t.Error("latency count for .TreatmentsWithConfigByFlagSet should be 2. Is: ", l1TreatmentsWithConfigByFlagSet)
}

l1TreatmentsWithConfigByFlagSets := int64(0)
for _, count := range latsForM1.TreatmentsWithConfigByFlagSets {
l1TreatmentsWithConfigByFlagSets += count
}
if l1TreatmentsWithConfigByFlagSets != int64(1) {
t.Error("latency count for .TreatmentsWithConfigByFlagSets should be 1. Is: ", l1TreatmentsWithConfigByFlagSets)
}

l1Track := int64(0)
for _, count := range latsForM1.Track {
l1Track += count
Expand Down Expand Up @@ -269,6 +369,38 @@ func TestRedisTelemetryLatencies(t *testing.T) {
t.Error("latency count for .TreatmentsWithConfig should be 1. Is: ", l2TreatmentsWithConfig)
}

l2TreatmentsByFlagSet := int64(0)
for _, count := range latsForM2.TreatmentsByFlagSet {
l2TreatmentsByFlagSet += count
}
if l2TreatmentsByFlagSet != int64(2) {
t.Error("latency count for .TreatmentsByFlagSet should be 1. Is: ", l2TreatmentsByFlagSet)
}

l2TreatmentsByFlagSets := int64(0)
for _, count := range latsForM2.TreatmentsByFlagSets {
l2TreatmentsByFlagSets += count
}
if l2TreatmentsByFlagSets != int64(1) {
t.Error("latency count for .TreatmentsByFlagSet should be 1. Is: ", l2TreatmentsByFlagSets)
}

l2TreatmentsWithConfigByFlagSet := int64(0)
for _, count := range latsForM2.TreatmentsWithConfigByFlagSet {
l2TreatmentsWithConfigByFlagSet += count
}
if l2TreatmentsWithConfigByFlagSet != int64(1) {
t.Error("latency count for .TreatmentsWithConfigByFlagSet should be 1. Is: ", l2TreatmentsWithConfigByFlagSet)
}

l2TreatmentsWithConfigByFlagSets := int64(0)
for _, count := range latsForM2.TreatmentsWithConfigByFlagSets {
l2TreatmentsWithConfigByFlagSets += count
}
if l2TreatmentsWithConfigByFlagSets != int64(3) {
t.Error("latency count for .TreatmentsWithConfigByFlagSets should be 3. Is: ", l2TreatmentsWithConfigByFlagSets)
}

l2Track := int64(0)
for _, count := range latsForM2.Track {
l2Track += count
Expand Down
Loading

0 comments on commit c114120

Please sign in to comment.