BenchmarkValidateExpression benchmarks single expression validation
(b *testing.B)
| 8 | |
| 9 | // BenchmarkValidateExpression benchmarks single expression validation |
| 10 | func BenchmarkValidateExpression(b *testing.B) { |
| 11 | expression := "github.event.issue.number" |
| 12 | unauthorizedExprs := []string{} |
| 13 | |
| 14 | for b.Loop() { |
| 15 | _ = validateSingleExpression(expression, ExpressionValidationOptions{ |
| 16 | NeedsStepsRe: NeedsStepsPattern, |
| 17 | InputsRe: InputsPattern, |
| 18 | WorkflowCallInputsRe: WorkflowCallInputsPattern, |
| 19 | AwInputsRe: AWInputsPattern, |
| 20 | EnvRe: EnvPattern, |
| 21 | UnauthorizedExpressions: &unauthorizedExprs, |
| 22 | }) |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // BenchmarkValidateExpression_Complex benchmarks complex expression with comparisons |
| 27 | func BenchmarkValidateExpression_Complex(b *testing.B) { |
nothing calls this directly
no test coverage detected