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

Use sync.atomic to synchronize logging logLevel #716

Closed
adamcfraser opened this Issue Mar 10, 2015 · 1 comment

Comments

Projects
None yet
4 participants
@adamcfraser
Copy link
Contributor

adamcfraser commented Mar 10, 2015

sync.atomic performs significantly better than RWMutex for single int synchronization. (see https://go-review.googlesource.com/#/c/3430/).

Moving loglevel checks (as in base.LogTo) outside the RWMutex will streamline performance when running in non-debug mode. (logLevel greater than 1)

@adamcfraser adamcfraser self-assigned this Mar 10, 2015

@adamcfraser adamcfraser added the backlog label Mar 20, 2015

@adamcfraser adamcfraser added icebox and removed backlog labels Oct 12, 2016

@djpongh djpongh removed the size-small label Oct 17, 2016

@djpongh djpongh added this to the 2.2.0 milestone Jan 31, 2018

@bbrks bbrks assigned bbrks and unassigned adamcfraser Apr 13, 2018

@bbrks bbrks modified the milestones: 2.2.0, 2.1.0 Apr 13, 2018

@bbrks bbrks removed the icebox label Apr 13, 2018

@bbrks

This comment has been minimized.

Copy link
Member

bbrks commented Apr 13, 2018

This is already being done as part of the new logging in 2.1.0

@bbrks bbrks added the ready label Apr 13, 2018

@bbrks bbrks closed this Apr 13, 2018

@snej snej removed the ready label Apr 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment