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
3
3
import (
4
4
"errors"
5
5
"fmt"
6
+ "strings"
6
7
"time"
7
8
8
9
nighthawk_client "github.com/layer5io/nighthawk-go/pkg/proto"
@@ -20,7 +21,7 @@ func Transform(res *nighthawk_client.ExecutionResponse) ([]byte, error) {
20
21
if workers = len (res .Output .Results ); workers != 1 {
21
22
workers --
22
23
}
23
- // TODO resFortio.Label
24
+ resFortio . Labels = strings . Join ( res . Output . GetOptions (). GetLabels (), " " )
24
25
resFortio .Version = res .Output .GetVersion ().GetVersion ().String ()
25
26
resFortio .StartTime = res .Output .GetTimestamp ()
26
27
resFortio .RequestedQPS = uint32 (workers ) * res .Output .Options .RequestsPerSecond .GetValue ()
@@ -63,7 +64,9 @@ func Transform(res *nighthawk_client.ExecutionResponse) ([]byte, error) {
63
64
resFortio .HeaderSizes = renderFortioDurationHistogram (statistic )
64
65
}
65
66
66
- out , err := protojson .Marshal (resFortio )
67
+ out , err := protojson.MarshalOptions {
68
+ EmitUnpopulated : true ,
69
+ }.Marshal (resFortio )
67
70
if err != nil {
68
71
return nil , err
69
72
}
You can’t perform that action at this time.
0 commit comments