diff --git a/pkg/client/transform.go b/pkg/client/transform.go index 3656a46b..d975fe1e 100644 --- a/pkg/client/transform.go +++ b/pkg/client/transform.go @@ -23,7 +23,7 @@ func Transform(res *nighthawk_client.ExecutionResponse) ([]byte, error) { // TODO resFortio.Label resFortio.Version = res.Output.GetVersion().GetVersion().String() resFortio.StartTime = res.Output.GetTimestamp() - resFortio.RequestedQPS = fmt.Sprint(uint32(workers) * res.Output.Options.RequestsPerSecond.GetValue()) + resFortio.RequestedQPS = uint32(workers) * res.Output.Options.RequestsPerSecond.GetValue() resFortio.URL = res.Output.Options.GetUri().GetValue() resFortio.RequestedDuration = durationpb.New(res.Output.Options.GetDuration().AsDuration()) // actual duration diff --git a/pkg/proto/fortio.pb.go b/pkg/proto/fortio.pb.go index eb013d65..1357fb70 100644 --- a/pkg/proto/fortio.pb.go +++ b/pkg/proto/fortio.pb.go @@ -43,7 +43,7 @@ type FortioResult struct { // Start time of the load test execution. StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=StartTime,proto3" json:"StartTime,omitempty"` // Configured qps - RequestedQPS string `protobuf:"bytes,3,opt,name=RequestedQPS,proto3" json:"RequestedQPS,omitempty"` + RequestedQPS uint32 `protobuf:"varint,3,opt,name=RequestedQPS,proto3" json:"RequestedQPS,omitempty"` // Configured duration RequestedDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=RequestedDuration,proto3" json:"RequestedDuration,omitempty"` // Effective qps @@ -129,11 +129,11 @@ func (x *FortioResult) GetStartTime() *timestamppb.Timestamp { return nil } -func (x *FortioResult) GetRequestedQPS() string { +func (x *FortioResult) GetRequestedQPS() uint32 { if x != nil { return x.RequestedQPS } - return "0" + return 0 } func (x *FortioResult) GetRequestedDuration() *durationpb.Duration {