Anurag-S1ngh opened a new pull request, #41749: URL: https://github.com/apache/beam/pull/41749
## Summary Adds support for `ProfilingOptions` to `BundleBasedDirectRunner`, the one DirectRunner execution path that did not honor them. Portable runners and `FnApiRunner` already read these options, so this closes the remaining gap for the default `DirectRunner` when it falls back to the bundle-based implementation. ## Changes - Build the profiler factory from `ProfilingOptions` in `BundleBasedDirectRunner.run_pipeline` and pass it to the executor. - Run the executor worker thread under the profiler. `cProfile` only profiles the calling thread, and bundle execution happens on the executor worker, so wrapping `run_pipeline` itself would not capture any pipeline work. - Add tests that verify a CPU profile is written and contains profiling data when profiling is enabled, and that nothing is written when it is disabled. - Update `CHANGES.md`. ## Testing - `python -m pytest apache_beam/runners/direct/direct_runner_test.py` (9 passed) - `yapf` and `ruff` clean on the changed files Fixes #18011 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
