Comments (2)
Really good point! Especially useful on working on large iterators (using the generator iter()).
from progress.
I think the easiest way to do something like this is to allow the user to pass a blocking factor to any Progress. This would change the operation of progress.next() so that self.index is always updated, but progress is only printed it this is the first call or if (self.index % self.bf) == 0. Similarly, this would also mean fewer calls to time.monotonic() and so on.
While time.perf_counter() is no longer a system call, I am not at all sure about time.monotonic(), since it is still supposed to be a time.
The calling convention could be to pass a block_size:
bar = Bar(max=result_count, block_size=4096)
For now, I am doing this above progress.Bar altogether as follows:
count += 1
if bar and (count % 4096)==0:
bar.next(4096)
from progress.
Related Issues (20)
- Idea to expose duration of a progress/infinite as a feature HOT 1
- Unwanted characters printing after bar.finish() HOT 3
- Changing color of progress bar. HOT 1
- Elapsed (elapsed_td) time does not start at 0s.
- The pycharm console is garbled
- Not showing in argo workflow logs
- pip install progress: Windows report virus through Rav Endpoint Protection antivirus
- Typo in update terminal output HOT 1
- Stack progress bar
- Is it possible to get the progress bar in a str variable ? HOT 1
- Output only for big changes HOT 1
- How to show a progress bar without progressing? HOT 1
- Type hints!!! HOT 6
- Include "bar.goto()" in examples HOT 1
- FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/dist-packages/progress-1.5-py3.6.egg' HOT 1
- next function taking an optional value of steps HOT 2
- Not print on jupyter notebook HOT 1
- "ZIP does not support timestamps before 1980" on pip installation
- Type of Bar based on infinite, or show counts on spinners HOT 4
- No module named 'progress.bar'; 'progress' is not a package HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from progress.