File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package nighthawk
33import (
44 "errors"
55 "fmt"
6+ "strings"
67 "time"
78
89 nighthawk_client "github.com/layer5io/nighthawk-go/pkg/proto"
@@ -20,7 +21,7 @@ func Transform(res *nighthawk_client.ExecutionResponse) ([]byte, error) {
2021 if workers = len (res .Output .Results ); workers != 1 {
2122 workers --
2223 }
23- // TODO resFortio.Label
24+ resFortio . Labels = strings . Join ( res . Output . GetOptions (). GetLabels (), " " )
2425 resFortio .Version = res .Output .GetVersion ().GetVersion ().String ()
2526 resFortio .StartTime = res .Output .GetTimestamp ()
2627 resFortio .RequestedQPS = uint32 (workers ) * res .Output .Options .RequestsPerSecond .GetValue ()
@@ -63,7 +64,9 @@ func Transform(res *nighthawk_client.ExecutionResponse) ([]byte, error) {
6364 resFortio .HeaderSizes = renderFortioDurationHistogram (statistic )
6465 }
6566
66- out , err := protojson .Marshal (resFortio )
67+ out , err := protojson.MarshalOptions {
68+ EmitUnpopulated : true ,
69+ }.Marshal (resFortio )
6770 if err != nil {
6871 return nil , err
6972 }
You can’t perform that action at this time.
0 commit comments