(t *testing.T)
| 420 | CPUTimeSeconds: 2.75, |
| 421 | PeakBufferMemoryBytes: 8192, |
| 422 | PostgresScanSeconds: 0.456, |
| 423 | } |
| 424 | |
| 425 | c.logQuery(time.Unix(1700000000, 0).UTC(), "SELECT 1", "", "SELECT", 1, 0, "", "", "simple") |
| 426 | |
| 427 | select { |
| 428 | case entry := <-ql.ch: |
| 429 | if entry.CPUTimeSeconds != 2.75 { |
| 430 | t.Fatalf("expected CPUTimeSeconds 2.75, got %f", entry.CPUTimeSeconds) |
| 431 | } |
| 432 | if entry.PeakBufferMemoryBytes != 8192 { |
| 433 | t.Fatalf("expected PeakBufferMemoryBytes 8192, got %d", entry.PeakBufferMemoryBytes) |
| 434 | } |
| 435 | if entry.PostgresScanMs != 456 { |
| 436 | t.Fatalf("expected PostgresScanMs 456, got %d", entry.PostgresScanMs) |
| 437 | } |
| 438 | default: |
| 439 | t.Fatal("expected query log entry") |
| 440 | } |
| 441 | |
| 442 | if c.lastProfilingSummary != (observe.QueryProfilingSummary{}) { |
| 443 | t.Fatalf("expected profiling summary to be reset, got %#v", c.lastProfilingSummary) |
| 444 | } |
| 445 | } |
| 446 | |
| 447 | type captureQueryLogExecutor struct { |
| 448 | feedbackExecutor |
| 449 | entries []QueryLogEntry |
| 450 | } |
nothing calls this directly
no test coverage detected