MCPcopy
hub / github.com/grafana/tempo / BenchmarkRegexInPredicate

Function BenchmarkRegexInPredicate

pkg/parquetquery/predicates_test.go:371–387  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

369}
370
371func BenchmarkRegexInPredicate(b *testing.B) {
372 p, err := NewRegexInPredicate([]string{"abc"})
373 require.NoError(b, err)
374
375 s := make([]parquet.Value, 1000)
376 for i := 0; i < 1000; i++ {
377 s[i] = parquet.ValueOf(uuid.New().String())
378 }
379
380 b.ResetTimer()
381
382 for i := 0; i < b.N; i++ {
383 for _, ss := range s {
384 p.KeepValue(ss)
385 }
386 }
387}
388
389func TestIntInPredicate(t *testing.T) {
390 testCases := []predicateTestCase{

Callers

nothing calls this directly

Calls 3

NewRegexInPredicateFunction · 0.85
KeepValueMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected