Skip to content

Cannot display step-based progress with format alone #5125

@XedinUnknown

Description

@XedinUnknown

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

  1. The constructor of Bar, declared in Progress, does not accept a format parameter.
  2. The placeholders passed to Streams::render() do not include the _current and _total values.

Suggested Solution

  1. Accept a format argument in the constructor.
  2. 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?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions