Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ProgressBar to visualise progress in Simulate() #237

Merged
merged 5 commits into from
Dec 20, 2021

Conversation

TobiasDuswald
Copy link
Contributor

Added a ProgressBar such that one clearly sees the progress of the simulation. Example output:

ET = Elapsed Time; TR = Time Remaining
[######                                          ] 135 / 1000 ( ET:  1649, TR:10566)[ms]

Examples:

  1. No output (default)
[bdm-1.3.4] (base) 
~/tmp/soma_clustering/build on  master! ⌚ 12:34:13
$ ./soma_clustering
number of cells in subvolume: 2360
average neighbors in subvolume: 28
correctness coefficient: 0.0157542
Simulation completed successfully!
  1. Show Simulation step every 100 steps
[bdm-1.3.4] (base) 
~/tmp/soma_clustering/build on  master! ⌚ 12:36:10
$ ./soma_clustering  --inline-config '{ "bdm::Param": { "show_simulation_step": 100 } }' 
Time step: 0
Time step: 100
Time step: 200
Time step: 300
Time step: 400
Time step: 500
Time step: 600
Time step: 700
Time step: 800
Time step: 900
number of cells in subvolume: 2384
average neighbors in subvolume: 26
correctness coefficient: 0.0468571
Simulation completed successfully!
  1. Use the progress bar
~/tmp/soma_clustering/build on  master! ⌚ 12:34:29
$ ./soma_clustering  --inline-config '{ "bdm::Param": { "use_progress_bar": true } }'

ET = Elapsed Time; TR = Time Remaining
[##################################################] 1000 / 1000 ( ET: 11988, TR:    0)[ms]
number of cells in subvolume: 2456
average neighbors in subvolume: 26
correctness coefficient: 0.026382
Simulation completed successfully!

@FonsRademakers
Copy link
Member

FonsRademakers commented Dec 17, 2021 via email

@TobiasDuswald
Copy link
Contributor Author

[...] Could we implement a bit friendlier command line argument parsing [...]

Hi Fons,
I think you're raising a very valid point. It goes a little beyond this PR so I created a card on Trello such that we can return to it as soon as there is some free time. Thanks for pointing it out!

@TobiasDuswald TobiasDuswald reopened this Dec 17, 2021
@FonsRademakers
Copy link
Member

FonsRademakers commented Dec 17, 2021 via email

Co-authored by: Lukas Breitwieser <lukas.breitwieser@cern.ch>
@TobiasDuswald TobiasDuswald merged commit 0e29fdc into master Dec 20, 2021
@TobiasDuswald TobiasDuswald deleted the progress-bar branch December 20, 2021 10:18
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.

2 participants