Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add a checkArgument that avoids varargs #465

Merged
brharrington merged 1 commit intomasterfrom
allocs
Jul 4, 2019
Merged

add a checkArgument that avoids varargs #465
brharrington merged 1 commit intomasterfrom
allocs

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

Comments