Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/forivall/summarize-log
https://github.com/forivall/summarize-log
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/forivall/summarize-log
- Owner: forivall
- Created: 2016-08-20T21:59:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-10T20:54:53.000Z (almost 3 years ago)
- Last Synced: 2024-10-14T09:57:58.610Z (3 months ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Coding test
- Try to avoid using thirdparty modules
- Stick to node.js core APIs
- Write a test to confirm your module works correctlyCreate a duplex stream that outputs summary objects with keys for the
elapsed time, total length in bytes, and total lines.Create a stream that takes the summary objects and outputs
a oneline summary report suitable for logging. The report should
include the throughput rate of the input stream in bytes/sec.Use your new streams in a script designed to take text input (such as
from a log file) and report on the number of lines and growth rate of
the file. Bonus points if your script is configurable in some way
via `argv` (use your imagination).Imagine a usage like this:
```
$ tail -f mylogfile | myscript --verbose
```