diff --git a/docs/api.md b/docs/api.md index 479d614c0385d..fb1a93cb4ba80 100644 --- a/docs/api.md +++ b/docs/api.md @@ -888,9 +888,9 @@ The example belows show all possible statistics returned with their respective d "totalDuplicates": 0 // Total of duplicates removed from replication }, "summary": { - "bytesProcessedPerSeconds": 0, // Total of bytes processed per second + "bytesProcessedPerSecond": 0, // Total of bytes processed per second "execTime": 0, // Total execution time in seconds (float) - "linesProcessedPerSeconds": 0, // Total lines processed per second + "linesProcessedPerSecond": 0, // Total lines processed per second "totalBytesProcessed":0, // Total amount of bytes processed overall for this request "totalLinesProcessed":0 // Total amount of lines processed overall for this request } diff --git a/pkg/logql/marshal/legacy/marshal_test.go b/pkg/logql/marshal/legacy/marshal_test.go index db6c34fc3b99c..de352e85fe706 100644 --- a/pkg/logql/marshal/legacy/marshal_test.go +++ b/pkg/logql/marshal/legacy/marshal_test.go @@ -68,9 +68,9 @@ var queryTests = []struct { "totalDuplicates": 0 }, "summary": { - "bytesProcessedPerSeconds": 0, + "bytesProcessedPerSecond": 0, "execTime": 0, - "linesProcessedPerSeconds": 0, + "linesProcessedPerSecond": 0, "totalBytesProcessed":0, "totalLinesProcessed":0 } diff --git a/pkg/logql/marshal/marshal_test.go b/pkg/logql/marshal/marshal_test.go index e6bee5b4e5f81..c053c21e2aebe 100644 --- a/pkg/logql/marshal/marshal_test.go +++ b/pkg/logql/marshal/marshal_test.go @@ -73,9 +73,9 @@ var queryTests = []struct { "totalDuplicates": 0 }, "summary": { - "bytesProcessedPerSeconds": 0, + "bytesProcessedPerSecond": 0, "execTime": 0, - "linesProcessedPerSeconds": 0, + "linesProcessedPerSecond": 0, "totalBytesProcessed":0, "totalLinesProcessed":0 } @@ -169,9 +169,9 @@ var queryTests = []struct { "totalDuplicates": 0 }, "summary": { - "bytesProcessedPerSeconds": 0, + "bytesProcessedPerSecond": 0, "execTime": 0, - "linesProcessedPerSeconds": 0, + "linesProcessedPerSecond": 0, "totalBytesProcessed":0, "totalLinesProcessed":0 } @@ -282,9 +282,9 @@ var queryTests = []struct { "totalDuplicates": 0 }, "summary": { - "bytesProcessedPerSeconds": 0, + "bytesProcessedPerSecond": 0, "execTime": 0, - "linesProcessedPerSeconds": 0, + "linesProcessedPerSecond": 0, "totalBytesProcessed":0, "totalLinesProcessed":0 } diff --git a/pkg/logql/metrics.go b/pkg/logql/metrics.go index 83af61a393429..63b3ec0ecfb22 100644 --- a/pkg/logql/metrics.go +++ b/pkg/logql/metrics.go @@ -24,7 +24,7 @@ const ( ) var ( - bytesPerSeconds = promauto.NewHistogramVec(prometheus.HistogramOpts{ + bytesPerSecond = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: "loki", Name: "logql_querystats_bytes_processed_per_seconds", Help: "Distribution of bytes processed per second for LogQL queries.", @@ -87,12 +87,12 @@ func RecordMetrics(ctx context.Context, p Params, status string, stats stats.Res "step", p.Step(), "duration", time.Duration(int64(stats.Summary.ExecTime*float64(time.Second))), "status", status, - "throughput_mb", float64(stats.Summary.BytesProcessedPerSeconds)/10e6, + "throughput_mb", float64(stats.Summary.BytesProcessedPerSecond)/10e6, "total_bytes_mb", float64(stats.Summary.TotalBytesProcessed)/10e6, ) - bytesPerSeconds.WithLabelValues(status, queryType, rt, latencyType). - Observe(float64(stats.Summary.BytesProcessedPerSeconds)) + bytesPerSecond.WithLabelValues(status, queryType, rt, latencyType). + Observe(float64(stats.Summary.BytesProcessedPerSecond)) execLatency.WithLabelValues(status, queryType, rt). Observe(stats.Summary.ExecTime) chunkDownloadLatency.WithLabelValues(status, queryType, rt). diff --git a/pkg/logql/metrics_test.go b/pkg/logql/metrics_test.go index 913d54658d456..076cc10c55746 100644 --- a/pkg/logql/metrics_test.go +++ b/pkg/logql/metrics_test.go @@ -65,9 +65,9 @@ func TestLogSlowQuery(t *testing.T) { step: time.Minute, }, "200", stats.Result{ Summary: stats.Summary{ - BytesProcessedPerSeconds: 100000, - ExecTime: 25.25, - TotalBytesProcessed: 100000, + BytesProcessedPerSecond: 100000, + ExecTime: 25.25, + TotalBytesProcessed: 100000, }, }) require.Equal(t, diff --git a/pkg/logql/stats/context.go b/pkg/logql/stats/context.go index 6b5a6800b3e63..a481b68671e0d 100644 --- a/pkg/logql/stats/context.go +++ b/pkg/logql/stats/context.go @@ -68,8 +68,8 @@ func (r Result) Log(log log.Logger) { func (s Summary) Log(log log.Logger) { _ = log.Log( - "Summary.BytesProcessedPerSeconds", humanize.Bytes(uint64(s.BytesProcessedPerSeconds)), - "Summary.LinesProcessedPerSeconds", s.LinesProcessedPerSeconds, + "Summary.BytesProcessedPerSecond", humanize.Bytes(uint64(s.BytesProcessedPerSecond)), + "Summary.LinesProcessedPerSecond", s.LinesProcessedPerSecond, "Summary.TotalBytesProcessed", humanize.Bytes(uint64(s.TotalBytesProcessed)), "Summary.TotalLinesProcessed", s.TotalLinesProcessed, "Summary.ExecTime", time.Duration(int64(s.ExecTime*float64(time.Second))), @@ -170,10 +170,10 @@ func (r *Result) ComputeSummary(execTime time.Duration) { r.Ingester.DecompressedLines + r.Ingester.HeadChunkLines r.Summary.ExecTime = execTime.Seconds() if execTime != 0 { - r.Summary.BytesProcessedPerSeconds = + r.Summary.BytesProcessedPerSecond = int64(float64(r.Summary.TotalBytesProcessed) / execTime.Seconds()) - r.Summary.LinesProcessedPerSeconds = + r.Summary.LinesProcessedPerSecond = int64(float64(r.Summary.TotalLinesProcessed) / execTime.Seconds()) } diff --git a/pkg/logql/stats/context_test.go b/pkg/logql/stats/context_test.go index b160544261f96..8c0187d663dce 100644 --- a/pkg/logql/stats/context_test.go +++ b/pkg/logql/stats/context_test.go @@ -54,11 +54,11 @@ func TestSnapshot(t *testing.T) { TotalDuplicates: 10, }, Summary: Summary{ - ExecTime: 2 * time.Second.Seconds(), - BytesProcessedPerSeconds: int64(42), - LinesProcessedPerSeconds: int64(50), - TotalBytesProcessed: int64(84), - TotalLinesProcessed: int64(100), + ExecTime: 2 * time.Second.Seconds(), + BytesProcessedPerSecond: int64(42), + LinesProcessedPerSecond: int64(50), + TotalBytesProcessed: int64(84), + TotalLinesProcessed: int64(100), }, } require.Equal(t, expected, res) @@ -116,11 +116,11 @@ func TestResult_Merge(t *testing.T) { TotalDuplicates: 10, }, Summary: Summary{ - ExecTime: 2 * time.Second.Seconds(), - BytesProcessedPerSeconds: int64(42), - LinesProcessedPerSeconds: int64(50), - TotalBytesProcessed: int64(84), - TotalLinesProcessed: int64(100), + ExecTime: 2 * time.Second.Seconds(), + BytesProcessedPerSecond: int64(42), + LinesProcessedPerSecond: int64(50), + TotalBytesProcessed: int64(84), + TotalLinesProcessed: int64(100), }, } @@ -154,11 +154,11 @@ func TestResult_Merge(t *testing.T) { TotalDuplicates: 2 * 10, }, Summary: Summary{ - ExecTime: 2 * 2 * time.Second.Seconds(), - BytesProcessedPerSeconds: int64(42), // 2 requests at the same pace should give the same bytes/lines per sec - LinesProcessedPerSeconds: int64(50), - TotalBytesProcessed: 2 * int64(84), - TotalLinesProcessed: 2 * int64(100), + ExecTime: 2 * 2 * time.Second.Seconds(), + BytesProcessedPerSecond: int64(42), // 2 requests at the same pace should give the same bytes/lines per sec + LinesProcessedPerSecond: int64(50), + TotalBytesProcessed: 2 * int64(84), + TotalLinesProcessed: 2 * int64(100), }, }, res) diff --git a/pkg/logql/stats/stats.pb.go b/pkg/logql/stats/stats.pb.go index 270e63aaf28aa..f626edf380443 100644 --- a/pkg/logql/stats/stats.pb.go +++ b/pkg/logql/stats/stats.pb.go @@ -88,9 +88,9 @@ func (m *Result) GetIngester() Ingester { // Summary is the summary of a query statistics. type Summary struct { // Total bytes processed per second. - BytesProcessedPerSeconds int64 `protobuf:"varint,1,opt,name=bytesProcessedPerSeconds,proto3" json:"bytesProcessedPerSeconds"` + BytesProcessedPerSecond int64 `protobuf:"varint,1,opt,name=bytesProcessedPerSecond,proto3" json:"bytesProcessedPerSecond"` // Total lines processed per second. - LinesProcessedPerSeconds int64 `protobuf:"varint,2,opt,name=linesProcessedPerSeconds,proto3" json:"linesProcessedPerSeconds"` + LinesProcessedPerSecond int64 `protobuf:"varint,2,opt,name=linesProcessedPerSecond,proto3" json:"linesProcessedPerSecond"` // Total bytes processed. TotalBytesProcessed int64 `protobuf:"varint,3,opt,name=totalBytesProcessed,proto3" json:"totalBytesProcessed"` // Total lines processed. @@ -131,16 +131,16 @@ func (m *Summary) XXX_DiscardUnknown() { var xxx_messageInfo_Summary proto.InternalMessageInfo -func (m *Summary) GetBytesProcessedPerSeconds() int64 { +func (m *Summary) GetBytesProcessedPerSecond() int64 { if m != nil { - return m.BytesProcessedPerSeconds + return m.BytesProcessedPerSecond } return 0 } -func (m *Summary) GetLinesProcessedPerSeconds() int64 { +func (m *Summary) GetLinesProcessedPerSecond() int64 { if m != nil { - return m.LinesProcessedPerSeconds + return m.LinesProcessedPerSecond } return 0 } @@ -418,48 +418,48 @@ func init() { proto.RegisterFile("pkg/logql/stats/stats.proto", fileDescriptor_7 var fileDescriptor_770b8387e5696475 = []byte{ // 675 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6e, 0xd3, 0x40, - 0x14, 0xf5, 0x34, 0xcd, 0xa3, 0x43, 0x69, 0xcb, 0x54, 0x85, 0xf0, 0xd0, 0xb8, 0xca, 0x86, 0x6e, - 0x68, 0xc4, 0x63, 0x03, 0x52, 0x37, 0x6e, 0x85, 0x54, 0x09, 0x44, 0x35, 0x65, 0x81, 0x90, 0x58, - 0x38, 0xf6, 0x34, 0x89, 0xea, 0x78, 0x82, 0x67, 0x22, 0xe8, 0x8e, 0x4f, 0xe0, 0x33, 0xf8, 0x01, - 0xfe, 0xa1, 0xcb, 0x2e, 0xbb, 0x40, 0x16, 0x75, 0x37, 0xc8, 0xab, 0xae, 0x91, 0x90, 0x90, 0xaf, - 0x1d, 0x37, 0x9e, 0x38, 0x12, 0x52, 0xd8, 0xb4, 0x73, 0xcf, 0xb9, 0xe7, 0xcc, 0xcc, 0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xe1, 0x0d, 0xec, 0x23, 0xdb, 0xb7, 0xdb, 0x9e, 0x38, 0xee, 0xb7, 0xb5, 0x8f, 0x76, - 0xa7, 0x06, 0x5f, 0xde, 0xa7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x83, 0xed, 0xf0, 0xce, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xf5, 0x34, 0xcd, 0x4f, 0xe7, 0xeb, 0xd7, 0x96, 0xa9, 0x4a, 0x03, 0x95, 0xc6, 0x55, 0x36, + 0x74, 0x43, 0x23, 0x7e, 0x36, 0x20, 0x75, 0xe3, 0x56, 0x48, 0x95, 0x40, 0x54, 0x53, 0xd8, 0x20, + 0xb1, 0x70, 0x9c, 0x69, 0x62, 0xd5, 0xf1, 0x04, 0x7b, 0x2c, 0xe8, 0x8e, 0x47, 0xe0, 0x31, 0x78, + 0x01, 0xde, 0xa1, 0xcb, 0x2e, 0xbb, 0x40, 0x16, 0x75, 0x37, 0xc8, 0xab, 0xee, 0x90, 0x58, 0x21, + 0x5f, 0xff, 0x34, 0x9e, 0x38, 0x12, 0x52, 0xd8, 0x24, 0x73, 0xcf, 0xb9, 0xe7, 0xce, 0xcc, 0x9d, + 0x33, 0x1e, 0xbc, 0x35, 0x3e, 0x1d, 0x74, 0x1d, 0x31, 0xf8, 0xe0, 0x74, 0x7d, 0x69, 0x4a, 0x3f, + 0xfd, 0xdd, 0x1d, 0x7b, 0x42, 0x0a, 0x52, 0x87, 0xe0, 0xfe, 0xc3, 0x81, 0x2d, 0x87, 0x41, 0x6f, + 0xd7, 0x12, 0xa3, 0xee, 0x40, 0x0c, 0x44, 0x17, 0xd8, 0x5e, 0x70, 0x02, 0x11, 0x04, 0x30, 0x4a, + 0x55, 0x9d, 0x6f, 0x08, 0x37, 0x18, 0xf7, 0x03, 0x47, 0x92, 0x67, 0xb8,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 0x2d, 0x0e, 0xf5, 0x12, 0xce, 0x4a, 0x51, + 0x62, 0x85, 0x09, 0x8f, 0xbc, 0x32, 0x25, 0x68, 0x53, 0x63, 0x81, 0x15, 0xa6, 0x59, 0x56, 0x81, + 0x15, 0xb3, 0x1b, 0x10, 0xfb, 0xd9, 0x15, 0xbd, 0x9d, 0x3d, 0xc3, 0x59, 0x29, 0x2a, 0x6e, 0x05, + 0x34, 0xf3, 0x98, 0xbb, 0x72, 0xd2, 0x40, 0x65, 0x86, 0x29, 0x71, 0x85, 0xf9, 0xea, 0x73, 0x98, + 0xaf, 0x31, 0x9f, 0xf9, 0x9a, 0xff, 0xc2, 0x7c, 0xad, 0xf9, 0xcd, 0xb7, 0x34, 0x9f, 0xf9, 0xf0, + 0xdf, 0x9b, 0xcf, 0x78, 0x7f, 0x71, 0x45, 0xb5, 0xcb, 0x2b, 0xaa, 0xdd, 0x5c, 0x51, 0xf4, 0x39, + 0xa2, 0xe8, 0x6b, 0x44, 0xd1, 0x79, 0x44, 0xd1, 0x45, 0x44, 0xd1, 0x8f, 0x88, 0xa2, 0x9f, 0x11, + 0xd5, 0x6e, 0x22, 0x8a, 0xbe, 0x5c, 0x53, 0xed, 0xe2, 0x9a, 0x6a, 0x97, 0xd7, 0x54, 0x7b, 0xf7, + 0x60, 0xf2, 0xc9, 0xf5, 0xcc, 0x13, 0xd3, 0x35, 0xbb, 0x8e, 0x38, 0xb5, 0xbb, 0xca, 0x73, 0xdd, + 0x6b, 0xc0, 0x9b, 0xfb, 0xe4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x43, 0x1d, 0xe6, 0xf7, 0xc8, 0x07, 0x00, 0x00, } @@ -512,10 +512,10 @@ func (this *Summary) Equal(that interface{}) bool { } else if this == nil { return false } - if this.BytesProcessedPerSeconds != that1.BytesProcessedPerSeconds { + if this.BytesProcessedPerSecond != that1.BytesProcessedPerSecond { return false } - if this.LinesProcessedPerSeconds != that1.LinesProcessedPerSeconds { + if this.LinesProcessedPerSecond != that1.LinesProcessedPerSecond { return false } if this.TotalBytesProcessed != that1.TotalBytesProcessed { @@ -646,8 +646,8 @@ func (this *Summary) GoString() string { } s := make([]string, 0, 9) s = append(s, "&stats.Summary{") - s = append(s, "BytesProcessedPerSeconds: "+fmt.Sprintf("%#v", this.BytesProcessedPerSeconds)+",\n") - s = append(s, "LinesProcessedPerSeconds: "+fmt.Sprintf("%#v", this.LinesProcessedPerSeconds)+",\n") + s = append(s, "BytesProcessedPerSecond: "+fmt.Sprintf("%#v", this.BytesProcessedPerSecond)+",\n") + s = append(s, "LinesProcessedPerSecond: "+fmt.Sprintf("%#v", this.LinesProcessedPerSecond)+",\n") s = append(s, "TotalBytesProcessed: "+fmt.Sprintf("%#v", this.TotalBytesProcessed)+",\n") s = append(s, "TotalLinesProcessed: "+fmt.Sprintf("%#v", this.TotalLinesProcessed)+",\n") s = append(s, "ExecTime: "+fmt.Sprintf("%#v", this.ExecTime)+",\n") @@ -756,15 +756,15 @@ func (m *Summary) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.BytesProcessedPerSeconds != 0 { + if m.BytesProcessedPerSecond != 0 { dAtA[i] = 0x8 i++ - i = encodeVarintStats(dAtA, i, uint64(m.BytesProcessedPerSeconds)) + i = encodeVarintStats(dAtA, i, uint64(m.BytesProcessedPerSecond)) } - if m.LinesProcessedPerSeconds != 0 { + if m.LinesProcessedPerSecond != 0 { dAtA[i] = 0x10 i++ - i = encodeVarintStats(dAtA, i, uint64(m.LinesProcessedPerSeconds)) + i = encodeVarintStats(dAtA, i, uint64(m.LinesProcessedPerSecond)) } if m.TotalBytesProcessed != 0 { dAtA[i] = 0x18 @@ -947,11 +947,11 @@ func (m *Summary) Size() (n int) { } var l int _ = l - if m.BytesProcessedPerSeconds != 0 { - n += 1 + sovStats(uint64(m.BytesProcessedPerSeconds)) + if m.BytesProcessedPerSecond != 0 { + n += 1 + sovStats(uint64(m.BytesProcessedPerSecond)) } - if m.LinesProcessedPerSeconds != 0 { - n += 1 + sovStats(uint64(m.LinesProcessedPerSeconds)) + if m.LinesProcessedPerSecond != 0 { + n += 1 + sovStats(uint64(m.LinesProcessedPerSecond)) } if m.TotalBytesProcessed != 0 { n += 1 + sovStats(uint64(m.TotalBytesProcessed)) @@ -1070,8 +1070,8 @@ func (this *Summary) String() string { return "nil" } s := strings.Join([]string{`&Summary{`, - `BytesProcessedPerSeconds:` + fmt.Sprintf("%v", this.BytesProcessedPerSeconds) + `,`, - `LinesProcessedPerSeconds:` + fmt.Sprintf("%v", this.LinesProcessedPerSeconds) + `,`, + `BytesProcessedPerSecond:` + fmt.Sprintf("%v", this.BytesProcessedPerSecond) + `,`, + `LinesProcessedPerSecond:` + fmt.Sprintf("%v", this.LinesProcessedPerSecond) + `,`, `TotalBytesProcessed:` + fmt.Sprintf("%v", this.TotalBytesProcessed) + `,`, `TotalLinesProcessed:` + fmt.Sprintf("%v", this.TotalLinesProcessed) + `,`, `ExecTime:` + fmt.Sprintf("%v", this.ExecTime) + `,`, @@ -1307,9 +1307,9 @@ func (m *Summary) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BytesProcessedPerSeconds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BytesProcessedPerSecond", wireType) } - m.BytesProcessedPerSeconds = 0 + m.BytesProcessedPerSecond = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStats @@ -1319,16 +1319,16 @@ func (m *Summary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BytesProcessedPerSeconds |= int64(b&0x7F) << shift + m.BytesProcessedPerSecond |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LinesProcessedPerSeconds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LinesProcessedPerSecond", wireType) } - m.LinesProcessedPerSeconds = 0 + m.LinesProcessedPerSecond = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowStats @@ -1338,7 +1338,7 @@ func (m *Summary) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LinesProcessedPerSeconds |= int64(b&0x7F) << shift + m.LinesProcessedPerSecond |= int64(b&0x7F) << shift if b < 0x80 { break } diff --git a/pkg/logql/stats/stats.proto b/pkg/logql/stats/stats.proto index 13a9b89966d37..e941e60d2aa15 100644 --- a/pkg/logql/stats/stats.proto +++ b/pkg/logql/stats/stats.proto @@ -19,9 +19,9 @@ message Result { // Summary is the summary of a query statistics. message Summary { // Total bytes processed per second. - int64 bytesProcessedPerSeconds = 1 [(gogoproto.jsontag) = "bytesProcessedPerSeconds"]; + int64 bytesProcessedPerSecond = 1 [(gogoproto.jsontag) = "bytesProcessedPerSecond"]; // Total lines processed per second. - int64 linesProcessedPerSeconds = 2 [(gogoproto.jsontag) = "linesProcessedPerSeconds"]; + int64 linesProcessedPerSecond = 2 [(gogoproto.jsontag) = "linesProcessedPerSecond"]; // Total bytes processed. int64 totalBytesProcessed = 3 [(gogoproto.jsontag) = "totalBytesProcessed"]; // Total lines processed. diff --git a/pkg/querier/queryrange/codec_test.go b/pkg/querier/queryrange/codec_test.go index 91913bbc29595..e011d757b8a4e 100644 --- a/pkg/querier/queryrange/codec_test.go +++ b/pkg/querier/queryrange/codec_test.go @@ -655,9 +655,9 @@ var ( "totalDuplicates": 19 }, "summary": { - "bytesProcessedPerSeconds": 20, + "bytesProcessedPerSecond": 20, "execTime": 21, - "linesProcessedPerSeconds": 22, + "linesProcessedPerSecond": 22, "totalBytesProcessed": 23, "totalLinesProcessed": 24 } @@ -758,11 +758,11 @@ var ( } statsResult = stats.Result{ Summary: stats.Summary{ - BytesProcessedPerSeconds: 20, - ExecTime: 21, - LinesProcessedPerSeconds: 22, - TotalBytesProcessed: 23, - TotalLinesProcessed: 24, + BytesProcessedPerSecond: 20, + ExecTime: 21, + LinesProcessedPerSecond: 22, + TotalBytesProcessed: 23, + TotalLinesProcessed: 24, }, Store: stats.Store{ CompressedBytes: 11,