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

v2: add Hex helpers and dont quote values with newlines #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ellemouton
Copy link
Contributor

To ensure that calls like spew.DumpS() can be used to clearly visualise
the contents of an object, we prevent adding quotes to such attribute
objects.

To ensure that calls like spew.DumpS() can be used to clearly visualise
the contents of an object, we prevent adding quotes to such attribute
objects.
@ellemouton
Copy link
Contributor Author

ellemouton commented Dec 10, 2024

Before and after benchmarks: Slight impact on S logs only since we now need to do the extra check on each value:

BEFORE

BenchmarkLogger/Simple_`S`_Log-10                 	 4570644	       263.9 ns/op
BenchmarkLogger/Complex_`S`_Log-10                	  307382	      3711 ns/op

AFTER 

BenchmarkLogger/Simple_`S`_Log-10                 	 4641754	       264.2 ns/op
BenchmarkLogger/Complex_`S`_Log-10                	  302826	      3821 ns/op

Copy link

@bhandras bhandras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌮

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.

2 participants