Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/workflow/compiler_performance_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ Analyze the issue: ${{ steps.sanitized.outputs.text }}
b.Fatal(err)
}

compiler := NewCompiler()
compiler := NewCompiler(WithNoEmit(true))
compiler.SetQuiet(true)
compiler.SetApprove(true)
Comment on lines +41 to +43
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BenchmarkCompileSimpleWorkflow now sets no-emit/quiet/approve, which disables lockfile writing and safe-update enforcement. Please update the benchmark doc comment (or rename the benchmark) to explicitly state it measures the compile path without emission and without safe-update enforcement, so results aren’t misinterpreted as the default compilation behavior.

Copilot uses AI. Check for mistakes.

// Warm up: run once before timing to prime one-time caches (schema compilation, etc.)
_ = compiler.CompileWorkflow(testFile)
Comment on lines 45 to 46
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CompileWorkflow errors are ignored (both in the warm-up call here and in the timed loop below). If compilation starts failing, the benchmark may silently measure a fast-failing error path and report misleading ns/op. Consider checking the error and calling b.Fatal on the first failure.

See below for a potential fix:

	if err := compiler.CompileWorkflow(testFile); err != nil {
		b.Fatal(err)
	}

	b.ResetTimer()
	b.ReportAllocs()
	for b.Loop() {
		if err := compiler.CompileWorkflow(testFile); err != nil {
			b.Fatal(err)
		}

Copilot uses AI. Check for mistakes.
Expand Down
Loading