Update bench
This commit is contained in:
parent
f8aa7a1962
commit
b42b460ec6
16
README.md
16
README.md
|
@ -255,11 +255,11 @@ Some settings can be changed and will by applied to all loggers:
|
|||
All operations are allocation free (those numbers *include* JSON encoding):
|
||||
|
||||
```
|
||||
BenchmarkLogEmpty-8 50000000 19.8 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkDisabled-8 100000000 4.73 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkInfo-8 10000000 85.1 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkContextFields-8 10000000 81.9 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkLogFields-8 5000000 247 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkLogEmpty-8 100000000 19.1 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkDisabled-8 500000000 4.07 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkInfo-8 30000000 46.3 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkContextFields-8 30000000 47.1 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkLogFields-8 10000000 186 ns/op 0 B/op 0 allocs/op
|
||||
```
|
||||
|
||||
Using Uber's zap [comparison benchmark](https://github.com/uber-go/zap#performance):
|
||||
|
@ -268,7 +268,7 @@ Log a message and 10 fields:
|
|||
|
||||
| Library | Time | Bytes Allocated | Objects Allocated |
|
||||
| :--- | :---: | :---: | :---: |
|
||||
| zerolog | 787 ns/op | 80 B/op | 6 allocs/op |
|
||||
| zerolog | 767 ns/op | 552 B/op | 6 allocs/op |
|
||||
| :zap: zap | 848 ns/op | 704 B/op | 2 allocs/op |
|
||||
| :zap: zap (sugared) | 1363 ns/op | 1610 B/op | 20 allocs/op |
|
||||
| go-kit | 3614 ns/op | 2895 B/op | 66 allocs/op |
|
||||
|
@ -281,7 +281,7 @@ Log a message with a logger that already has 10 fields of context:
|
|||
|
||||
| Library | Time | Bytes Allocated | Objects Allocated |
|
||||
| :--- | :---: | :---: | :---: |
|
||||
| zerolog | 80 ns/op | 0 B/op | 0 allocs/op |
|
||||
| zerolog | 52 ns/op | 0 B/op | 0 allocs/op |
|
||||
| :zap: zap | 283 ns/op | 0 B/op | 0 allocs/op |
|
||||
| :zap: zap (sugared) | 337 ns/op | 80 B/op | 2 allocs/op |
|
||||
| lion | 2702 ns/op | 4074 B/op | 38 allocs/op |
|
||||
|
@ -294,7 +294,7 @@ Log a static string, without any context or `printf`-style templating:
|
|||
|
||||
| Library | Time | Bytes Allocated | Objects Allocated |
|
||||
| :--- | :---: | :---: | :---: |
|
||||
| zerolog | 76.2 ns/op | 0 B/op | 0 allocs/op |
|
||||
| zerolog | 50 ns/op | 0 B/op | 0 allocs/op |
|
||||
| :zap: zap | 236 ns/op | 0 B/op | 0 allocs/op |
|
||||
| standard library | 453 ns/op | 80 B/op | 2 allocs/op |
|
||||
| :zap: zap (sugared) | 337 ns/op | 80 B/op | 2 allocs/op |
|
||||
|
|
Loading…
Reference in New Issue