(b *testing.B)
| 3599 | } |
| 3600 | |
| 3601 | func BenchmarkParse(b *testing.B) { |
| 3602 | p, err := NewParser( |
| 3603 | Macros(AllMacros...), |
| 3604 | MaxRecursionDepth(32), |
| 3605 | ErrorRecoveryLimit(4), |
| 3606 | ErrorRecoveryLookaheadTokenLimit(4), |
| 3607 | PopulateMacroCalls(true), |
| 3608 | ) |
| 3609 | if err != nil { |
| 3610 | b.Fatal(err) |
| 3611 | } |
| 3612 | b.ResetTimer() |
| 3613 | for n := 0; n < b.N; n++ { |
| 3614 | for _, testCase := range testCases { |
| 3615 | p.Parse(common.NewTextSource(testCase.I)) |
| 3616 | } |
| 3617 | } |
| 3618 | } |
| 3619 | |
| 3620 | func BenchmarkParseParallel(b *testing.B) { |
| 3621 | p, err := NewParser( |
nothing calls this directly
no test coverage detected