Progress-estimator

progress-estimator

Progress bar and estimation for Promise compilation.

progress-estimator logs a progress bar and estimation for how long a Promise will take to complete.

It tracks previous durations in order to provide more accurate estimates over time!

Get it: npm install progress-estimator

Sample usage:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const createLogger = require('progress-estimator');

// All configuration keys are optional, but it's recommended to specify a storage location.
// Learn more about configuration options below.
const logger = createLogger({
  storagePath: join(__dirname, '.progress-estimator'),
});

async function run() {
  await logger(promiseOne, "This is a promise");
  await logger(
    promiseTwo,
    "This is another promise. I think it will take about 1 second",
    {
      estimate: 1000
    }
  );
}

GIF FTW!

progress-estimator

Suggest a module

Comments