Python tqdm
is nice. Need something similar for C++. That's this.
#include "tqdm.h"
tqdm bar;
for(int i = 0; i < N; i++) {
bar.progress(i, N);
// stuff
}
bar.finish();
█████████████████▍ | 46.2% [4200000 | 103.66 kHz | 35s<47s]
g++ test.cpp -std=c++11 && ./a.out
If your loops are faster than ~200MHz, then maybe!
You bet. set_theme_basic(), set_theme_line(), set_theme_circles()
.
If you have ROOT, you can do the following. Note that due to the fact it uses ROOT to call C++ code in Python, loops faster than 1kHz start to get slowed down by the overhead.
import time
import ROOT as r
r.gROOT.ProcessLine(".L tqdm.h")
bar = r.tqdm()
N = 10000
for i in range(N):
bar.progress(i,N)
time.sleep(0.001)