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 c91b100 commit 0857633Copy full SHA for 0857633
src/runtime/pprof/label.go
@@ -57,8 +57,8 @@ func (l *labelMap) String() string {
57
// WithLabels returns a new context.Context with the given labels added.
58
// A label overwrites a prior label with the same key.
59
func WithLabels(ctx context.Context, labels LabelSet) context.Context {
60
- childLabels := make(labelMap)
61
parentLabels := labelValue(ctx)
+ childLabels := make(labelMap, len(parentLabels))
62
// TODO(matloob): replace the map implementation with something
63
// more efficient so creating a child context WithLabels doesn't need
64
// to clone the map.
0 commit comments