(b *testing.B)
| 2336 | } |
| 2337 | |
| 2338 | func BenchmarkParse(b *testing.B) { |
| 2339 | p, err := NewParser( |
| 2340 | Macros(AllMacros...), |
| 2341 | MaxRecursionDepth(32), |
| 2342 | ErrorRecoveryLimit(4), |
| 2343 | ErrorRecoveryLookaheadTokenLimit(4), |
| 2344 | PopulateMacroCalls(true), |
| 2345 | ) |
| 2346 | if err != nil { |
| 2347 | b.Fatal(err) |
| 2348 | } |
| 2349 | b.ResetTimer() |
| 2350 | for n := 0; n < b.N; n++ { |
| 2351 | for _, testCase := range testCases { |
| 2352 | p.Parse(common.NewTextSource(testCase.I)) |
| 2353 | } |
| 2354 | } |
| 2355 | } |
| 2356 | |
| 2357 | func BenchmarkParseParallel(b *testing.B) { |
| 2358 | p, err := NewParser( |
nothing calls this directly
no test coverage detected