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

removes IpLiteral dependency from ZipkinV2JsonWriter #1414

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

codefromthecrypt
Copy link
Member

This removes a dependency on IpLiteral.detectFamily from json writing, and adds a benchmark to make sure it doesn't hurt performance. While a nit, this clarifies that it has already happened, so that a proto encoder port will not think it needs to re-detect also.

Before

Benchmark                                                              Mode     Cnt    Score   Error   Units
ZipkinV2JsonWriterBenchmarks.write_bigClientSpan:gc.alloc.rate.norm  sample      15   24.104 ± 0.011    B/op
ZipkinV2JsonWriterBenchmarks.write_bigClientSpan:p0.99               sample            0.791           us/op
ZipkinV2JsonWriterBenchmarks.write_serverSpan:gc.alloc.rate.norm     sample      15   24.040 ± 0.006    B/op
ZipkinV2JsonWriterBenchmarks.write_serverSpan:p0.99                  sample            0.333           us/op

After

Benchmark                                                              Mode     Cnt    Score   Error   Units
ZipkinV2JsonWriterBenchmarks.write_bigClientSpan:gc.alloc.rate.norm  sample      15   24.101 ± 0.011    B/op
ZipkinV2JsonWriterBenchmarks.write_bigClientSpan:p0.99               sample            0.750           us/op
ZipkinV2JsonWriterBenchmarks.write_serverSpan:gc.alloc.rate.norm     sample      15   24.039 ± 0.007    B/op
ZipkinV2JsonWriterBenchmarks.write_serverSpan:p0.99                  sample            0.333           us/op

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt
Copy link
Member Author

hmm this seems unrelated

 Error:  Failures: 
Error:    ThreadLocalSpanClassLoaderTest.currentTracer_basicUsage_unloadable:35 class brave.propagation.ThreadLocalSpanClassLoaderTest$ExplicitTracerBasicUsage includes state that couldn't be garbage collected

Adrian Cole added 2 commits February 13, 2024 11:01
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Adrian Cole <adrian@tetrate.io>
@@ -652,6 +652,15 @@ class Tag {
.isEqualTo(new MutableSpan(context, null));
}

@Test void unwrapsIpv4() {
Copy link
Member Author

Choose a reason for hiding this comment

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

noticed we missed a test before on this

@codefromthecrypt
Copy link
Member Author

Thanks for the look, folks!

@codefromthecrypt codefromthecrypt merged commit 665e3e8 into master Feb 13, 2024
3 checks passed
@codefromthecrypt codefromthecrypt deleted the less-writer-deps branch February 13, 2024 03:58
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.

None yet

3 participants