Skip to content

Pad percentage - #160

Open
oowekyala wants to merge 1 commit into
p-ranav:masterfrom
oowekyala:master
Open

Pad percentage #160
oowekyala wants to merge 1 commit into
p-ranav:masterfrom
oowekyala:master

Conversation

@oowekyala

Copy link
Copy Markdown

This avoids misaligned indicators, and things after the percentage moving horizontally when the progress updates. This is especially useful when using lots of bars like the following:

  seed   1028[>                             ] 0% [00m:26s] ]
  seed    563[==============================] 100% [00m:29s]
  seed   1090[>                             ] 0% [00m:20s] ]
  seed    625[==============================] 100% [00m:28s]
  seed    656[==============================] 100% [00m:27s]
  seed    687[==============================] 100% [00m:28s]
  seed    718[==============================] 100% [00m:29s]
  seed    997[=================>            ] 58% [00m:16s]
  seed    780[==============================] 100% [00m:30s]

Now:

  seed   1958[=============================>]  98% [05m:02s]
  seed   1617[==>                           ]   9% [02m:49s]
  seed   2330[==============================] 100% [12m:08s]
  seed   2361[==>                           ]   9% [06m:51s]
  seed   1276[=============>                ]  45% [11m:49s]
  seed   2299[==>                           ]   9% [07m:53s]

Update progress_bar.hpp

For reference this avoids misaligned indicators, and things after the percentage horizontally. This is especially useful when using lots of bars like the following:

```
  seed   1028[>                             ] 0% [00m:26s] ]
  seed    563[==============================] 100% [00m:29s]
  seed   1090[>                             ] 0% [00m:20s] ]
  seed    625[==============================] 100% [00m:28s]
  seed    656[==============================] 100% [00m:27s]
  seed    687[==============================] 100% [00m:28s]
  seed    718[==============================] 100% [00m:29s]
  seed    997[=================>            ] 58% [00m:16s]
  seed    780[==============================] 100% [00m:30s]
```
Now:
```
  seed   1958[=============================>]  98% [05m:02s]
  seed   1617[==>                           ]   9% [02m:49s]
  seed   2330[==============================] 100% [12m:08s]
  seed   2361[==>                           ]   9% [06m:51s]
  seed   1276[=============>                ]  45% [11m:49s]
  seed   2299[==>                           ]   9% [07m:53s]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant