his utility provides a progress bar with Estimated Time to Completion (ETC) and elapsed time tracking, perfect for monitoring the progress of lengthy operations, such as those found in machine learning projects. This project is inspired by gipert's progressbar, and it extends the original implementation by adding ETC and elapsed time functionalities for a more informative experience.
Architecture | Ubuntu | macOS | Windows |
---|---|---|---|
x86_64 | |||
ARM | |||
RISCV |
- ETC Calculation: Provides an estimate of the time remaining until completion.
- Elapsed Time Tracking: Keeps track of the time elapsed since the start of the operation.
- Customizable Appearance: Allows the customization of the progress bar with different characters and formats.
- Cross-Platform: Works on different platforms with C++20 support.
Follow these instructions to integrate MyProgressBar into your own projects.
Make sure you have the following installed on your system:
- CMake (version 3.5 or later)
- A C++20 compliant compiler
- fmt library
- Intel Threading Building Blocks (TBB)
- Boost library
To install the required libraries on Ubuntu, use the following commands:
sudo apt-get update; sudo apt-get install libfmt-dev libtbb-dev libboost-all-dev ninja-build -y
First, clone the MyProgressBar repository using git:
git clone https://github.com/mjshakir/ProgressBar.git --recurse-submodules
cd ProgressBar
cmake -DFORCE_COLORED_OUTPUT=ON -DCMAKE_BUILD_TYPE=Release -B build -G Ninja
cd build
ninja
To integrate MyProgressBar into your project using CMake, follow these steps:
- Add MyProgressBar as a subdirectory in your project's
CMakeLists.txt
:
add_subdirectory(path/to/ProgressBar)
- Link against MyProgressBar in your executable or library:
target_link_libraries(your_target_name PRIVATE ProgressBar)
By default, MyProgressBar is built as a shared library. If you prefer a static library, you can configure this in the CMake command:
cmake -DBUILD_PROGRESSBAR_SHARED_LIBS=OFF ..
To run the provided examples:
./bin/MyProgressBar_example
To execute the unit tests:
ninja test # or ctest
Please find more detailed usage instructions and examples in the example directory. The main concepts are commented on in the source code for your convenience.
Contributions are welcome! If you'd like to contribute or have found bugs, please open an issue or a pull request on GitHub.
For questions and support, use the GitHub issues tab to reach out.
This project was inspired by gipert's progressbar implementation. If you're looking for a more lightweight progress bar without ETC and elapsed time tracking, check out gipert's progressbar.