(b *testing.B)
| 618 | } |
| 619 | |
| 620 | func BenchmarkIntervalCoalesce(b *testing.B) { |
| 621 | for i := 0; i < b.N; i++ { |
| 622 | store := factstore.NewTemporalStore() |
| 623 | |
| 624 | // Add overlapping intervals |
| 625 | pred, _ := ast.Name("/test") |
| 626 | for j := 0; j < 100; j++ { |
| 627 | store.Add(ast.NewAtom("status", pred), ast.TimeInterval( |
| 628 | time.Date(2024, 1, 1+j, 0, 0, 0, 0, time.UTC), |
| 629 | time.Date(2024, 1, 3+j, 0, 0, 0, 0, time.UTC), |
| 630 | )) |
| 631 | } |
| 632 | |
| 633 | store.Coalesce(ast.PredicateSym{Symbol: "status", Arity: 1}) |
| 634 | } |
| 635 | } |
| 636 | |
| 637 | // Tests for derived temporal facts (rules that produce temporal facts) |
| 638 |
nothing calls this directly
no test coverage detected