2.0.1 • Published 5 years ago

time-saved v2.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Time Saved

Discover how much time is saved from a manual job.

This module calculates how long your application has been running from start to finish, then saves that data to a MongoDB server along with a few other details.

Setup

Create a .env file in your project root, and provide the following details:

MongoDBServer = ''       // 'mongodb://heroku_00000000:A1B2C3@D4E5F6.mlab.com:0000/heroku_00000000'
AppName = ''             // 'My Useful App'
AverageTaskTime = 0000   // Time, in milliseconds the task is expected to run without the use of an app, as a Number.

Usage

const timeSaved = require('time-saved');

// Starts the timer.
timeSaved.start();

// Ends the timer.
timeSaved.end();

// Updates MongoDB with values for retrieval later.
timeSaved.update();

Output

{
    "_id": {
        "$oid": "5c73997dfdsfdsccbe39f17a"
    },
    "timeStart": 1551079805658,
    "timeEnd": 1551079805659,
    "app": "My Useful App",
    "timeAverage": 4000,
    "__v": 0
}
2.0.1

5 years ago

2.0.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago