-
Notifications
You must be signed in to change notification settings - Fork 367
Reduce validation pipeline overhead and make BenchmarkValidation measure validation only
#27284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2e08216
87b6cbe
46687f5
c8c7d4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -295,13 +295,22 @@ Test validation performance. | |
| compiler.SetStrictMode(true) | ||
| compiler.SetQuiet(true) | ||
|
|
||
| workflowData, err := compiler.ParseWorkflowFile(testFile) | ||
| if err != nil { | ||
| b.Fatal(err) | ||
| } | ||
|
|
||
| // Warm up: run once before timing to prime one-time caches (schema compilation, etc.) | ||
| _ = compiler.CompileWorkflow(testFile) | ||
| if err := compiler.validateWorkflowData(workflowData, testFile); err != nil { | ||
| b.Fatal(err) | ||
| } | ||
|
|
||
| b.ResetTimer() | ||
| b.ReportAllocs() | ||
| for b.Loop() { | ||
| _ = compiler.CompileWorkflow(testFile) | ||
| if err := compiler.validateWorkflowData(workflowData, testFile); err != nil { | ||
| b.Fatalf("validateWorkflowData failed: %v", err) | ||
| } | ||
| } | ||
|
Comment on lines
303
to
314
|
||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These debug log messages say validation is happening even when the fast-path checks skip the underlying work (no
${{/ no{{#runtime-importin the markdown). Moving the log.Printf calls inside the correspondingstrings.Contains(...)blocks would keep debug output accurate and avoid implying checks ran when they didn’t.See below for a potential fix: