Skip to content

Instantly share code, notes, and snippets.

@arduanov
Last active April 25, 2018 11:09
Show Gist options
  • Save arduanov/3eefe4184a97e36560d8b2c7ce531015 to your computer and use it in GitHub Desktop.
Save arduanov/3eefe4184a97e36560d8b2c7ce531015 to your computer and use it in GitHub Desktop.
bash-3.2$ go test -bench=. -benchmem
goos: darwin
goarch: amd64
pkg: go.uber.org/zap/benchmarks
BenchmarkDisabledWithoutFields/Zap-8 200000000 6.81 ns/op 0 B/op 0 allocs/op
BenchmarkDisabledWithoutFields/Zap.Check-8 200000000 7.09 ns/op 0 B/op 0 allocs/op
BenchmarkDisabledWithoutFields/Zap.Sugar-8 100000000 13.8 ns/op 16 B/op 1 allocs/op
BenchmarkDisabledWithoutFields/Zap.SugarFormatting-8 20000000 93.1 ns/op 184 B/op 7 allocs/op
BenchmarkDisabledWithoutFields/sirupsen/logrus-8 100000000 10.8 ns/op 16 B/op 1 allocs/op
BenchmarkDisabledWithoutFields/rs/zerolog-8 1000000000 2.38 ns/op 0 B/op 0 allocs/op
BenchmarkDisabledAccumulatedContext/Zap-8 200000000 7.15 ns/op 0 B/op 0 allocs/op
BenchmarkDisabledAccumulatedContext/Zap.Check-8 200000000 7.27 ns/op 0 B/op 0 allocs/op
BenchmarkDisabledAccumulatedContext/Zap.Sugar-8 100000000 12.8 ns/op 16 B/op 1 allocs/op
BenchmarkDisabledAccumulatedContext/Zap.SugarFormatting-8 20000000 88.1 ns/op 184 B/op 7 allocs/op
BenchmarkDisabledAccumulatedContext/sirupsen/logrus-8 100000000 10.1 ns/op 16 B/op 1 allocs/op
BenchmarkDisabledAccumulatedContext/rs/zerolog-8 1000000000 2.50 ns/op 0 B/op 0 allocs/op
BenchmarkDisabledAddingFields/Zap-8 10000000 210 ns/op 768 B/op 5 allocs/op
BenchmarkDisabledAddingFields/Zap.Check-8 200000000 7.50 ns/op 0 B/op 0 allocs/op
BenchmarkDisabledAddingFields/Zap.Sugar-8 20000000 94.2 ns/op 184 B/op 7 allocs/op
BenchmarkDisabledAddingFields/sirupsen/logrus-8 2000000 650 ns/op 1493 B/op 12 allocs/op
BenchmarkDisabledAddingFields/rs/zerolog-8 100000000 11.1 ns/op 0 B/op 0 allocs/op
BenchmarkWithoutFields/Zap-8 10000000 210 ns/op 0 B/op 0 allocs/op
BenchmarkWithoutFields/Zap.Check-8 10000000 210 ns/op 0 B/op 0 allocs/op
BenchmarkWithoutFields/Zap.CheckSampled-8 30000000 50.3 ns/op 0 B/op 0 allocs/op
BenchmarkWithoutFields/Zap.Sugar-8 5000000 300 ns/op 80 B/op 2 allocs/op
BenchmarkWithoutFields/Zap.SugarFormatting-8 300000 5391 ns/op 2067 B/op 59 allocs/op
BenchmarkWithoutFields/sirupsen/logrus-8 1000000 1198 ns/op 1474 B/op 23 allocs/op
BenchmarkWithoutFields/stdlib.Println-8 3000000 474 ns/op 80 B/op 2 allocs/op
BenchmarkWithoutFields/stdlib.Printf-8 300000 4618 ns/op 2058 B/op 59 allocs/op
BenchmarkWithoutFields/rs/zerolog-8 10000000 139 ns/op 0 B/op 0 allocs/op
BenchmarkWithoutFields/rs/zerolog.Formatting-8 300000 4696 ns/op 2059 B/op 59 allocs/op
BenchmarkWithoutFields/rs/zerolog.Check-8 10000000 136 ns/op 0 B/op 0 allocs/op
BenchmarkAccumulatedContext/Zap-8 10000000 240 ns/op 0 B/op 0 allocs/op
BenchmarkAccumulatedContext/Zap.Check-8 10000000 242 ns/op 0 B/op 0 allocs/op
BenchmarkAccumulatedContext/Zap.CheckSampled-8 30000000 52.0 ns/op 0 B/op 0 allocs/op
BenchmarkAccumulatedContext/Zap.Sugar-8 5000000 319 ns/op 80 B/op 2 allocs/op
BenchmarkAccumulatedContext/Zap.SugarFormatting-8 300000 5296 ns/op 2077 B/op 59 allocs/op
BenchmarkAccumulatedContext/sirupsen/logrus-8 100000 10845 ns/op 11998 B/op 116 allocs/op
BenchmarkAccumulatedContext/rs/zerolog-8 10000000 146 ns/op 0 B/op 0 allocs/op
BenchmarkAccumulatedContext/rs/zerolog.Check-8 10000000 146 ns/op 0 B/op 0 allocs/op
BenchmarkAccumulatedContext/rs/zerolog.Formatting-8 300000 4796 ns/op 2059 B/op 59 allocs/op
BenchmarkAddingFields/Zap-8 1000000 1664 ns/op 771 B/op 5 allocs/op
BenchmarkAddingFields/Zap.Check-8 1000000 1695 ns/op 770 B/op 5 allocs/op
BenchmarkAddingFields/Zap.CheckSampled-8 5000000 249 ns/op 92 B/op 0 allocs/op
BenchmarkAddingFields/Zap.Sugar-8 1000000 2086 ns/op 1567 B/op 11 allocs/op
BenchmarkAddingFields/sirupsen/logrus-8 200000 11999 ns/op 13487 B/op 127 allocs/op
BenchmarkAddingFields/rs/zerolog-8 1000000 2203 ns/op 1070 B/op 10 allocs/op
BenchmarkAddingFields/rs/zerolog.Check-8 500000 2177 ns/op 1070 B/op 10 allocs/op
PASS
ok go.uber.org/zap/benchmarks 80.140s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment