From c769f07b5db2721baccf0af02215dfdbe0304de9 Mon Sep 17 00:00:00 2001 From: Lindsey Jin Date: Thu, 16 Sep 2021 12:27:24 -0400 Subject: [PATCH] roachpb/sql/ui: add mean rows written to Statement Details page Resolves #67084 Previously, the Statement Details page did not show the mean rows written to. We received feedback to surface rows affected. To address this, we are adding "mean rows written" to non-SELECT statements. A future PR will also add this new metric to the column selector on the Statements Overview page. Release note (ui change): add mean rows written to statement details page --- pkg/roachpb/app_stats.go | 4 +- pkg/roachpb/app_stats.pb.go | 277 +++++++++++------- pkg/roachpb/app_stats.proto | 3 + pkg/sql/executor_statement_metrics.go | 1 + .../sqlstatsutil/json_encoding_test.go | 4 + .../sqlstatsutil/json_impl.go | 1 + .../sqlstats/ssmemstorage/ss_mem_writer.go | 1 + pkg/sql/sqlstats/ssprovider.go | 1 + .../src/statementDetails/statementDetails.tsx | 17 ++ .../statementsPage/statementsPage.fixture.ts | 4 + .../src/util/appStats/appStats.fixture.ts | 27 ++ .../src/util/appStats/appStats.spec.ts | 1 + .../cluster-ui/src/util/appStats/appStats.ts | 6 + .../src/views/statements/statements.spec.tsx | 1 + 14 files changed, 234 insertions(+), 114 deletions(-) diff --git a/pkg/roachpb/app_stats.go b/pkg/roachpb/app_stats.go index bf9a72504b98..e55cbf701e86 100644 --- a/pkg/roachpb/app_stats.go +++ b/pkg/roachpb/app_stats.go @@ -148,6 +148,7 @@ func (s *StatementStatistics) Add(other *StatementStatistics) { s.OverheadLat.Add(other.OverheadLat, s.Count, other.Count) s.BytesRead.Add(other.BytesRead, s.Count, other.Count) s.RowsRead.Add(other.RowsRead, s.Count, other.Count) + s.RowsWritten.Add(other.RowsWritten, s.Count, other.Count) s.Nodes = util.CombineUniqueInt64(s.Nodes, other.Nodes) s.ExecStats.Add(other.ExecStats) @@ -181,7 +182,8 @@ func (s *StatementStatistics) AlmostEqual(other *StatementStatistics, eps float6 s.OverheadLat.AlmostEqual(other.OverheadLat, eps) && s.SensitiveInfo.Equal(other.SensitiveInfo) && s.BytesRead.AlmostEqual(other.BytesRead, eps) && - s.RowsRead.AlmostEqual(other.RowsRead, eps) + s.RowsRead.AlmostEqual(other.RowsRead, eps) && + s.RowsWritten.AlmostEqual(other.RowsWritten, eps) // s.ExecStats are deliberately ignored since they are subject to sampling // probability and are not fully deterministic (e.g. the number of network // messages depends on the range cache state). diff --git a/pkg/roachpb/app_stats.pb.go b/pkg/roachpb/app_stats.pb.go index 62ce358fe65e..249cd34b21c3 100644 --- a/pkg/roachpb/app_stats.pb.go +++ b/pkg/roachpb/app_stats.pb.go @@ -84,6 +84,8 @@ type StatementStatistics struct { BytesRead NumericStat `protobuf:"bytes,15,opt,name=bytes_read,json=bytesRead" json:"bytes_read"` // RowsRead collects the number of rows read from disk. RowsRead NumericStat `protobuf:"bytes,16,opt,name=rows_read,json=rowsRead" json:"rows_read"` + // RowsWritten collects the number of rows read from disk. + RowsWritten NumericStat `protobuf:"bytes,25,opt,name=rows_written,json=rowsWritten" json:"rows_written"` // ExecStats are the execution statistics for this statement. These statistics // are sampled. ExecStats ExecStats `protobuf:"bytes,21,opt,name=exec_stats,json=execStats" json:"exec_stats"` @@ -569,99 +571,101 @@ func init() { func init() { proto.RegisterFile("roachpb/app_stats.proto", fileDescriptor_81c296505f9d1940) } var fileDescriptor_81c296505f9d1940 = []byte{ - // 1463 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xbd, 0x72, 0xdb, 0x46, - 0x10, 0x16, 0x48, 0x50, 0x04, 0x97, 0xa4, 0x44, 0x9d, 0x24, 0x0b, 0xe6, 0x68, 0x48, 0x99, 0x13, - 0x8f, 0xe5, 0xfc, 0x48, 0x19, 0x4d, 0x9a, 0xfc, 0xf8, 0x8f, 0x96, 0x3d, 0x91, 0x2c, 0x7b, 0x62, - 0x8a, 0x69, 0xd2, 0x60, 0x4e, 0xc0, 0x91, 0xc2, 0x08, 0x38, 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e2, 0x5b, 0x3d, 0x8e, 0xbb, 0x24, 0xf5, - 0x88, 0x25, 0x67, 0xb7, 0x87, 0xc4, 0xff, 0x56, 0x82, 0xd0, 0x8e, 0x2c, 0x09, 0x15, 0x84, 0x2a, - 0xea, 0xcb, 0xea, 0xa6, 0x1e, 0xb5, 0xe6, 0xce, 0x81, 0xb2, 0xc0, 0xe8, 0x01, 0x54, 0x92, 0x73, - 0xf9, 0x84, 0xcb, 0xec, 0xe9, 0xbf, 0xca, 0xe6, 0x63, 0xe4, 0xc3, 0x18, 0x88, 0xee, 0xc3, 0x9c, - 0x3c, 0x9d, 0xe3, 0xf2, 0xa3, 0xf8, 0x78, 0x69, 0x07, 0xb0, 0x92, 0x8f, 0xfb, 0xdb, 0x2e, 0x3f, - 0x52, 0xe7, 0x6b, 0x5e, 0x7f, 0xfe, 0x67, 0x6d, 0xe6, 0xf9, 0x59, 0x4d, 0x7b, 0x71, 0x56, 0xd3, - 0x5e, 0x9e, 0xd5, 0xb4, 0x3f, 0xce, 0x6a, 0xda, 0xd3, 0x57, 0xb5, 0x99, 0x17, 0xaf, 0x6a, 0x33, - 0x2f, 0x5f, 0xd5, 0x66, 0xbe, 0xcb, 0xc7, 0x5f, 0xe8, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x84, - 0x6a, 0x73, 0x38, 0xab, 0x0f, 0x00, 0x00, + // 1491 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6e, 0xdb, 0xc6, + 0x16, 0x36, 0x25, 0xca, 0xa2, 0x8e, 0x24, 0x5b, 0x1e, 0xdb, 0x31, 0x23, 0x18, 0x92, 0x23, 0xdc, + 0x20, 0xce, 0xfd, 0xb1, 0x2f, 0x8c, 0xbb, 0xb9, 0x3f, 0xce, 0x8f, 0xec, 0x04, 0xd7, 0x8e, 0x13, + 0x34, 0xb2, 0x8a, 0x02, 0xd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be, 0xc5, 0x88, 0x60, 0x2e, + 0xe1, 0x66, 0x76, 0x24, 0x1a, 0x7c, 0xdc, 0x6f, 0x45, 0x76, 0xf4, 0x77, 0x98, 0xf7, 0x48, 0x17, + 0xdb, 0x03, 0xcb, 0xc3, 0x5c, 0x58, 0x84, 0x31, 0x53, 0x5f, 0xd3, 0xd6, 0x0b, 0x71, 0x68, 0x39, + 0x72, 0x1e, 0x60, 0x2e, 0x1e, 0x31, 0x86, 0xb6, 0xc1, 0x9c, 0x88, 0xb6, 0x18, 0x71, 0xb0, 0x2d, + 0x88, 0x63, 0x16, 0x47, 0x60, 0xcb, 0x63, 0xb0, 0x56, 0x1c, 0x82, 0xfe, 0x0b, 0x06, 0xed, 0xf9, + 0x16, 0x0b, 0xce, 0xb9, 0x99, 0x5b, 0xd3, 0xd6, 0x8b, 0x5b, 0xd5, 0x8d, 0xb1, 0xb4, 0x6e, 0x3c, + 0xeb, 0xf9, 0x84, 0xb9, 0xb6, 0xcc, 0x4c, 0x4c, 0x95, 0xa7, 0x3d, 0xbf, 0x15, 0x9c, 0x73, 0xb4, + 0x0d, 0x85, 0x10, 0x33, 0x4e, 0x2c, 0x0f, 0x0b, 0x73, 0x36, 0x25, 0xda, 0x50, 0x90, 0x03, 0x2c, + 0xe4, 0xda, 0xa1, 0x87, 0xa9, 0x42, 0xe7, 0xd3, 0xae, 0x2d, 0x11, 0x12, 0xfc, 0x6f, 0xc8, 0xb3, + 0x5e, 0x84, 0x35, 0x52, 0x62, 0x67, 0x59, 0x4f, 0x41, 0x1f, 0x42, 0x91, 0x13, 0x76, 0xe6, 0xda, + 0xd1, 0xc6, 0x0b, 0x29, 0xe1, 0x10, 0x83, 0x24, 0xc5, 0x0e, 0x94, 0x82, 0x33, 0xc2, 0x8e, 0x09, + 0x76, 0x14, 0x07, 0xa4, 0xe4, 0x28, 0x26, 0x28, 0x49, 0xb2, 0x07, 0x73, 0x9c, 0x50, 0xee, 0x0a, + 0xf7, 0x8c, 0x58, 0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 0xce, 0x42, 0x61, 0xf8, 0x98, 0x7e, 0x74, 0x7a, 0x7a, 0x04, 0x65, 0x4a, + 0xc4, 0x79, 0xc0, 0x4e, 0x2c, 0xf5, 0xd4, 0xa7, 0x3e, 0x4a, 0x29, 0x86, 0x35, 0x25, 0x0a, 0xed, + 0x42, 0x59, 0x0e, 0x61, 0x3e, 0xf1, 0xad, 0x1e, 0xc7, 0x5d, 0x92, 0x7a, 0xc4, 0x92, 0xb3, 0xdb, + 0x53, 0xe2, 0x7f, 0x2a, 0x41, 0x68, 0x4f, 0xa6, 0x84, 0x0a, 0x42, 0x55, 0xe9, 0xcb, 0xec, 0xa6, + 0x1e, 0xb5, 0xe6, 0xae, 0x80, 0x32, 0xc1, 0xe8, 0x09, 0x54, 0x92, 0x73, 0xf9, 0x84, 0x4b, 0xf6, + 0xf4, 0x9f, 0x76, 0xf3, 0x31, 0xf2, 0x69, 0x0c, 0x44, 0x8f, 0x61, 0x4e, 0x9e, 0xce, 0x71, 0xf9, + 0x49, 0x7c, 0xbc, 0xb4, 0x03, 0x58, 0xc9, 0xc7, 0xfd, 0x5d, 0x97, 0x9f, 0xa8, 0xf3, 0x35, 0xef, + 0xbe, 0xfa, 0xa9, 0x36, 0xf3, 0xea, 0xb2, 0xa6, 0xbd, 0xbe, 0xac, 0x69, 0x6f, 0x2e, 0x6b, 0xda, + 0x8f, 0x97, 0x35, 0xed, 0xc5, 0xdb, 0xda, 0xcc, 0xeb, 0xb7, 0xb5, 0x99, 0x37, 0x6f, 0x6b, 0x33, + 0x9f, 0xe7, 0xe3, 0xcf, 0xfc, 0x5f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x4b, 0xca, 0x9e, 0xf0, + 0x0f, 0x00, 0x00, } func (this *SensitiveInfo) Equal(that interface{}) bool { @@ -781,6 +785,18 @@ func (m *StatementStatistics) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.RowsWritten.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAppStats(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca if len(m.Nodes) > 0 { for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- { i = encodeVarintAppStats(dAtA, i, uint64(m.Nodes[iNdEx])) @@ -790,12 +806,12 @@ func (m *StatementStatistics) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xc0 } } - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastExecTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastExecTimestamp):]) - if err1 != nil { - return 0, err1 + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastExecTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastExecTimestamp):]) + if err2 != nil { + return 0, err2 } - i -= n1 - i = encodeVarintAppStats(dAtA, i, uint64(n1)) + i -= n2 + i = encodeVarintAppStats(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x1 i-- @@ -1052,12 +1068,12 @@ func (m *SensitiveInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n19, err19 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.MostRecentPlanTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.MostRecentPlanTimestamp):]) - if err19 != nil { - return 0, err19 + n20, err20 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.MostRecentPlanTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.MostRecentPlanTimestamp):]) + if err20 != nil { + return 0, err20 } - i -= n19 - i = encodeVarintAppStats(dAtA, i, uint64(n19)) + i -= n20 + i = encodeVarintAppStats(dAtA, i, uint64(n20)) i-- dAtA[i] = 0x1a { @@ -1210,12 +1226,12 @@ func (m *CollectedStatementStatistics) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l - n21, err21 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AggregatedTs, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AggregatedTs):]) - if err21 != nil { - return 0, err21 + n22, err22 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AggregatedTs, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AggregatedTs):]) + if err22 != nil { + return 0, err22 } - i -= n21 - i = encodeVarintAppStats(dAtA, i, uint64(n21)) + i -= n22 + i = encodeVarintAppStats(dAtA, i, uint64(n22)) i-- dAtA[i] = 0x22 i = encodeVarintAppStats(dAtA, i, uint64(m.ID)) @@ -1267,12 +1283,12 @@ func (m *CollectedTransactionStatistics) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintAppStats(dAtA, i, uint64(m.TransactionFingerprintID)) i-- dAtA[i] = 0x28 - n24, err24 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AggregatedTs, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AggregatedTs):]) - if err24 != nil { - return 0, err24 + n25, err25 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.AggregatedTs, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.AggregatedTs):]) + if err25 != nil { + return 0, err25 } - i -= n24 - i = encodeVarintAppStats(dAtA, i, uint64(n24)) + i -= n25 + i = encodeVarintAppStats(dAtA, i, uint64(n25)) i-- dAtA[i] = 0x22 { @@ -1560,6 +1576,8 @@ func (m *StatementStatistics) Size() (n int) { n += 2 + sovAppStats(uint64(e)) } } + l = m.RowsWritten.Size() + n += 2 + l + sovAppStats(uint64(l)) return n } @@ -2369,6 +2387,39 @@ func (m *StatementStatistics) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) } + case 25: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RowsWritten", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAppStats + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAppStats + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAppStats + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RowsWritten.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAppStats(dAtA[iNdEx:]) diff --git a/pkg/roachpb/app_stats.proto b/pkg/roachpb/app_stats.proto index 96d3c84166c5..6dc454cdf897 100644 --- a/pkg/roachpb/app_stats.proto +++ b/pkg/roachpb/app_stats.proto @@ -87,6 +87,9 @@ message StatementStatistics { // RowsRead collects the number of rows read from disk. optional NumericStat rows_read = 16 [(gogoproto.nullable) = false]; + // RowsWritten collects the number of rows read from disk. + optional NumericStat rows_written = 25 [(gogoproto.nullable) = false]; + // ExecStats are the execution statistics for this statement. These statistics // are sampled. optional ExecStats exec_stats = 21 [(gogoproto.nullable) = false]; diff --git a/pkg/sql/executor_statement_metrics.go b/pkg/sql/executor_statement_metrics.go index 4cb07eb049c1..4f8ced1476e0 100644 --- a/pkg/sql/executor_statement_metrics.go +++ b/pkg/sql/executor_statement_metrics.go @@ -170,6 +170,7 @@ func (ex *connExecutor) recordStatementSummary( OverheadLatency: execOverhead, BytesRead: stats.bytesRead, RowsRead: stats.rowsRead, + RowsWritten: stats.rowsWritten, Nodes: getNodesFromPlanner(planner), StatementType: stmt.AST.StatementType(), Plan: planner.instrumentation.PlanForStats(ctx), diff --git a/pkg/sql/sqlstats/persistedsqlstats/sqlstatsutil/json_encoding_test.go b/pkg/sql/sqlstats/persistedsqlstats/sqlstatsutil/json_encoding_test.go index 794907d620e1..ec0fb71d5592 100644 --- a/pkg/sql/sqlstats/persistedsqlstats/sqlstatsutil/json_encoding_test.go +++ b/pkg/sql/sqlstats/persistedsqlstats/sqlstatsutil/json_encoding_test.go @@ -91,6 +91,10 @@ func TestSQLStatsJsonEncoding(t *testing.T) { "mean": {{.Float}}, "sqDiff": {{.Float}} }, + "rowsWritten": { + "mean": {{.Float}}, + "sqDiff": {{.Float}} + }, "nodes": [{{joinInts .IntArray}}] }, "execution_statistics": { diff --git a/pkg/sql/sqlstats/persistedsqlstats/sqlstatsutil/json_impl.go b/pkg/sql/sqlstats/persistedsqlstats/sqlstatsutil/json_impl.go index 7b2c6853c630..eabd5fe97e80 100644 --- a/pkg/sql/sqlstats/persistedsqlstats/sqlstatsutil/json_impl.go +++ b/pkg/sql/sqlstats/persistedsqlstats/sqlstatsutil/json_impl.go @@ -233,6 +233,7 @@ func (s *innerStmtStats) jsonFields() jsonFields { {"ovhLat", (*numericStats)(&s.OverheadLat)}, {"bytesRead", (*numericStats)(&s.BytesRead)}, {"rowsRead", (*numericStats)(&s.RowsRead)}, + {"rowsWritten", (*numericStats)(&s.RowsWritten)}, {"nodes", (*int64Array)(&s.Nodes)}, } } diff --git a/pkg/sql/sqlstats/ssmemstorage/ss_mem_writer.go b/pkg/sql/sqlstats/ssmemstorage/ss_mem_writer.go index f5fab1b8ebcc..b5c049b90b83 100644 --- a/pkg/sql/sqlstats/ssmemstorage/ss_mem_writer.go +++ b/pkg/sql/sqlstats/ssmemstorage/ss_mem_writer.go @@ -112,6 +112,7 @@ func (s *Container) RecordStatement( stats.mu.data.OverheadLat.Record(stats.mu.data.Count, value.OverheadLatency) stats.mu.data.BytesRead.Record(stats.mu.data.Count, float64(value.BytesRead)) stats.mu.data.RowsRead.Record(stats.mu.data.Count, float64(value.RowsRead)) + stats.mu.data.RowsWritten.Record(stats.mu.data.Count, float64(value.RowsWritten)) stats.mu.data.LastExecTimestamp = timeutil.Now() stats.mu.data.Nodes = util.CombineUniqueInt64(stats.mu.data.Nodes, value.Nodes) // Note that some fields derived from tracing statements (such as diff --git a/pkg/sql/sqlstats/ssprovider.go b/pkg/sql/sqlstats/ssprovider.go index c3db4ecbbf8a..81c1d5233136 100644 --- a/pkg/sql/sqlstats/ssprovider.go +++ b/pkg/sql/sqlstats/ssprovider.go @@ -162,6 +162,7 @@ type RecordedStmtStats struct { OverheadLatency float64 BytesRead int64 RowsRead int64 + RowsWritten int64 Nodes []int64 StatementType tree.StatementType Plan *roachpb.ExplainTreePlanNode diff --git a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx index 8520d9de0203..06e67c109932 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/statementDetails/statementDetails.tsx @@ -34,6 +34,7 @@ import { formatNumberForDisplay, calculateTotalWorkload, unique, + summarize, } from "src/util"; import { Loading } from "src/loading"; import { Button } from "src/button"; @@ -501,6 +502,9 @@ export class StatementDetails extends React.Component< moment(stats.last_exec_timestamp.seconds.low * 1e3).format( "MMM DD, YYYY HH:MM", ); + const summary = summarize(statement); + const notSelectStatement = summary.statement !== "select"; + return ( + {notSelectStatement && ( +
+ Mean rows written + + {formatNumberForDisplay( + stats.rows_written.mean, + formatTwoPlaces, + )} + +
+ )}
Max memory usage diff --git a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.fixture.ts b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.fixture.ts index e71e8c9696a5..0dc1e3e34a29 100644 --- a/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.fixture.ts +++ b/pkg/ui/workspaces/cluster-ui/src/statementsPage/statementsPage.fixture.ts @@ -88,6 +88,10 @@ const statementStats: Required = { mean: 10, squared_diffs: 1, }, + rows_written: { + mean: 10, + squared_diffs: 1, + }, exec_stats: execStats, last_exec_timestamp: { seconds: Long.fromInt(1599670292), diff --git a/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.fixture.ts b/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.fixture.ts index 14b1ebe289de..08eba404ba02 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.fixture.ts +++ b/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.fixture.ts @@ -97,6 +97,7 @@ export const statementsWithSameIdButDifferentNodeId: CollectedStatementStatistic }, bytes_read: { mean: 0, squared_diffs: 0 }, rows_read: { mean: 0, squared_diffs: 0 }, + rows_written: { mean: 0, squared_diffs: 0 }, last_exec_timestamp: { seconds: Long.fromInt(1599670290), nanos: 111613000, @@ -204,6 +205,10 @@ export const statementsWithSameIdButDifferentNodeId: CollectedStatementStatistic mean: 0.07999999999999999, squared_diffs: 3.8399999999999994, }, + rows_written: { + mean: 0.07999999999999999, + squared_diffs: 3.8399999999999994, + }, last_exec_timestamp: { seconds: Long.fromInt(1599670272), nanos: 111613000, @@ -314,6 +319,10 @@ export const statementsWithSameIdButDifferentNodeId: CollectedStatementStatistic mean: 0.07999999999999999, squared_diffs: 3.8399999999999994, }, + rows_written: { + mean: 0.07999999999999999, + squared_diffs: 3.8399999999999994, + }, last_exec_timestamp: { seconds: Long.fromInt(1599670192), nanos: 111613000, @@ -418,6 +427,7 @@ export const statementsWithSameIdButDifferentNodeId: CollectedStatementStatistic }, bytes_read: { mean: 0, squared_diffs: 0 }, rows_read: { mean: 0, squared_diffs: 0 }, + rows_written: { mean: 0, squared_diffs: 0 }, last_exec_timestamp: { seconds: Long.fromInt(1599670299), nanos: 111613000, @@ -522,6 +532,7 @@ export const statementsWithSameIdButDifferentNodeId: CollectedStatementStatistic }, bytes_read: { mean: 0, squared_diffs: 0 }, rows_read: { mean: 0, squared_diffs: 0 }, + rows_written: { mean: 0, squared_diffs: 0 }, last_exec_timestamp: { seconds: Long.fromInt(1599670242), nanos: 111613000, @@ -632,6 +643,10 @@ export const statementsWithSameIdButDifferentNodeId: CollectedStatementStatistic mean: 0.07999999999999999, squared_diffs: 3.8399999999999994, }, + rows_written: { + mean: 0.07999999999999999, + squared_diffs: 3.8399999999999994, + }, last_exec_timestamp: { seconds: Long.fromInt(1599650292), nanos: 111613000, @@ -742,6 +757,10 @@ export const statementsWithSameIdButDifferentNodeId: CollectedStatementStatistic mean: 0.07999999999999999, squared_diffs: 3.8399999999999994, }, + rows_written: { + mean: 0.07999999999999999, + squared_diffs: 3.8399999999999994, + }, last_exec_timestamp: { seconds: Long.fromInt(1599670282), nanos: 111613000, @@ -855,6 +874,10 @@ export const statementsWithSameIdButDifferentNodeId: CollectedStatementStatistic mean: 0.07999999999999999, squared_diffs: 3.8399999999999994, }, + rows_written: { + mean: 0.07999999999999999, + squared_diffs: 3.8399999999999994, + }, last_exec_timestamp: { seconds: Long.fromInt(1599670257), nanos: 111613000, @@ -962,6 +985,10 @@ export const statementsWithSameIdButDifferentNodeId: CollectedStatementStatistic mean: 0.07999999999999999, squared_diffs: 3.8399999999999994, }, + rows_written: { + mean: 0.07999999999999999, + squared_diffs: 3.8399999999999994, + }, last_exec_timestamp: { seconds: Long.fromInt(1599670279), nanos: 111613000, diff --git a/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.spec.ts b/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.spec.ts index ced407c9f0c3..61f0f8d97c05 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.spec.ts +++ b/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.spec.ts @@ -203,6 +203,7 @@ function randomStats( overhead_lat: randomStat(), bytes_read: randomStat(), rows_read: randomStat(), + rows_written: randomStat(), sensitive_info: sensitiveInfo || makeSensitiveInfo(null, null), legacy_last_err: "", legacy_last_err_redacted: "", diff --git a/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.ts b/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.ts index 9ddf6fa3c920..87ff02891b72 100644 --- a/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.ts +++ b/pkg/ui/workspaces/cluster-ui/src/util/appStats/appStats.ts @@ -151,6 +151,12 @@ export function addStatementStats( countB, ), rows_read: aggregateNumericStats(a.rows_read, b.rows_read, countA, countB), + rows_written: aggregateNumericStats( + a.rows_written, + b.rows_written, + countA, + countB, + ), sensitive_info: coalesceSensitiveInfo(a.sensitive_info, b.sensitive_info), legacy_last_err: "", legacy_last_err_redacted: "", diff --git a/pkg/ui/workspaces/db-console/src/views/statements/statements.spec.tsx b/pkg/ui/workspaces/db-console/src/views/statements/statements.spec.tsx index 0e6e238d234c..54c5a369920c 100644 --- a/pkg/ui/workspaces/db-console/src/views/statements/statements.spec.tsx +++ b/pkg/ui/workspaces/db-console/src/views/statements/statements.spec.tsx @@ -487,6 +487,7 @@ function makeStats(): Required { sensitive_info: makeEmptySensitiveInfo(), rows_read: makeStat(), bytes_read: makeStat(), + rows_written: makeStat(), exec_stats: makeExecStats(), sql_type: "DDL", last_exec_timestamp: {