We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1e657c commit 6f44ae8Copy full SHA for 6f44ae8
metadata/metadata_test.go
@@ -335,3 +335,21 @@ func BenchmarkFromOutgoingContext(b *testing.B) {
335
FromOutgoingContext(ctx)
336
}
337
338
+
339
+func BenchmarkFromIncomingContext(b *testing.B) {
340
+ md := Pairs("X-My-Header-1", "42")
341
+ ctx := NewIncomingContext(context.Background(), md)
342
+ b.ResetTimer()
343
+ for n := 0; n < b.N; n++ {
344
+ FromIncomingContext(ctx)
345
+ }
346
+}
347
348
+func BenchmarkValueFromIncomingContext(b *testing.B) {
349
350
351
352
353
+ ValueFromIncomingContext(ctx, "x-my-header-1")
354
355
0 commit comments