-
Notifications
You must be signed in to change notification settings - Fork 92
[profiler] Enable profiler visualization in the absence of pipeline config or dataflow graph #5368
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
Conversation
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.
Pull request overview
This PR enables profiler visualization to work without requiring a pipeline configuration file. Previously, the profiler required a pipeline_config.json file to extract source code, but now it gracefully handles cases where this file is absent.
Key changes:
- Made
programCode/sourcesoptional (can beundefined) throughout the profiler components - Modified profile loading logic to optionally read pipeline config instead of requiring it
- Added safeguards in the
Sourcesclass to handle empty or missing source code
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ProfilerLayout.svelte | Updated programCode prop type to allow undefined and removed unused export |
| ProfilerDiagram.svelte | Updated programCode prop type to allow undefined |
| TabProfileVisualizer.svelte | Made pipeline config file optional during profile loading; sources now conditionally extracted |
| profile.ts | Changed error-throwing logic to conditionally set sources only when available |
| dataflow.ts | Made Sources methods static, added getLine helper, and added empty-check guards in source formatting methods |
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.
Do mine and Copilot's (===) requested changes, and please run cd js-packages/web-console && bun run format - I see some formatting changes in web-console that the configured formatter will change
Otherwise looks good!
P.S. If some other files are affected by the formatter you can omit them from the PR, I will merge them later
js-packages/web-console/src/lib/components/pipelines/editor/TabProfileVisualizer.svelte
Outdated
Show resolved
Hide resolved
ryzhyk
left a comment
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.
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.
I take it back. I forgot to include the dataflow graph.
…onfig Signed-off-by: Mihai Budiu <[email protected]>
|
I modified this further to not require the dataflow graph either |

Fixes #5366