Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support any type in encoder #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

damianopetrungaro
Copy link
Owner

@damianopetrungaro damianopetrungaro commented Apr 29, 2022

I am not convinced this project should support any type.

Performances for this use case may be a good selling point since the implementation designed is more efficient than other loggers around.

New benchmarks supporting any:

goos: darwin
goarch: amd64
pkg: github.com/damianopetrungaro/golog/benchmarks/logger
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkLogger/golog-12                   72630             16335 ns/op           17348 B/op        128 allocs/op
BenchmarkLogger/zap-12                     58617             20173 ns/op           28346 B/op        125 allocs/op
BenchmarkLogger/logrus-12                  66474             18344 ns/op           13882 B/op        172 allocs/op
BenchmarkLogger/golog.Check-12          53974438                22.63 ns/op           64 B/op          1 allocs/op
BenchmarkLogger/zap.Check-12            1000000000               0.8838 ns/op          0 B/op          0 allocs/op
PASS
ok      github.com/damianopetrungaro/golog/benchmarks/logger    6.494s

@damianopetrungaro damianopetrungaro force-pushed the feat-support-any branch 2 times, most recently from 6adfb7d to ca6ea2e Compare May 1, 2022 17:29
@codecov
Copy link

codecov bot commented May 3, 2022

Codecov Report

Merging #28 (a6587fc) into main (18c8ec6) will increase coverage by 0.17%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   89.82%   90.00%   +0.17%     
==========================================
  Files          15       15              
  Lines         796      810      +14     
==========================================
+ Hits          715      729      +14     
  Misses         70       70              
  Partials       11       11              
Impacted Files Coverage Δ
encoder.go 100.00% <100.00%> (ø)
field.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e8c6fa...a6587fc. Read the comment docs.

@damianopetrungaro damianopetrungaro force-pushed the main branch 5 times, most recently from 9b5f282 to d3d7a50 Compare September 10, 2022 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant