https://github.com/faranalytics/streams-logger-benchmark
https://github.com/faranalytics/streams-logger-benchmark
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/faranalytics/streams-logger-benchmark
- Owner: faranalytics
- Created: 2024-07-07T01:04:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-04T02:50:21.000Z (almost 2 years ago)
- Last Synced: 2025-01-20T16:22:50.425Z (over 1 year ago)
- Language: TypeScript
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Benchmarking the *Streams* Logger
## Introduction
This package provides a rough benchmark comparison between *Streams*, Pino, and Winston. The comparison may not take into account relevant optimizations offered by each package - *this is a work in progress*. Please see the implementations for details.
## Materials
- [Streams](https://github.com/faranalytics/streams-logger-benchmark/blob/main/src/streams.ts)
- [Pino](https://github.com/faranalytics/streams-logger-benchmark/blob/main/src/pino.ts)
- [Winston](https://github.com/faranalytics/streams-logger-benchmark/blob/main/src/winston.ts)
## Methods
### Hello, World!
Each logger is configured to log a message to the console and a file that roughly resembles `2024-07-10T02:31:33.797Z INFO: Hello, World!`. Each logger is ran once on each `iteration`.
#### Procedure
1. Start a child process.
2. Start the timer.
3. Configure the logger.
4. Run the specified test `hello_world.js` 1e2 times.
5. Log Hello, World! to the console and to a file 10000 times.
3. Calculate the mean time and memory usage of each iteration.
#### Run the Test
`npm start iteration=1e2 test=hello_world`
## Results
## Discussion