From 4762df48ee23f2115fb0ef2caeb6031f04cf61de Mon Sep 17 00:00:00 2001 From: Michael O'Brien Date: Fri, 30 Jul 2021 08:46:19 +1000 Subject: [PATCH] DOC: update readme with benchmarks --- README.md | 14 ++++++++++++++ package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a3feebb..1982823 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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' diff --git a/package.json b/package.json index 28bd8a7..f1c0f74 100644 --- a/package.json +++ b/package.json @@ -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",