@@ -382,7 +382,7 @@ func TestApproximateHistogram(t *testing.T) {
382382 histo .AddPoint (10 )
383383 }
384384
385- mean , median , min , p10 , p30 , p70 , p90 , max , count , poolSize := histo .GetStats ()
385+ mean , median , minimum , p10 , p30 , p70 , p90 , maximum , count , poolSize := histo .GetStats ()
386386
387387 if count != 20 {
388388 t .Errorf ("wrong count before reset, expected 20, got %d" , count )
@@ -392,7 +392,7 @@ func TestApproximateHistogram(t *testing.T) {
392392 t .Errorf ("wrong poolSize, expected 20, got %d" , poolSize )
393393 }
394394
395- if mean != 10 || median != 10 || min != 10 || p10 != 10 || p30 != 10 || p70 != 10 || p90 != 10 || max != 10 {
395+ if mean != 10 || median != 10 || minimum != 10 || p10 != 10 || p30 != 10 || p70 != 10 || p90 != 10 || maximum != 10 {
396396 t .Errorf ("one of the values is not 10 when it should be 10, mean %v, median %v, 10p %v, 30p %v, 70p %v, 90p %v" , mean , median , p10 , p30 , p70 , p90 )
397397 }
398398
@@ -410,7 +410,7 @@ func TestApproximateHistogram(t *testing.T) {
410410 histo .AddPoint (10 )
411411 }
412412
413- mean , median , min , p10 , p30 , p70 , p90 , max , count , poolSize = histo .GetStats ()
413+ mean , median , minimum , p10 , p30 , p70 , p90 , maximum , count , poolSize = histo .GetStats ()
414414
415415 if count != 2000 {
416416 t .Errorf ("wrong count before reset, expected 2000, got %d" , count )
@@ -420,7 +420,7 @@ func TestApproximateHistogram(t *testing.T) {
420420 t .Errorf ("wrong poolSize, expected 500, got %d" , poolSize )
421421 }
422422
423- if mean != 10 || median != 10 || min != 10 || p10 != 10 || p30 != 10 || p70 != 10 || p90 != 10 || max != 10 {
423+ if mean != 10 || median != 10 || minimum != 10 || p10 != 10 || p30 != 10 || p70 != 10 || p90 != 10 || maximum != 10 {
424424 t .Errorf ("one of the values is not 10 when it should be 10, mean %v, median %v, 10p %v, 30p %v, 70p %v, 90p %v" , mean , median , p10 , p30 , p70 , p90 )
425425 }
426426
@@ -438,7 +438,7 @@ func TestApproximateHistogram(t *testing.T) {
438438 histo .AddPoint ((float64 (rand .Int63n (100 ))))
439439 }
440440
441- mean , median , min , p10 , p30 , p70 , p90 , max , count , poolSize = histo .GetStats ()
441+ mean , median , minimum , p10 , p30 , p70 , p90 , maximum , count , poolSize = histo .GetStats ()
442442
443443 if count != 10000 {
444444 t .Errorf ("wrong count before reset, expected 10000, got %d" , count )
@@ -456,8 +456,8 @@ func TestApproximateHistogram(t *testing.T) {
456456 t .Errorf ("wrong median value, expected 50+-10 got %v" , median )
457457 }
458458
459- if float64 (min ) > 10 {
460- t .Errorf ("wrong min value, expected 0+-10 got %v" , min )
459+ if float64 (minimum ) > 10 {
460+ t .Errorf ("wrong min value, expected 0+-10 got %v" , minimum )
461461 }
462462
463463 if math .Abs (float64 (p10 - 10 )) > 10 {
@@ -476,8 +476,8 @@ func TestApproximateHistogram(t *testing.T) {
476476 t .Errorf ("wrong 90p value, expected 90+-10 got %v" , p90 )
477477 }
478478
479- if math .Abs (float64 (max - 100 )) > 10 {
480- t .Errorf ("wrong max value, expected 100+-10 got %v" , max )
479+ if math .Abs (float64 (maximum - 100 )) > 10 {
480+ t .Errorf ("wrong max value, expected 100+-10 got %v" , maximum )
481481 }
482482}
483483
0 commit comments