From e44c4d7c1bfce3833300949fafdf69d17051ec38 Mon Sep 17 00:00:00 2001 From: MUzairS15 Date: Fri, 9 Jun 2023 01:25:01 +0530 Subject: [PATCH] change from int32 to string Signed-off-by: MUzairS15 --- pkg/client/transform.go | 2 +- pkg/proto/fortio.pb.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/client/transform.go b/pkg/client/transform.go index d975fe1e..3656a46b 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 = uint32(workers) * res.Output.Options.RequestsPerSecond.GetValue() + resFortio.RequestedQPS = fmt.Sprint(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 1357fb70..73786c92 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 uint32 `protobuf:"varint,3,opt,name=RequestedQPS,proto3" json:"RequestedQPS,omitempty"` + RequestedQPS string `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() uint32 { +func (x *FortioResult) GetRequestedQPS() string { if x != nil { return x.RequestedQPS } - return 0 + return "0" } func (x *FortioResult) GetRequestedDuration() *durationpb.Duration {