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

Bring back zero-alloc label-value access for metric vecs #226

Merged
merged 3 commits into from
Aug 17, 2016
Merged

Conversation

beorn7
Copy link
Member

@beorn7 beorn7 commented Aug 17, 2016

Also, fix mutex copy-by-value bug.

Unfortunately, this did indeed require to duplicate a whole lot of code.

On the other hand, 117 additions and 89 deletions, not that bad... ;)

@grobie

beorn7 added 2 commits August 17, 2016 14:01
return false
}

if len(metrics) > 1 {
Copy link
Member

Choose a reason for hiding this comment

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

If we really care about duplicated code, we could even move these 5 lines out in another function.

Copy link
Member Author

Choose a reason for hiding this comment

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

True, but I guess it would not improve readability. So I better leave it as it is.

@grobie
Copy link
Member

grobie commented Aug 17, 2016

👍

@beorn7 beorn7 merged commit c5b7fcc into master Aug 17, 2016
@beorn7 beorn7 deleted the beorn7/alloc branch August 17, 2016 15: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.

2 participants