[Date Prev][Date Next]
(ITS#5922) progress bar proposal
Full_Name: Matthew Backes
Version: 2.4, head
Submission from: (NULL) (18.104.22.168)
Here is a proposal for a progress bar reporting tool, to appear in
slapadd and other long running tools. A similar version was used
previously in Symas's OpenLDAP 2.3 (CDS3) product. This version is
significantly more modular, so that alternative estimators and display
systems may be added.
By default, it displays a text bar showing activity, progress, percent
completion, estimated time to completion, elapsed time, and speed in
bytes of ldif per second.
The display functions are modular so that we could add a running trace
of numbers that a graphical front-end might read and transform into
pretty animated pie charts, or potentially fancier display within
The default (and only) supplied display system currently relies only
on carriage return, with no external libraries needed or dependencies
on terminal features.
Estimators are modular as well, as the default linear estimator can be
frustratingly poor for very large, poorly tuned databases with
extremely non-linear load times.
Progress is estimated by fstat()ing the ldif file and ftell()ing to
see the position. As a result, ldif read from stdin automatically
disables the progress bar.
Files are available at:
* Apply progress.patch
* Copy progress.c into libraries/liblutil/progress.c
* Copy progress.h into include/progress.h
We should probably make this configurable via the commandline (on/off,
as well as which display and estimator systems to use), but currently
it is always on provided stderr is a tty and the ldif is a file.