@@ -286,33 +286,33 @@ func TestFilterSeriesMoreThanOrEqual(t *testing.T) {
286
286
)
287
287
}
288
288
289
- func testFilterSeries (name string , fn string , operator string , threshhold float64 , in []models.Series , out []models.Series , t * testing.T ) {
289
+ func testFilterSeries (name string , fn string , operator string , threshold float64 , in []models.Series , out []models.Series , t * testing.T ) {
290
290
f := NewFilterSeries ()
291
291
f .(* FuncFilterSeries ).in = NewMock (in )
292
292
f .(* FuncFilterSeries ).fn = fn
293
293
f .(* FuncFilterSeries ).operator = operator
294
- f .(* FuncFilterSeries ).threshhold = threshhold
294
+ f .(* FuncFilterSeries ).threshold = threshold
295
295
gots , err := f .Exec (make (map [Req ][]models.Series ))
296
296
if err != nil {
297
- t .Fatalf ("case %q (%s, %s, %f): err should be nil. got %q" , name , fn , operator , threshhold , err )
297
+ t .Fatalf ("case %q (%s, %s, %f): err should be nil. got %q" , name , fn , operator , threshold , err )
298
298
}
299
299
if len (gots ) != len (out ) {
300
- t .Fatalf ("case %q (%s, %s, %f): isNonNull len output expected %d, got %d" , name , fn , operator , threshhold , len (out ), len (gots ))
300
+ t .Fatalf ("case %q (%s, %s, %f): isNonNull len output expected %d, got %d" , name , fn , operator , threshold , len (out ), len (gots ))
301
301
}
302
302
for i , g := range gots {
303
303
exp := out [i ]
304
304
if g .Target != exp .Target {
305
- t .Fatalf ("case %q (%s, %s, %f): expected target %q, got %q" , name , fn , operator , threshhold , exp .Target , g .Target )
305
+ t .Fatalf ("case %q (%s, %s, %f): expected target %q, got %q" , name , fn , operator , threshold , exp .Target , g .Target )
306
306
}
307
307
if len (g .Datapoints ) != len (exp .Datapoints ) {
308
- t .Fatalf ("case %q (%s, %s, %f) len output expected %d, got %d" , name , fn , operator , threshhold , len (exp .Datapoints ), len (g .Datapoints ))
308
+ t .Fatalf ("case %q (%s, %s, %f) len output expected %d, got %d" , name , fn , operator , threshold , len (exp .Datapoints ), len (g .Datapoints ))
309
309
}
310
310
for j , p := range g .Datapoints {
311
311
bothNaN := math .IsNaN (p .Val ) && math .IsNaN (exp .Datapoints [j ].Val )
312
312
if (bothNaN || p .Val == exp .Datapoints [j ].Val ) && p .Ts == exp .Datapoints [j ].Ts {
313
313
continue
314
314
}
315
- t .Fatalf ("case %q (%s, %s, %f): output point %d - expected %v got %v" , name , fn , operator , threshhold , j , exp .Datapoints [j ], p )
315
+ t .Fatalf ("case %q (%s, %s, %f): output point %d - expected %v got %v" , name , fn , operator , threshold , j , exp .Datapoints [j ], p )
316
316
}
317
317
}
318
318
}
@@ -375,7 +375,7 @@ func benchmarkFilterSeries(b *testing.B, numSeries int, fn0, fn1 func() []schema
375
375
f .(* FuncFilterSeries ).in = NewMock (input )
376
376
f .(* FuncFilterSeries ).fn = "sum"
377
377
f .(* FuncFilterSeries ).operator = ">"
378
- f .(* FuncFilterSeries ).threshhold = rand .Float64 ()
378
+ f .(* FuncFilterSeries ).threshold = rand .Float64 ()
379
379
got , err := f .Exec (make (map [Req ][]models.Series ))
380
380
if err != nil {
381
381
b .Fatalf ("%s" , err )
0 commit comments