kotet / progress Goto Github PK
View Code? Open in Web Editor NEWEasy progress reporting for D
License: Other
Easy progress reporting for D
License: Other
There is a bug that prevents Bar
s to calculate their own width when they include non-ascii fill characters (because the length is then greater than the visual length). This makes the bar extend to the next line ("overflow") when the terminal width is to small.
I can't understand why it's not appears. It's present in code and test function that I added is printing.
Here is my code http://vpaste.net/sBR06
I am doing processing of 400k values. Without progress bar I am getting result in 5 seconds. With it it's growing to max value, but it's growing much more slowly than without it?
Could it be reason of slow-down? How can I fix it?
When using
auto b = new IncrementalBar();
b.bar_prefix = " [";
b.bar_suffix = "] ";
b.width = 50;
b.max = 500;
foreach(i; 0 .. b.max)
{
b.next();
}
exception appears:
[█████████████......................................] 129/500
core.exception.RangeError@../../.dub/packages/progress-3.0.0/progress/source/progress/bar.d(97): Range violation
----------------
??:? _d_arraybounds [0x4a4fdd]
??:? progress.bar.__array [0x49e659]
../../.dub/packages/progress-3.0.0/progress/source/progress/bar.d:97 void progress.bar.IncrementalBar.update() [0x49c3e5]
../../.dub/packages/progress-3.0.0/progress/source/progress/package.d:106 void progress.Infinite.next(ulong) [0x49d1aa]
progressbar.d:43 _Dmain [0x49ba72]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x4a818b]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x4a80b3]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x4a8130]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x4a80b3]
??:? _d_run_main [0x4a801f]
??:? main [0x49c031]
??:? __libc_start_main [0xe71f482f]
Adding if (phase >= nphases) phase = nphases - 1;
would fix that.
Perhaps I'm just missing something but calling spinner_.finish(); the output of the spinner is still displayed with the message/last tick. Is there a way to clear this?
Example:
Loading
source-keephdalive-locations.lst => 79%
source-keephdalive-writer.lst No Coverage!
Coverage over 2 files: 39%
I want the Loading \ line cleared so it does not appear in subsequent output.
Other than that this is a great module! Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.