stream-timer
DO NOT USE YET. It's a work in progress
A naive tool for easily timing stream operations.
Installing
npm install --save stream-timer
API
new StreamTimer([name], [logger])
parameters
[name]
(String): name of the timer to display in the logs, if blank, uses "timer"[logger]
(Function): function which accepts a message to log, if not given, defaults to console.log
StreamTimer.prototype.tick([label])
parameters
[label]
(String): optional label to be used when displaying the ellapsed time of this tick
returns
- (Transform) that prints the time elapsed since the timer was started.
StreamTimer.prototype.restart()
returns
- (Transform) that restarts the timer and prints the current time
Example
var StreamTimer = ;var interval = ;var concat = ;var stdout = ;var streamArray = ; var data = "foo" "bar" "fizz" "baz"; var timer = 'example'; ;