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

add a checkArgument that avoids varargs #465

Merged
merged 1 commit into from
Jul 4, 2019
Merged

add a checkArgument that avoids varargs #465

merged 1 commit into from
Jul 4, 2019

Conversation

joshgord
Copy link
Contributor

@joshgord joshgord commented Jul 4, 2019

and the allocation overhead of creating a string array

during application profiling found that some allocation can be avoided if we explicitly invoke the checkArgument method without varargs

Allocation profiling via async-profiler:

--- 1451114625215846968 bytes (21.40%), 10371 samples
  [ 0] java.lang.String[]
  [ 1] com.netflix.servo.tag.BasicTag.checkNotEmpty
  [ 2] com.netflix.servo.tag.BasicTag.<init>
  [ 3] com.netflix.servo.tag.Tags.newTag
  [ 4] com.netflix.servo.monitor.MonitorConfig$Builder.withTag

@brharrington brharrington merged commit 6480bc4 into master Jul 4, 2019
@brharrington brharrington deleted the allocs branch July 4, 2019 19:31
@brharrington
Copy link
Contributor

Thanks for the contribution. This was released in 0.12.28.

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