From 490e94093fcec003d2de30aee0d3d85a08228816 Mon Sep 17 00:00:00 2001 From: yibin87 Date: Mon, 2 Feb 2026 10:16:16 +0800 Subject: [PATCH] Cherry pick topsql network protocol updates Signed-off-by: yibin87 --- go-tipb/topsql_agent.pb.go | 175 ++++++++++++++++++++++++++----------- proto/topsql_agent.proto | 2 + 2 files changed, 126 insertions(+), 51 deletions(-) diff --git a/go-tipb/topsql_agent.pb.go b/go-tipb/topsql_agent.pb.go index 9957d024..c10b700f 100644 --- a/go-tipb/topsql_agent.pb.go +++ b/go-tipb/topsql_agent.pb.go @@ -55,12 +55,14 @@ func (m *TopSQLRecord) GetItems() []*TopSQLRecordItem { } type TopSQLRecordItem struct { - TimestampSec uint64 `protobuf:"varint,1,opt,name=timestamp_sec,json=timestampSec,proto3" json:"timestamp_sec,omitempty"` - CpuTimeMs uint32 `protobuf:"varint,2,opt,name=cpu_time_ms,json=cpuTimeMs,proto3" json:"cpu_time_ms,omitempty"` - StmtExecCount uint64 `protobuf:"varint,3,opt,name=stmt_exec_count,json=stmtExecCount,proto3" json:"stmt_exec_count,omitempty"` - StmtKvExecCount map[string]uint64 `protobuf:"bytes,4,rep,name=stmt_kv_exec_count,json=stmtKvExecCount" json:"stmt_kv_exec_count,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - StmtDurationSumNs uint64 `protobuf:"varint,5,opt,name=stmt_duration_sum_ns,json=stmtDurationSumNs,proto3" json:"stmt_duration_sum_ns,omitempty"` - StmtDurationCount uint64 `protobuf:"varint,6,opt,name=stmt_duration_count,json=stmtDurationCount,proto3" json:"stmt_duration_count,omitempty"` + TimestampSec uint64 `protobuf:"varint,1,opt,name=timestamp_sec,json=timestampSec,proto3" json:"timestamp_sec,omitempty"` + CpuTimeMs uint32 `protobuf:"varint,2,opt,name=cpu_time_ms,json=cpuTimeMs,proto3" json:"cpu_time_ms,omitempty"` + StmtExecCount uint64 `protobuf:"varint,3,opt,name=stmt_exec_count,json=stmtExecCount,proto3" json:"stmt_exec_count,omitempty"` + StmtKvExecCount map[string]uint64 `protobuf:"bytes,4,rep,name=stmt_kv_exec_count,json=stmtKvExecCount" json:"stmt_kv_exec_count,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StmtDurationSumNs uint64 `protobuf:"varint,5,opt,name=stmt_duration_sum_ns,json=stmtDurationSumNs,proto3" json:"stmt_duration_sum_ns,omitempty"` + StmtDurationCount uint64 `protobuf:"varint,6,opt,name=stmt_duration_count,json=stmtDurationCount,proto3" json:"stmt_duration_count,omitempty"` + StmtNetworkInBytes uint64 `protobuf:"varint,7,opt,name=stmt_network_in_bytes,json=stmtNetworkInBytes,proto3" json:"stmt_network_in_bytes,omitempty"` + StmtNetworkOutBytes uint64 `protobuf:"varint,8,opt,name=stmt_network_out_bytes,json=stmtNetworkOutBytes,proto3" json:"stmt_network_out_bytes,omitempty"` } func (m *TopSQLRecordItem) Reset() { *m = TopSQLRecordItem{} } @@ -110,6 +112,20 @@ func (m *TopSQLRecordItem) GetStmtDurationCount() uint64 { return 0 } +func (m *TopSQLRecordItem) GetStmtNetworkInBytes() uint64 { + if m != nil { + return m.StmtNetworkInBytes + } + return 0 +} + +func (m *TopSQLRecordItem) GetStmtNetworkOutBytes() uint64 { + if m != nil { + return m.StmtNetworkOutBytes + } + return 0 +} + type SQLMeta struct { SqlDigest []byte `protobuf:"bytes,1,opt,name=sql_digest,json=sqlDigest,proto3" json:"sql_digest,omitempty"` // SQL text with sensitive fields trimmed. @@ -810,6 +826,16 @@ func (m *TopSQLRecordItem) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintTopsqlAgent(dAtA, i, uint64(m.StmtDurationCount)) } + if m.StmtNetworkInBytes != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintTopsqlAgent(dAtA, i, uint64(m.StmtNetworkInBytes)) + } + if m.StmtNetworkOutBytes != 0 { + dAtA[i] = 0x40 + i++ + i = encodeVarintTopsqlAgent(dAtA, i, uint64(m.StmtNetworkOutBytes)) + } return i, nil } @@ -1047,6 +1073,12 @@ func (m *TopSQLRecordItem) Size() (n int) { if m.StmtDurationCount != 0 { n += 1 + sovTopsqlAgent(uint64(m.StmtDurationCount)) } + if m.StmtNetworkInBytes != 0 { + n += 1 + sovTopsqlAgent(uint64(m.StmtNetworkInBytes)) + } + if m.StmtNetworkOutBytes != 0 { + n += 1 + sovTopsqlAgent(uint64(m.StmtNetworkOutBytes)) + } return n } @@ -1521,6 +1553,44 @@ func (m *TopSQLRecordItem) Unmarshal(dAtA []byte) error { break } } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StmtNetworkInBytes", wireType) + } + m.StmtNetworkInBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTopsqlAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StmtNetworkInBytes |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StmtNetworkOutBytes", wireType) + } + m.StmtNetworkOutBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTopsqlAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StmtNetworkOutBytes |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTopsqlAgent(dAtA[iNdEx:]) @@ -2165,49 +2235,52 @@ var ( func init() { proto.RegisterFile("topsql_agent.proto", fileDescriptorTopsqlAgent) } var fileDescriptorTopsqlAgent = []byte{ - // 697 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x5b, 0x6e, 0xd3, 0x40, - 0x14, 0x8d, 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41, - 0xa0, 0x9b, 0x95, 0xa8, 0x79, 0x85, 0x5a, 0x83, 0x40, 0xe5, 0xee, 0x0b, 0xdb, 0x8f, 0x24, 0xc6, - 0x91, 0x13, 0x68, 0x9e, 0xca, 0xbd, 0x48, 0x4d, 0x5f, 0xec, 0x65, 0xa8, 0x35, 0x08, 0x9a, 0x5f, - 0x0d, 0x28, 0x76, 0x03, 0x27, 0xd2, 0xa3, 0x27, 0xb6, 0xca, 0x98, 0xda, 0xaa, 0x07, 0xb0, 0x38, - 0x32, 0x5c, 0x15, 0xb2, 0xe9, 0x23, 0x9e, 0x54, 0x37, 0xf2, 0x1c, 0xd6, 0x30, 0xf2, 0x58, 0x0f, - 0x7b, 0xf6, 0xa4, 0x20, 0xaf, 0x05, 0xab, 0x59, 0xf9, 0x70, 0x4c, 0xd7, 0x5c, 0x04, 0x73, 0x27, - 0xe4, 0xf2, 0x9c, 0xa2, 0xe0, 0x2c, 0x12, 0xd8, 0x24, 0xc3, 0xc5, 0xb4, 0x12, 0x97, 0xe2, 0x20, - 0x41, 0x21, 0x9b, 0xdf, 0x0d, 0x58, 0x1e, 0x01, 0x53, 0x26, 0xd9, 0x84, 0xb9, 0x58, 0xef, 0x86, - 0xf6, 0x5d, 0x6e, 0x93, 0xe9, 0xad, 0xd9, 0xcd, 0xd1, 0x8c, 0x43, 0x1e, 0x41, 0x51, 0xa5, 0x1c, - 0xa2, 0x74, 0xf4, 0x2f, 0x94, 0xdb, 0x66, 0xca, 0xcf, 0xae, 0x61, 0x37, 0x47, 0xe7, 0xc5, 0x20, - 0xd0, 0xb1, 0x3c, 0x81, 0x92, 0x8e, 0x45, 0x93, 0xf3, 0x9a, 0xbc, 0x90, 0x92, 0x87, 0xc9, 0xed, - 0xe6, 0x68, 0x91, 0x67, 0xe7, 0x4e, 0x05, 0x20, 0x46, 0xc1, 0x6d, 0x16, 0x21, 0xfb, 0xd8, 0xfe, - 0x61, 0x40, 0x39, 0xf5, 0xf0, 0x56, 0x3d, 0x05, 0xa4, 0x03, 0x2b, 0x14, 0x39, 0x8b, 0xe5, 0xa8, - 0x31, 0x41, 0xae, 0x71, 0x5b, 0x5f, 0x49, 0xb1, 0xf1, 0x40, 0x72, 0x1b, 0x06, 0x79, 0x01, 0x66, - 0xda, 0x63, 0xb8, 0x33, 0xe3, 0xde, 0x6f, 0x16, 0xbe, 0x82, 0x85, 0x54, 0x78, 0x79, 0xe5, 0x13, - 0x3f, 0x72, 0xa3, 0xb4, 0xdd, 0x1d, 0x3e, 0x50, 0xdd, 0xc4, 0xb5, 0x12, 0x97, 0xbc, 0x81, 0x92, - 0x95, 0xb8, 0xc2, 0x8b, 0x7d, 0x17, 0xc9, 0xd8, 0xf3, 0x72, 0x75, 0x53, 0xf5, 0xb5, 0x29, 0x7c, - 0xd8, 0xf1, 0xa9, 0xd1, 0x79, 0xf8, 0xf3, 0xa2, 0x61, 0xfc, 0xba, 0x68, 0x18, 0xbf, 0x2f, 0x1a, - 0xc6, 0xb7, 0x3f, 0x8d, 0x1c, 0xac, 0x7a, 0x2c, 0x6c, 0x71, 0x3f, 0xea, 0x7b, 0x0e, 0x6f, 0x49, - 0xbf, 0xe7, 0x6a, 0x79, 0xd7, 0x70, 0xe7, 0xf4, 0x23, 0xf9, 0xec, 0x5f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x7a, 0xb0, 0xac, 0x8b, 0x56, 0x05, 0x00, 0x00, + // 747 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xdd, 0x4e, 0xe3, 0x46, + 0x14, 0x8e, 0x49, 0x80, 0xe4, 0x24, 0xe6, 0x67, 0x12, 0x20, 0x8a, 0xd4, 0x14, 0xa5, 0x6a, 0x4b, + 0x5b, 0x1a, 0xda, 0x20, 0xf5, 0xef, 0xaa, 0x4d, 0x41, 0x02, 0x15, 0x68, 0x18, 0x73, 0xd1, 0x3b, + 0xcb, 0x76, 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29, 0xd0, 0x72, 0x94, 0x7d, 0xf7, 0x6b, 0x00, 0x31, 0x93, 0x91, 0x2d, 0x38, 0x13, 0xff, + 0xf6, 0x5e, 0x1b, 0x50, 0x4d, 0x33, 0xfc, 0xa1, 0x9f, 0x1c, 0xd2, 0x87, 0x3a, 0x65, 0x91, 0x88, + 0x55, 0x3e, 0x98, 0x24, 0x4f, 0xa4, 0x6d, 0xd5, 0x53, 0x6c, 0xf6, 0x42, 0x0a, 0x7b, 0x06, 0xf9, + 0x19, 0xcc, 0xb4, 0xc6, 0x74, 0x67, 0x66, 0xb3, 0x3f, 0x6f, 0xfc, 0x15, 0xd6, 0x52, 0xe3, 0xc3, + 0xc8, 0xe7, 0x0e, 0xf2, 0xac, 0xb5, 0x37, 0x98, 0x3e, 0x84, 0x83, 0xc4, 0xb5, 0x12, 0x97, 0xfc, + 0x0e, 0x15, 0x2b, 0x71, 0xa5, 0x17, 0xfb, 0x2e, 0x23, 0x33, 0xcf, 0xd8, 0xe3, 0xa4, 0x5a, 0x3b, + 0x0b, 0xf8, 0xb4, 0xe2, 0x0f, 0x46, 0xff, 0x9b, 0x37, 0xf7, 0x6d, 0xe3, 0xed, 0x7d, 0xdb, 0x78, + 0x77, 0xdf, 0x36, 0x5e, 0xbe, 0x6f, 0x17, 0x60, 0xcb, 0x13, 0x61, 0x37, 0xf2, 0xf9, 0xc8, 0x73, + 0xa2, 0xae, 0xf2, 0x87, 0x2e, 0xda, 0x07, 0x86, 0xbb, 0x82, 0x8f, 0xf1, 0xe1, 0xc7, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x90, 0x27, 0x19, 0x03, 0xbe, 0x05, 0x00, 0x00, } diff --git a/proto/topsql_agent.proto b/proto/topsql_agent.proto index 3a503182..1db6ce75 100644 --- a/proto/topsql_agent.proto +++ b/proto/topsql_agent.proto @@ -36,6 +36,8 @@ message TopSQLRecordItem { map stmt_kv_exec_count = 4; // target => count uint64 stmt_duration_sum_ns = 5; uint64 stmt_duration_count = 6; + uint64 stmt_network_in_bytes = 7; // traffic from client + uint64 stmt_network_out_bytes = 8; // traffic to client } message SQLMeta {