-
Notifications
You must be signed in to change notification settings - Fork 92
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
feature request: progress for unknown number of steps #101
Comments
FWIW, one can mimic something close with sentinel = typemin(N)
prog = ProgressThresh(sentinel, "doing stuff")
for i in 1:N
sleep(0.1)
ProgressMeter.update!(prog, -i)
end
ProgressMeter.update!(prog, sentinel) but that's a hack. |
This would be solved by #102 since that logging information lets you give the update percentage. |
#102 is nice, but this issue is about the case where I don't know the percentage, since I don't know the total. |
Just out of curiosity, what is the advantage of this over just printing with a carriage return at the beginning? i = 0
while !eof(io)
line = readline(io)
i += 1
print("\rProcessed $i lines")
... # process line
end
println() |
@zsunberg The implementation in #115 has a couple of advantages over your suggested solutions. Another major benefit of the implementation in #115 is that it updates the current information only every, let's say 0.1 seconds. Depending on the task this reduces the overhead of the progress bar immensely since IO operations are usually quite expensive. |
Great, thanks for the explanation
…On Fri, Oct 19, 2018 at 1:20 PM Sascha Timme ***@***.***> wrote:
@zsunberg <https://github.com/zsunberg> The implementation in #115
<#115> has a couple of
advantages over your suggested solutions.
It also automatically keeps track of the passed time and prints it nicely.
Also you can also easily specify additional values to be printed (with the
showvalues keyword). Sure, you could all do this by your own, but it is
also nice if everybody doesn't have to reinvent the wheel :)
Another major benefit of the implementation in #115
<#115> is that it updates
the current information only every, let's say 0.1 seconds. Depending on the
task this reduces the overhead of the progress bar immensely since IO
operations are usually quite expensive.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEC0a6Yul3BOCBnsmCwjpTbxwZQtbDC_ks5umjQRgaJpZM4VPx2v>
.
|
Closed by #115. |
Suppose I am reading an ex ante unknown number of records from a large file. It would be nice to do something like
while would display something like
The text was updated successfully, but these errors were encountered: