Skip to content

Commit

Permalink
Preallocate spans slice
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
  • Loading branch information
pavolloffay committed Nov 15, 2017
1 parent 080a7dd commit 78db314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/collector/app/zipkin/jsonv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

func spansV2ToThrift(spans models.ListOfSpans) ([]*zipkincore.Span, error) {
var tSpans []*zipkincore.Span
tSpans := make([]*zipkincore.Span, 0, len(spans))
for _, span := range spans {
tSpan, err := spanV2ToThrift(span)
if err != nil {
Expand Down

0 comments on commit 78db314

Please sign in to comment.