The Problem
Sometimes, it could be necessary to display not the percentage of the progress, but how many steps are completed out of a total. For example, something like this:
5/10 [==============================> ] 0:00 / 0:00
Instead of something like this:
50% [==============================> ] 0:00 / 0:00
Currently, this is not possible without overriding the Bar class.
Possible Cause
- The constructor of
Bar, declared in Progress, does not accept a format parameter.
- The placeholders passed to
Streams::render() do not include the _current and _total values.
Suggested Solution
- Accept a format argument in the constructor.
- Pass the necessary values of the respective members for
_current and _total.
Remarks
What about other formats, like timing? Should they also be accepted as parameters?
The Problem
Sometimes, it could be necessary to display not the percentage of the progress, but how many steps are completed out of a total. For example, something like this:
Instead of something like this:
Currently, this is not possible without overriding the
Barclass.Possible Cause
Bar, declared inProgress, does not accept a format parameter.Streams::render()do not include the_currentand_totalvalues.Suggested Solution
_currentand_total.Remarks
What about other formats, like timing? Should they also be accepted as parameters?