Skip to content

Commit

Permalink
DOC: update readme with benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael O'Brien committed Jul 29, 2021
1 parent ef98f39 commit 4762df4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ SenseLogs is designed to do this, simply and elegantly.
## SenseLogs Features

* Extremely fast initialization time to shorten cold-starts.
* Up to 7 times faster than the nearest competitor logger.
* Clean, readable small code base (<500 lines).
* Emits logs in JSON with rich context.
* Dynamic log control to change log filters without redeploying.
Expand Down Expand Up @@ -83,6 +84,19 @@ log.trace('Database request', {request})
log.emit('custom-channel', 'My custom channel')
```

### Benchmarks

Because SenseLogs was designed exclusively for serverless, it does not carry unnecesary enterprise logging burdens and is blazing fast for serverless logging tasks.

Here are the results of benchmarks against the self-claimed fastest logger [Pino](https://github.com/pinojs/pino).


| Logger | Time | Code Size |
| -------- | :--: | ----------- |
| SenseLogs | 477 ms | 478 lines (commented) |
| Pino | 3,269 ms | 1281 lines (comments stripped) |


### Output Format

By default SenseLogs will emit log messages in JSON format to the console and using JSON format is highly recommended. However, you can also configure the logger to emit human readable output by setting the destination to 'console'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "senselogs",
"version": "0.9.0",
"version": "0.9.1",
"description": "Simple, dynamic, blazing fast serverless logging",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
Expand Down

0 comments on commit 4762df4

Please sign in to comment.