Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Holoscan Flow Benchmarking Logging Updates (#555)
* Benchmark: Use `logging` module in Holoscan Flow Benchmarking script Changes: - Adopts standard `logging` module to enhance granular control and redirection of benchmark script logging - Updates missing log files from warning to error severity Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Benchmark: Fix path check for missing flow tracking log files Refactors code and addresses issue where log file parent directory was not appended to path search for existence, resulting in only the local directory being checked for log files existence. NVBug 4933187 Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Update CLI and address review comments Changes: - Add `--level` option to control logging verbosity and use `logger` object throughout - Refactor logging so that each output filepath is printed exactly once. Available files are printed with INFO verbosity, missing files are printed with ERROR verbosity. - Exit with error if log files are missing Sample log printout: ``` 2024-11-08 05:23:47,323 INFO: Log file directory: /workspace/holohub/log_directory_20241108-052346 2024-11-08 05:23:47,324 INFO: Log files are available: 2024-11-08 05:23:47,324 ERROR: Log files are missing: /workspace/holohub/log_directory_20241108-052346/logger_greedy_1_1.log 2024-11-08 05:23:47,324 ERROR: Some log files are missing. Please check the log directory. ``` Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Infra: Propagate `run launch` command errors Updates `run` script to propagate errors from `run launch` as the `run` script exit code. Allows Holoscan Flow Benchmarking tools to detect when a HoloHub application process exits abnormally. Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Benchmark: Add file handler and process debug output Changes: - Adds logging handler to log detailed (DEBUG) output to a "benchmark.log" file in the given run log directory. Adds a stream handler to preserve control over CLI output verbosity with the "--level" CLI argument. - Logs stdout and stderr from an failing process to aid error investigation. Includes thread ID. Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> --------- Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com>
- Loading branch information