MCPcopy Create free account
hub / github.com/github/gh-aw / BenchmarkValidateExpression

Function BenchmarkValidateExpression

pkg/workflow/expressions_benchmark_test.go:10–24  ·  view source on GitHub ↗

BenchmarkValidateExpression benchmarks single expression validation

(b *testing.B)

Source from the content-addressed store, hash-verified

8
9// BenchmarkValidateExpression benchmarks single expression validation
10func 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
27func BenchmarkValidateExpression_Complex(b *testing.B) {

Callers

nothing calls this directly

Calls 1

validateSingleExpressionFunction · 0.85

Tested by

no test coverage detected