(t *testing.T)
| 14 | const testAccuracy = 100 * time.Millisecond |
| 15 | |
| 16 | func TestPerformanceTestingHints_Search(t *testing.T) { |
| 17 | synctest.Test(t, func(t *testing.T) { |
| 18 | engine := NewEngine() |
| 19 | |
| 20 | req := &tempopb.SearchRequest{ |
| 21 | Query: `{} with (debug_return_in=100s, debug_data_factor=1)`, |
| 22 | Start: uint32(time.Now().Add(-1 * time.Hour).Unix()), |
| 23 | End: uint32(time.Now().Unix()), |
| 24 | } |
| 25 | |
| 26 | start := time.Now() |
| 27 | resp, err := engine.ExecuteSearch(context.Background(), req, nil, WithUnsafeHints(true)) |
| 28 | elapsed := time.Since(start) |
| 29 | |
| 30 | require.NoError(t, err) |
| 31 | require.NotNil(t, resp) |
| 32 | require.NotEmpty(t, resp.Traces) |
| 33 | assert.InDelta(t, elapsed, 100*time.Second, float64(testAccuracy)) |
| 34 | }) |
| 35 | } |
| 36 | |
| 37 | func TestPerformanceTestingHints_SearchWithStdDev(t *testing.T) { |
| 38 | synctest.Test(t, func(t *testing.T) { |
nothing calls this directly
no test coverage detected