Skip to content

Add progress bars to the CLI output - #365

Open
harriscr wants to merge 1 commit into
ceph:mainfrom
harriscr:ch_wip_logging
Open

harriscr wants to merge 1 commit into
ceph:mainfrom
harriscr:ch_wip_logging

Conversation

@harriscr

Copy link
Copy Markdown
Contributor

With PR #364 the cli output to the screen was reduced to show progress through the code, but remove all the extra debug statements to a log file. There is still an improvement that can be made though, showing how far through a particular CBT run we are as this is not obvious.

To do this we can add progress bars to the CLI output to give the user a better idea of how long their run may take, and how far through it they are. The bars are not shown when run through the teuthology suite as this would make the output less readable.

IBM Bob 2.0.1 and 2.0.3 were used to help with the change

###Example output###

INFO     - cbt: Starting monitoring in /tmp/cbt/00000000/LibrbdFio/osd_ra-00004096/seq32kwrite/rbdfio/numjobs-002/iodepth-000256                                                             
INFO     - cbt: Top monitoring collecting 30 samples (estimated ~90s)...                                                                                                                     
Overall run:  46%|███████████████████████████████████████████████████████████▍                                                                    | 2715.0/5850s  [elapsed 50:39 | eta 53:16]
Workload 'seq32kwrite' 18/20:  38%|██████████████████████████████████████████▊                                                                       | 45.0/120s  [elapsed 00:45 | eta 01:15]

###Testing###
All existing unit tests pass, and additional unit tests have been added for any new classes created.

============================= slowest 5 durations ==============================
0.08s call     tests/test_directory_comparison_plotter.py::TestDirectoryComparisonPlotter::test_draw_and_save_adds_legend
0.05s call     tests/test_time_series_plotter.py::TestTimeSeriesPlotter::test_plot_iops_with_zero_values
0.04s call     tests/test_monitoring_factory.py::test_get_object_returns_osd_top_monitoring
0.01s call     tests/test_time_series_formatter.py::TestFIOTimeSeriesParser::test_format_with_all_metrics
0.01s call     tests/test_fio_log_parser.py::TestFIOLogParser::test_parse_and_combine_logs_bw
================= 1012 passed, 3 skipped, 24 warnings in 1.45s =================
Finished running tests!

Black, ruff, mypy and pylint all pass

Add progress bars to the CLI only output from CBT to better show progress to the user. It includes an estimated time for the run as well as percentage through the currnt task and the overall run.

IBM Bob 2.0.1 and 2.0.3 were used to help with the change

Signed-off-by: Chris Harris <harriscr@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant