diff --git a/gen/proto/go/parca/query/v1alpha1/query.pb.go b/gen/proto/go/parca/query/v1alpha1/query.pb.go index 66bbbe137ef..1c7cd74ca0a 100644 --- a/gen/proto/go/parca/query/v1alpha1/query.pb.go +++ b/gen/proto/go/parca/query/v1alpha1/query.pb.go @@ -147,6 +147,8 @@ const ( QueryRequest_REPORT_TYPE_FLAMEGRAPH_ARROW QueryRequest_ReportType = 5 // REPORT_TYPE_SOURCE contains source code annotated with profiling information QueryRequest_REPORT_TYPE_SOURCE QueryRequest_ReportType = 6 + // REPORT_TYPE_TABLE_ARROW unspecified + QueryRequest_REPORT_TYPE_TABLE_ARROW QueryRequest_ReportType = 7 ) // Enum value maps for QueryRequest_ReportType. @@ -159,6 +161,7 @@ var ( 4: "REPORT_TYPE_FLAMEGRAPH_TABLE", 5: "REPORT_TYPE_FLAMEGRAPH_ARROW", 6: "REPORT_TYPE_SOURCE", + 7: "REPORT_TYPE_TABLE_ARROW", } QueryRequest_ReportType_value = map[string]int32{ "REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED": 0, @@ -168,6 +171,7 @@ var ( "REPORT_TYPE_FLAMEGRAPH_TABLE": 4, "REPORT_TYPE_FLAMEGRAPH_ARROW": 5, "REPORT_TYPE_SOURCE": 6, + "REPORT_TYPE_TABLE_ARROW": 7, } ) @@ -2281,6 +2285,7 @@ type QueryResponse struct { // *QueryResponse_Callgraph // *QueryResponse_FlamegraphArrow // *QueryResponse_Source + // *QueryResponse_TableArrow Report isQueryResponse_Report `protobuf_oneof:"report"` // total is the total number of samples shown in the report. Total int64 `protobuf:"varint,9,opt,name=total,proto3" json:"total,omitempty"` @@ -2369,6 +2374,13 @@ func (x *QueryResponse) GetSource() *Source { return nil } +func (x *QueryResponse) GetTableArrow() *TableArrow { + if x, ok := x.GetReport().(*QueryResponse_TableArrow); ok { + return x.TableArrow + } + return nil +} + func (x *QueryResponse) GetTotal() int64 { if x != nil { return x.Total @@ -2417,6 +2429,11 @@ type QueryResponse_Source struct { Source *Source `protobuf:"bytes,12,opt,name=source,proto3,oneof"` } +type QueryResponse_TableArrow struct { + // table_arrow is a table encoded as a arrow record + TableArrow *TableArrow `protobuf:"bytes,13,opt,name=table_arrow,json=tableArrow,proto3,oneof"` +} + func (*QueryResponse_Flamegraph) isQueryResponse_Report() {} func (*QueryResponse_Pprof) isQueryResponse_Report() {} @@ -2429,6 +2446,8 @@ func (*QueryResponse_FlamegraphArrow) isQueryResponse_Report() {} func (*QueryResponse_Source) isQueryResponse_Report() {} +func (*QueryResponse_TableArrow) isQueryResponse_Report() {} + // SeriesRequest is unimplemented type SeriesRequest struct { state protoimpl.MessageState @@ -2959,6 +2978,64 @@ func (x *ShareProfileResponse) GetLink() string { return "" } +// TableArrow has the table encoded as a arrow record +type TableArrow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // record is the arrow record containing the actual table data + Record []byte `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` + // unit is the unit represented by the flame graph + Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` +} + +func (x *TableArrow) Reset() { + *x = TableArrow{} + if protoimpl.UnsafeEnabled { + mi := &file_parca_query_v1alpha1_query_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TableArrow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TableArrow) ProtoMessage() {} + +func (x *TableArrow) ProtoReflect() protoreflect.Message { + mi := &file_parca_query_v1alpha1_query_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TableArrow.ProtoReflect.Descriptor instead. +func (*TableArrow) Descriptor() ([]byte, []int) { + return file_parca_query_v1alpha1_query_proto_rawDescGZIP(), []int{37} +} + +func (x *TableArrow) GetRecord() []byte { + if x != nil { + return x.Record + } + return nil +} + +func (x *TableArrow) GetUnit() string { + if x != nil { + return x.Unit + } + return "" +} + var File_parca_query_v1alpha1_query_proto protoreflect.FileDescriptor var file_parca_query_v1alpha1_query_proto_rawDesc = []byte{ @@ -3081,7 +3158,7 @@ var file_parca_query_v1alpha1_query_proto_rawDesc = []byte{ 0x0a, 0x17, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x47, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x10, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xba, 0x07, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd7, 0x07, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, @@ -3122,7 +3199,7 @@ var file_parca_query_v1alpha1_query_proto_rawDesc = []byte{ 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x49, 0x46, 0x46, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x10, 0x02, 0x22, - 0xdb, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, + 0xf8, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x22, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, @@ -3135,39 +3212,117 @@ var file_parca_query_v1alpha1_query_proto_rawDesc = []byte{ 0x45, 0x10, 0x04, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x41, 0x52, 0x52, 0x4f, 0x57, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x06, 0x42, 0x09, 0x0a, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x74, 0x72, 0x69, 0x6d, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x79, 0x42, 0x13, - 0x0a, 0x11, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x22, 0x69, 0x0a, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x21, - 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x22, 0x82, 0x01, 0x0a, 0x03, 0x54, 0x6f, 0x70, 0x12, 0x31, 0x0a, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, - 0x6f, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x4e, 0x6f, - 0x64, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x4d, - 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, - 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x69, 0x66, - 0x66, 0x22, 0xfe, 0x01, 0x0a, 0x0b, 0x54, 0x6f, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x06, 0x12, 0x1b, 0x0a, + 0x17, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x41, 0x42, + 0x4c, 0x45, 0x5f, 0x41, 0x52, 0x52, 0x4f, 0x57, 0x10, 0x07, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x74, 0x72, 0x69, 0x6d, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x0b, + 0x0a, 0x09, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x22, 0x69, 0x0a, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x21, 0x0a, 0x07, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x82, + 0x01, 0x0a, 0x03, 0x54, 0x6f, 0x70, 0x12, 0x31, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x4e, + 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, + 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, + 0x6e, 0x69, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x07, 0x54, 0x6f, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x35, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x75, 0x6d, 0x75, + 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, + 0x66, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x22, 0xfe, + 0x01, 0x0a, 0x0b, 0x54, 0x6f, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3e, + 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, + 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x66, + 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x6c, + 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x61, 0x72, 0x63, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x22, + 0xb9, 0x03, 0x0a, 0x0a, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x3c, + 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, + 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x6f, + 0x6f, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x18, 0x0a, 0x05, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, + 0x64, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x0e, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x22, 0x6f, 0x0a, 0x0f, 0x46, + 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x41, 0x72, 0x72, 0x6f, 0x77, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x22, 0x38, 0x0a, 0x06, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x46, 0x6c, 0x61, 0x6d, 0x65, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x6f, 0x6f, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, + 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x69, 0x66, + 0x66, 0x12, 0x40, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x6d, 0x65, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x72, 0x65, 0x6e, 0x22, 0xc4, 0x01, 0x0a, 0x0e, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x6d, + 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, + 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x12, 0x40, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x61, 0x72, + 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcb, 0x02, 0x0a, 0x12, 0x46, + 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, @@ -3183,282 +3338,214 @@ var file_parca_query_v1alpha1_query_proto_rawDesc = []byte{ 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x6c, 0x69, - 0x6e, 0x65, 0x22, 0xb9, 0x03, 0x0a, 0x0a, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x12, 0x3c, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x52, 0x6f, 0x6f, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, - 0x18, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, - 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x61, - 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x07, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, - 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0f, 0x75, 0x6e, 0x74, 0x72, 0x69, - 0x6d, 0x6d, 0x65, 0x64, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x22, 0x6f, - 0x0a, 0x0f, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x41, 0x72, 0x72, 0x6f, - 0x77, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x22, - 0x38, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x46, 0x6c, - 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x6f, 0x6f, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, - 0x64, 0x69, 0x66, 0x66, 0x12, 0x40, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6c, - 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xc4, 0x01, 0x0a, 0x0e, 0x46, 0x6c, 0x61, 0x6d, 0x65, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, - 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, + 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x69, 0x6e, + 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6c, + 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x90, 0x01, 0x0a, 0x0d, 0x43, 0x61, 0x6c, + 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x04, 0x6d, 0x65, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x75, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x12, 0x40, 0x0a, 0x08, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, - 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcb, 0x02, - 0x0a, 0x12, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, - 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x52, - 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, - 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x09, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x90, 0x01, 0x0a, 0x0d, - 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, - 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x61, - 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, - 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, - 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x74, 0x22, 0x84, - 0x02, 0x0a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, - 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x75, 0x6d, + 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x11, + 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x12, 0x3e, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x32, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x52, - 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x0d, 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x45, 0x64, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, - 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x75, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x63, 0x6f, - 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, - 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x22, 0xa5, 0x01, 0x0a, 0x09, 0x43, - 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x39, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, - 0x64, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x22, - 0x0a, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x22, 0xa3, 0x03, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0a, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x6c, - 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x16, 0x0a, 0x05, 0x70, 0x70, 0x72, 0x6f, - 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x70, 0x70, 0x72, 0x6f, 0x66, - 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x48, 0x00, 0x52, 0x03, 0x74, 0x6f, 0x70, 0x12, - 0x3f, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x48, 0x00, 0x52, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, - 0x12, 0x52, 0x0a, 0x10, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x61, - 0x72, 0x72, 0x6f, 0x77, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x61, 0x72, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x3e, + 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, + 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, + 0x61, 0x72, 0x63, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x6c, 0x69, + 0x6e, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x0d, 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x45, 0x64, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, + 0x70, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x43, 0x6f, + 0x6c, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x22, 0xa5, 0x01, 0x0a, 0x09, 0x43, 0x61, 0x6c, 0x6c, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x39, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x12, 0x39, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x63, + 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x0a, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x22, + 0xe8, 0x03, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x42, 0x0a, 0x0a, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6c, 0x61, + 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x6c, 0x61, 0x6d, 0x65, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x16, 0x0a, 0x05, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x12, 0x2d, 0x0a, + 0x03, 0x74, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x41, 0x72, 0x72, 0x6f, - 0x77, 0x48, 0x00, 0x52, 0x0f, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x41, - 0x72, 0x72, 0x6f, 0x77, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x48, 0x00, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x42, 0x08, - 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, - 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, - 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x4d, 0x0a, 0x0e, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, - 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x0d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, - 0x22, 0x4f, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x73, 0x22, 0x33, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x13, 0x53, 0x68, 0x61, 0x72, 0x65, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, - 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, + 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x48, 0x00, 0x52, 0x03, 0x74, 0x6f, 0x70, 0x12, 0x3f, 0x0a, 0x09, + 0x63, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x48, 0x00, 0x52, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x52, 0x0a, + 0x10, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x61, 0x72, 0x72, 0x6f, + 0x77, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, + 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x41, 0x72, 0x72, 0x6f, 0x77, 0x48, 0x00, + 0x52, 0x0f, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x41, 0x72, 0x72, 0x6f, + 0x77, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, + 0x00, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x72, 0x72, 0x6f, 0x77, + 0x48, 0x00, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x72, 0x72, 0x6f, 0x77, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x53, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, + 0x6e, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, + 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x4d, 0x0a, 0x0e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xa4, 0x01, 0x0a, 0x0d, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, + 0x6e, 0x64, 0x22, 0x4f, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x73, 0x22, 0x33, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x13, 0x53, 0x68, 0x61, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x47, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x2a, 0x0a, 0x14, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x38, 0x0a, 0x0a, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x72, 0x72, 0x6f, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x32, 0xdf, 0x06, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x27, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0e, - 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, - 0x0a, 0x14, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x32, 0xdf, 0x06, 0x0a, 0x0c, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0a, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x27, 0x2e, 0x70, 0x61, 0x72, 0x63, - 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x69, 0x0a, 0x05, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, + 0x12, 0x15, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x69, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x22, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6d, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x23, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x73, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x7e, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x11, 0x12, 0x0f, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x6d, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x70, + 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, + 0x10, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x7e, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x12, 0x29, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x70, + 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, + 0x12, 0x0f, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x12, 0x6d, 0x0a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x61, + 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, + 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x81, 0x01, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x61, + 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, + 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x2f, 0x7b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x6d, 0x0a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, - 0x23, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x12, 0x12, 0x10, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x23, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x26, 0x12, 0x24, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x0c, 0x53, 0x68, 0x61, - 0x72, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x70, 0x61, 0x72, 0x63, - 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, - 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0xe4, 0x01, 0x0a, - 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x70, 0x61, - 0x72, 0x63, 0x61, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x2f, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x51, 0x58, 0xaa, 0x02, 0x14, 0x50, 0x61, 0x72, 0x63, - 0x61, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0xca, 0x02, 0x14, 0x50, 0x61, 0x72, 0x63, 0x61, 0x5c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x50, 0x61, 0x72, 0x63, 0x61, 0x5c, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x50, 0x61, 0x72, - 0x63, 0x61, 0x3a, 0x3a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x42, 0xe4, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, + 0x2e, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x61, 0x72, 0x63, 0x61, 0x2d, 0x64, 0x65, 0x76, 0x2f, 0x70, 0x61, 0x72, 0x63, 0x61, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x61, 0x72, + 0x63, 0x61, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, + 0x02, 0x03, 0x50, 0x51, 0x58, 0xaa, 0x02, 0x14, 0x50, 0x61, 0x72, 0x63, 0x61, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x14, 0x50, + 0x61, 0x72, 0x63, 0x61, 0x5c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x50, 0x61, 0x72, 0x63, 0x61, 0x5c, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x50, 0x61, 0x72, 0x63, 0x61, 0x3a, 0x3a, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3474,7 +3561,7 @@ func file_parca_query_v1alpha1_query_proto_rawDescGZIP() []byte { } var file_parca_query_v1alpha1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_parca_query_v1alpha1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_parca_query_v1alpha1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 38) var file_parca_query_v1alpha1_query_proto_goTypes = []interface{}{ (ProfileDiffSelection_Mode)(0), // 0: parca.query.v1alpha1.ProfileDiffSelection.Mode (QueryRequest_Mode)(0), // 1: parca.query.v1alpha1.QueryRequest.Mode @@ -3516,28 +3603,29 @@ var file_parca_query_v1alpha1_query_proto_goTypes = []interface{}{ (*ValueType)(nil), // 37: parca.query.v1alpha1.ValueType (*ShareProfileRequest)(nil), // 38: parca.query.v1alpha1.ShareProfileRequest (*ShareProfileResponse)(nil), // 39: parca.query.v1alpha1.ShareProfileResponse - (*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 41: google.protobuf.Duration - (*v1alpha1.LabelSet)(nil), // 42: parca.profilestore.v1alpha1.LabelSet - (*v1alpha11.Location)(nil), // 43: parca.metastore.v1alpha1.Location - (*v1alpha11.Mapping)(nil), // 44: parca.metastore.v1alpha1.Mapping - (*v1alpha11.Function)(nil), // 45: parca.metastore.v1alpha1.Function - (*v1alpha11.Line)(nil), // 46: parca.metastore.v1alpha1.Line + (*TableArrow)(nil), // 40: parca.query.v1alpha1.TableArrow + (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 42: google.protobuf.Duration + (*v1alpha1.LabelSet)(nil), // 43: parca.profilestore.v1alpha1.LabelSet + (*v1alpha11.Location)(nil), // 44: parca.metastore.v1alpha1.Location + (*v1alpha11.Mapping)(nil), // 45: parca.metastore.v1alpha1.Mapping + (*v1alpha11.Function)(nil), // 46: parca.metastore.v1alpha1.Function + (*v1alpha11.Line)(nil), // 47: parca.metastore.v1alpha1.Line } var file_parca_query_v1alpha1_query_proto_depIdxs = []int32{ 5, // 0: parca.query.v1alpha1.ProfileTypesResponse.types:type_name -> parca.query.v1alpha1.ProfileType - 40, // 1: parca.query.v1alpha1.QueryRangeRequest.start:type_name -> google.protobuf.Timestamp - 40, // 2: parca.query.v1alpha1.QueryRangeRequest.end:type_name -> google.protobuf.Timestamp - 41, // 3: parca.query.v1alpha1.QueryRangeRequest.step:type_name -> google.protobuf.Duration + 41, // 1: parca.query.v1alpha1.QueryRangeRequest.start:type_name -> google.protobuf.Timestamp + 41, // 2: parca.query.v1alpha1.QueryRangeRequest.end:type_name -> google.protobuf.Timestamp + 42, // 3: parca.query.v1alpha1.QueryRangeRequest.step:type_name -> google.protobuf.Duration 8, // 4: parca.query.v1alpha1.QueryRangeResponse.series:type_name -> parca.query.v1alpha1.MetricsSeries - 42, // 5: parca.query.v1alpha1.MetricsSeries.labelset:type_name -> parca.profilestore.v1alpha1.LabelSet + 43, // 5: parca.query.v1alpha1.MetricsSeries.labelset:type_name -> parca.profilestore.v1alpha1.LabelSet 9, // 6: parca.query.v1alpha1.MetricsSeries.samples:type_name -> parca.query.v1alpha1.MetricsSample 37, // 7: parca.query.v1alpha1.MetricsSeries.period_type:type_name -> parca.query.v1alpha1.ValueType 37, // 8: parca.query.v1alpha1.MetricsSeries.sample_type:type_name -> parca.query.v1alpha1.ValueType - 40, // 9: parca.query.v1alpha1.MetricsSample.timestamp:type_name -> google.protobuf.Timestamp - 40, // 10: parca.query.v1alpha1.MergeProfile.start:type_name -> google.protobuf.Timestamp - 40, // 11: parca.query.v1alpha1.MergeProfile.end:type_name -> google.protobuf.Timestamp - 40, // 12: parca.query.v1alpha1.SingleProfile.time:type_name -> google.protobuf.Timestamp + 41, // 9: parca.query.v1alpha1.MetricsSample.timestamp:type_name -> google.protobuf.Timestamp + 41, // 10: parca.query.v1alpha1.MergeProfile.start:type_name -> google.protobuf.Timestamp + 41, // 11: parca.query.v1alpha1.MergeProfile.end:type_name -> google.protobuf.Timestamp + 41, // 12: parca.query.v1alpha1.SingleProfile.time:type_name -> google.protobuf.Timestamp 13, // 13: parca.query.v1alpha1.DiffProfile.a:type_name -> parca.query.v1alpha1.ProfileDiffSelection 13, // 14: parca.query.v1alpha1.DiffProfile.b:type_name -> parca.query.v1alpha1.ProfileDiffSelection 0, // 15: parca.query.v1alpha1.ProfileDiffSelection.mode:type_name -> parca.query.v1alpha1.ProfileDiffSelection.Mode @@ -3552,26 +3640,26 @@ var file_parca_query_v1alpha1_query_proto_depIdxs = []int32{ 15, // 24: parca.query.v1alpha1.QueryRequest.source_reference:type_name -> parca.query.v1alpha1.SourceReference 18, // 25: parca.query.v1alpha1.Top.list:type_name -> parca.query.v1alpha1.TopNode 19, // 26: parca.query.v1alpha1.TopNode.meta:type_name -> parca.query.v1alpha1.TopNodeMeta - 43, // 27: parca.query.v1alpha1.TopNodeMeta.location:type_name -> parca.metastore.v1alpha1.Location - 44, // 28: parca.query.v1alpha1.TopNodeMeta.mapping:type_name -> parca.metastore.v1alpha1.Mapping - 45, // 29: parca.query.v1alpha1.TopNodeMeta.function:type_name -> parca.metastore.v1alpha1.Function - 46, // 30: parca.query.v1alpha1.TopNodeMeta.line:type_name -> parca.metastore.v1alpha1.Line + 44, // 27: parca.query.v1alpha1.TopNodeMeta.location:type_name -> parca.metastore.v1alpha1.Location + 45, // 28: parca.query.v1alpha1.TopNodeMeta.mapping:type_name -> parca.metastore.v1alpha1.Mapping + 46, // 29: parca.query.v1alpha1.TopNodeMeta.function:type_name -> parca.metastore.v1alpha1.Function + 47, // 30: parca.query.v1alpha1.TopNodeMeta.line:type_name -> parca.metastore.v1alpha1.Line 23, // 31: parca.query.v1alpha1.Flamegraph.root:type_name -> parca.query.v1alpha1.FlamegraphRootNode - 43, // 32: parca.query.v1alpha1.Flamegraph.locations:type_name -> parca.metastore.v1alpha1.Location - 44, // 33: parca.query.v1alpha1.Flamegraph.mapping:type_name -> parca.metastore.v1alpha1.Mapping - 45, // 34: parca.query.v1alpha1.Flamegraph.function:type_name -> parca.metastore.v1alpha1.Function + 44, // 32: parca.query.v1alpha1.Flamegraph.locations:type_name -> parca.metastore.v1alpha1.Location + 45, // 33: parca.query.v1alpha1.Flamegraph.mapping:type_name -> parca.metastore.v1alpha1.Mapping + 46, // 34: parca.query.v1alpha1.Flamegraph.function:type_name -> parca.metastore.v1alpha1.Function 24, // 35: parca.query.v1alpha1.FlamegraphRootNode.children:type_name -> parca.query.v1alpha1.FlamegraphNode 25, // 36: parca.query.v1alpha1.FlamegraphNode.meta:type_name -> parca.query.v1alpha1.FlamegraphNodeMeta 24, // 37: parca.query.v1alpha1.FlamegraphNode.children:type_name -> parca.query.v1alpha1.FlamegraphNode - 43, // 38: parca.query.v1alpha1.FlamegraphNodeMeta.location:type_name -> parca.metastore.v1alpha1.Location - 44, // 39: parca.query.v1alpha1.FlamegraphNodeMeta.mapping:type_name -> parca.metastore.v1alpha1.Mapping - 45, // 40: parca.query.v1alpha1.FlamegraphNodeMeta.function:type_name -> parca.metastore.v1alpha1.Function - 46, // 41: parca.query.v1alpha1.FlamegraphNodeMeta.line:type_name -> parca.metastore.v1alpha1.Line + 44, // 38: parca.query.v1alpha1.FlamegraphNodeMeta.location:type_name -> parca.metastore.v1alpha1.Location + 45, // 39: parca.query.v1alpha1.FlamegraphNodeMeta.mapping:type_name -> parca.metastore.v1alpha1.Mapping + 46, // 40: parca.query.v1alpha1.FlamegraphNodeMeta.function:type_name -> parca.metastore.v1alpha1.Function + 47, // 41: parca.query.v1alpha1.FlamegraphNodeMeta.line:type_name -> parca.metastore.v1alpha1.Line 27, // 42: parca.query.v1alpha1.CallgraphNode.meta:type_name -> parca.query.v1alpha1.CallgraphNodeMeta - 43, // 43: parca.query.v1alpha1.CallgraphNodeMeta.location:type_name -> parca.metastore.v1alpha1.Location - 44, // 44: parca.query.v1alpha1.CallgraphNodeMeta.mapping:type_name -> parca.metastore.v1alpha1.Mapping - 45, // 45: parca.query.v1alpha1.CallgraphNodeMeta.function:type_name -> parca.metastore.v1alpha1.Function - 46, // 46: parca.query.v1alpha1.CallgraphNodeMeta.line:type_name -> parca.metastore.v1alpha1.Line + 44, // 43: parca.query.v1alpha1.CallgraphNodeMeta.location:type_name -> parca.metastore.v1alpha1.Location + 45, // 44: parca.query.v1alpha1.CallgraphNodeMeta.mapping:type_name -> parca.metastore.v1alpha1.Mapping + 46, // 45: parca.query.v1alpha1.CallgraphNodeMeta.function:type_name -> parca.metastore.v1alpha1.Function + 47, // 46: parca.query.v1alpha1.CallgraphNodeMeta.line:type_name -> parca.metastore.v1alpha1.Line 26, // 47: parca.query.v1alpha1.Callgraph.nodes:type_name -> parca.query.v1alpha1.CallgraphNode 28, // 48: parca.query.v1alpha1.Callgraph.edges:type_name -> parca.query.v1alpha1.CallgraphEdge 20, // 49: parca.query.v1alpha1.QueryResponse.flamegraph:type_name -> parca.query.v1alpha1.Flamegraph @@ -3579,32 +3667,33 @@ var file_parca_query_v1alpha1_query_proto_depIdxs = []int32{ 29, // 51: parca.query.v1alpha1.QueryResponse.callgraph:type_name -> parca.query.v1alpha1.Callgraph 21, // 52: parca.query.v1alpha1.QueryResponse.flamegraph_arrow:type_name -> parca.query.v1alpha1.FlamegraphArrow 22, // 53: parca.query.v1alpha1.QueryResponse.source:type_name -> parca.query.v1alpha1.Source - 40, // 54: parca.query.v1alpha1.SeriesRequest.start:type_name -> google.protobuf.Timestamp - 40, // 55: parca.query.v1alpha1.SeriesRequest.end:type_name -> google.protobuf.Timestamp - 40, // 56: parca.query.v1alpha1.LabelsRequest.start:type_name -> google.protobuf.Timestamp - 40, // 57: parca.query.v1alpha1.LabelsRequest.end:type_name -> google.protobuf.Timestamp - 40, // 58: parca.query.v1alpha1.ValuesRequest.start:type_name -> google.protobuf.Timestamp - 40, // 59: parca.query.v1alpha1.ValuesRequest.end:type_name -> google.protobuf.Timestamp - 14, // 60: parca.query.v1alpha1.ShareProfileRequest.query_request:type_name -> parca.query.v1alpha1.QueryRequest - 6, // 61: parca.query.v1alpha1.QueryService.QueryRange:input_type -> parca.query.v1alpha1.QueryRangeRequest - 14, // 62: parca.query.v1alpha1.QueryService.Query:input_type -> parca.query.v1alpha1.QueryRequest - 31, // 63: parca.query.v1alpha1.QueryService.Series:input_type -> parca.query.v1alpha1.SeriesRequest - 3, // 64: parca.query.v1alpha1.QueryService.ProfileTypes:input_type -> parca.query.v1alpha1.ProfileTypesRequest - 33, // 65: parca.query.v1alpha1.QueryService.Labels:input_type -> parca.query.v1alpha1.LabelsRequest - 35, // 66: parca.query.v1alpha1.QueryService.Values:input_type -> parca.query.v1alpha1.ValuesRequest - 38, // 67: parca.query.v1alpha1.QueryService.ShareProfile:input_type -> parca.query.v1alpha1.ShareProfileRequest - 7, // 68: parca.query.v1alpha1.QueryService.QueryRange:output_type -> parca.query.v1alpha1.QueryRangeResponse - 30, // 69: parca.query.v1alpha1.QueryService.Query:output_type -> parca.query.v1alpha1.QueryResponse - 32, // 70: parca.query.v1alpha1.QueryService.Series:output_type -> parca.query.v1alpha1.SeriesResponse - 4, // 71: parca.query.v1alpha1.QueryService.ProfileTypes:output_type -> parca.query.v1alpha1.ProfileTypesResponse - 34, // 72: parca.query.v1alpha1.QueryService.Labels:output_type -> parca.query.v1alpha1.LabelsResponse - 36, // 73: parca.query.v1alpha1.QueryService.Values:output_type -> parca.query.v1alpha1.ValuesResponse - 39, // 74: parca.query.v1alpha1.QueryService.ShareProfile:output_type -> parca.query.v1alpha1.ShareProfileResponse - 68, // [68:75] is the sub-list for method output_type - 61, // [61:68] is the sub-list for method input_type - 61, // [61:61] is the sub-list for extension type_name - 61, // [61:61] is the sub-list for extension extendee - 0, // [0:61] is the sub-list for field type_name + 40, // 54: parca.query.v1alpha1.QueryResponse.table_arrow:type_name -> parca.query.v1alpha1.TableArrow + 41, // 55: parca.query.v1alpha1.SeriesRequest.start:type_name -> google.protobuf.Timestamp + 41, // 56: parca.query.v1alpha1.SeriesRequest.end:type_name -> google.protobuf.Timestamp + 41, // 57: parca.query.v1alpha1.LabelsRequest.start:type_name -> google.protobuf.Timestamp + 41, // 58: parca.query.v1alpha1.LabelsRequest.end:type_name -> google.protobuf.Timestamp + 41, // 59: parca.query.v1alpha1.ValuesRequest.start:type_name -> google.protobuf.Timestamp + 41, // 60: parca.query.v1alpha1.ValuesRequest.end:type_name -> google.protobuf.Timestamp + 14, // 61: parca.query.v1alpha1.ShareProfileRequest.query_request:type_name -> parca.query.v1alpha1.QueryRequest + 6, // 62: parca.query.v1alpha1.QueryService.QueryRange:input_type -> parca.query.v1alpha1.QueryRangeRequest + 14, // 63: parca.query.v1alpha1.QueryService.Query:input_type -> parca.query.v1alpha1.QueryRequest + 31, // 64: parca.query.v1alpha1.QueryService.Series:input_type -> parca.query.v1alpha1.SeriesRequest + 3, // 65: parca.query.v1alpha1.QueryService.ProfileTypes:input_type -> parca.query.v1alpha1.ProfileTypesRequest + 33, // 66: parca.query.v1alpha1.QueryService.Labels:input_type -> parca.query.v1alpha1.LabelsRequest + 35, // 67: parca.query.v1alpha1.QueryService.Values:input_type -> parca.query.v1alpha1.ValuesRequest + 38, // 68: parca.query.v1alpha1.QueryService.ShareProfile:input_type -> parca.query.v1alpha1.ShareProfileRequest + 7, // 69: parca.query.v1alpha1.QueryService.QueryRange:output_type -> parca.query.v1alpha1.QueryRangeResponse + 30, // 70: parca.query.v1alpha1.QueryService.Query:output_type -> parca.query.v1alpha1.QueryResponse + 32, // 71: parca.query.v1alpha1.QueryService.Series:output_type -> parca.query.v1alpha1.SeriesResponse + 4, // 72: parca.query.v1alpha1.QueryService.ProfileTypes:output_type -> parca.query.v1alpha1.ProfileTypesResponse + 34, // 73: parca.query.v1alpha1.QueryService.Labels:output_type -> parca.query.v1alpha1.LabelsResponse + 36, // 74: parca.query.v1alpha1.QueryService.Values:output_type -> parca.query.v1alpha1.ValuesResponse + 39, // 75: parca.query.v1alpha1.QueryService.ShareProfile:output_type -> parca.query.v1alpha1.ShareProfileResponse + 69, // [69:76] is the sub-list for method output_type + 62, // [62:69] is the sub-list for method input_type + 62, // [62:62] is the sub-list for extension type_name + 62, // [62:62] is the sub-list for extension extendee + 0, // [0:62] is the sub-list for field type_name } func init() { file_parca_query_v1alpha1_query_proto_init() } @@ -4057,6 +4146,18 @@ func file_parca_query_v1alpha1_query_proto_init() { return nil } } + file_parca_query_v1alpha1_query_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TableArrow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_parca_query_v1alpha1_query_proto_msgTypes[10].OneofWrappers = []interface{}{ (*ProfileDiffSelection_Merge)(nil), @@ -4074,6 +4175,7 @@ func file_parca_query_v1alpha1_query_proto_init() { (*QueryResponse_Callgraph)(nil), (*QueryResponse_FlamegraphArrow)(nil), (*QueryResponse_Source)(nil), + (*QueryResponse_TableArrow)(nil), } file_parca_query_v1alpha1_query_proto_msgTypes[35].OneofWrappers = []interface{}{} type x struct{} @@ -4082,7 +4184,7 @@ func file_parca_query_v1alpha1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_parca_query_v1alpha1_query_proto_rawDesc, NumEnums: 3, - NumMessages: 37, + NumMessages: 38, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/proto/go/parca/query/v1alpha1/query_vtproto.pb.go b/gen/proto/go/parca/query/v1alpha1/query_vtproto.pb.go index ebf76c4ccb2..02f0070671f 100644 --- a/gen/proto/go/parca/query/v1alpha1/query_vtproto.pb.go +++ b/gen/proto/go/parca/query/v1alpha1/query_vtproto.pb.go @@ -2373,6 +2373,25 @@ func (m *QueryResponse_Source) MarshalToSizedBufferVT(dAtA []byte) (int, error) } return len(dAtA) - i, nil } +func (m *QueryResponse_TableArrow) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *QueryResponse_TableArrow) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.TableArrow != nil { + size, err := m.TableArrow.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x6a + } + return len(dAtA) - i, nil +} func (m *SeriesRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -2910,6 +2929,53 @@ func (m *ShareProfileResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *TableArrow) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TableArrow) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TableArrow) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Unit) > 0 { + i -= len(m.Unit) + copy(dAtA[i:], m.Unit) + i = encodeVarint(dAtA, i, uint64(len(m.Unit))) + i-- + dAtA[i] = 0x12 + } + if len(m.Record) > 0 { + i -= len(m.Record) + copy(dAtA[i:], m.Record) + i = encodeVarint(dAtA, i, uint64(len(m.Record))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarint(dAtA []byte, offset int, v uint64) int { offset -= sov(v) base := offset @@ -3766,6 +3832,18 @@ func (m *QueryResponse_Source) SizeVT() (n int) { } return n } +func (m *QueryResponse_TableArrow) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TableArrow != nil { + l = m.TableArrow.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} func (m *SeriesRequest) SizeVT() (n int) { if m == nil { return 0 @@ -3982,6 +4060,24 @@ func (m *ShareProfileResponse) SizeVT() (n int) { return n } +func (m *TableArrow) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Record) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Unit) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func sov(x uint64) (n int) { return (bits.Len64(x|1) + 6) / 7 } @@ -8722,6 +8818,47 @@ func (m *QueryResponse) UnmarshalVT(dAtA []byte) error { m.Report = &QueryResponse_Source{Source: v} } iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TableArrow", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Report.(*QueryResponse_TableArrow); ok { + if err := oneof.TableArrow.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TableArrow{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Report = &QueryResponse_TableArrow{TableArrow: v} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -9888,6 +10025,123 @@ func (m *ShareProfileResponse) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *TableArrow) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TableArrow: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TableArrow: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Record", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Record = append(m.Record[:0], dAtA[iNdEx:postIndex]...) + if m.Record == nil { + m.Record = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Unit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skip(dAtA []byte) (n int, err error) { l := len(dAtA) diff --git a/gen/proto/swagger/parca/query/v1alpha1/query.swagger.json b/gen/proto/swagger/parca/query/v1alpha1/query.swagger.json index dfb00ff5945..c94f2ddf4fd 100644 --- a/gen/proto/swagger/parca/query/v1alpha1/query.swagger.json +++ b/gen/proto/swagger/parca/query/v1alpha1/query.swagger.json @@ -299,7 +299,7 @@ }, { "name": "reportType", - "description": "report_type is the type of report to return\n\n - REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED: REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED unspecified\n - REPORT_TYPE_PPROF: REPORT_TYPE_PPROF unspecified\n - REPORT_TYPE_TOP: REPORT_TYPE_TOP unspecified\n - REPORT_TYPE_CALLGRAPH: REPORT_TYPE_CALLGRAPH unspecified\n - REPORT_TYPE_FLAMEGRAPH_TABLE: REPORT_TYPE_FLAMEGRAPH_TABLE unspecified\n - REPORT_TYPE_FLAMEGRAPH_ARROW: REPORT_TYPE_FLAMEGRAPH_ARROW unspecified\n - REPORT_TYPE_SOURCE: REPORT_TYPE_SOURCE contains source code annotated with profiling information", + "description": "report_type is the type of report to return\n\n - REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED: REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED unspecified\n - REPORT_TYPE_PPROF: REPORT_TYPE_PPROF unspecified\n - REPORT_TYPE_TOP: REPORT_TYPE_TOP unspecified\n - REPORT_TYPE_CALLGRAPH: REPORT_TYPE_CALLGRAPH unspecified\n - REPORT_TYPE_FLAMEGRAPH_TABLE: REPORT_TYPE_FLAMEGRAPH_TABLE unspecified\n - REPORT_TYPE_FLAMEGRAPH_ARROW: REPORT_TYPE_FLAMEGRAPH_ARROW unspecified\n - REPORT_TYPE_SOURCE: REPORT_TYPE_SOURCE contains source code annotated with profiling information\n - REPORT_TYPE_TABLE_ARROW: REPORT_TYPE_TABLE_ARROW unspecified", "in": "query", "required": false, "type": "string", @@ -310,7 +310,8 @@ "REPORT_TYPE_CALLGRAPH", "REPORT_TYPE_FLAMEGRAPH_TABLE", "REPORT_TYPE_FLAMEGRAPH_ARROW", - "REPORT_TYPE_SOURCE" + "REPORT_TYPE_SOURCE", + "REPORT_TYPE_TABLE_ARROW" ], "default": "REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED" }, @@ -549,10 +550,11 @@ "REPORT_TYPE_CALLGRAPH", "REPORT_TYPE_FLAMEGRAPH_TABLE", "REPORT_TYPE_FLAMEGRAPH_ARROW", - "REPORT_TYPE_SOURCE" + "REPORT_TYPE_SOURCE", + "REPORT_TYPE_TABLE_ARROW" ], "default": "REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED", - "description": "- REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED: REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED unspecified\n - REPORT_TYPE_PPROF: REPORT_TYPE_PPROF unspecified\n - REPORT_TYPE_TOP: REPORT_TYPE_TOP unspecified\n - REPORT_TYPE_CALLGRAPH: REPORT_TYPE_CALLGRAPH unspecified\n - REPORT_TYPE_FLAMEGRAPH_TABLE: REPORT_TYPE_FLAMEGRAPH_TABLE unspecified\n - REPORT_TYPE_FLAMEGRAPH_ARROW: REPORT_TYPE_FLAMEGRAPH_ARROW unspecified\n - REPORT_TYPE_SOURCE: REPORT_TYPE_SOURCE contains source code annotated with profiling information", + "description": "- REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED: REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED unspecified\n - REPORT_TYPE_PPROF: REPORT_TYPE_PPROF unspecified\n - REPORT_TYPE_TOP: REPORT_TYPE_TOP unspecified\n - REPORT_TYPE_CALLGRAPH: REPORT_TYPE_CALLGRAPH unspecified\n - REPORT_TYPE_FLAMEGRAPH_TABLE: REPORT_TYPE_FLAMEGRAPH_TABLE unspecified\n - REPORT_TYPE_FLAMEGRAPH_ARROW: REPORT_TYPE_FLAMEGRAPH_ARROW unspecified\n - REPORT_TYPE_SOURCE: REPORT_TYPE_SOURCE contains source code annotated with profiling information\n - REPORT_TYPE_TABLE_ARROW: REPORT_TYPE_TABLE_ARROW unspecified", "title": "ReportType is the type of report to return" }, "metastorev1alpha1Function": { @@ -797,6 +799,10 @@ "$ref": "#/definitions/queryv1alpha1Source", "title": "source is the source report type result" }, + "tableArrow": { + "$ref": "#/definitions/v1alpha1TableArrow", + "title": "table_arrow is a table encoded as a arrow record" + }, "total": { "type": "string", "format": "int64", @@ -1432,6 +1438,21 @@ }, "description": "SourceReference contains a reference to source code." }, + "v1alpha1TableArrow": { + "type": "object", + "properties": { + "record": { + "type": "string", + "format": "byte", + "title": "record is the arrow record containing the actual table data" + }, + "unit": { + "type": "string", + "title": "unit is the unit represented by the flame graph" + } + }, + "title": "TableArrow has the table encoded as a arrow record" + }, "v1alpha1Top": { "type": "object", "properties": { diff --git a/gen/proto/swagger/parca/share/v1alpha1/share.swagger.json b/gen/proto/swagger/parca/share/v1alpha1/share.swagger.json index 18d49ddaafc..18e55bc5993 100644 --- a/gen/proto/swagger/parca/share/v1alpha1/share.swagger.json +++ b/gen/proto/swagger/parca/share/v1alpha1/share.swagger.json @@ -26,10 +26,11 @@ "REPORT_TYPE_CALLGRAPH", "REPORT_TYPE_FLAMEGRAPH_TABLE", "REPORT_TYPE_FLAMEGRAPH_ARROW", - "REPORT_TYPE_SOURCE" + "REPORT_TYPE_SOURCE", + "REPORT_TYPE_TABLE_ARROW" ], "default": "REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED", - "description": "- REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED: REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED unspecified\n - REPORT_TYPE_PPROF: REPORT_TYPE_PPROF unspecified\n - REPORT_TYPE_TOP: REPORT_TYPE_TOP unspecified\n - REPORT_TYPE_CALLGRAPH: REPORT_TYPE_CALLGRAPH unspecified\n - REPORT_TYPE_FLAMEGRAPH_TABLE: REPORT_TYPE_FLAMEGRAPH_TABLE unspecified\n - REPORT_TYPE_FLAMEGRAPH_ARROW: REPORT_TYPE_FLAMEGRAPH_ARROW unspecified\n - REPORT_TYPE_SOURCE: REPORT_TYPE_SOURCE contains source code annotated with profiling information", + "description": "- REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED: REPORT_TYPE_FLAMEGRAPH_UNSPECIFIED unspecified\n - REPORT_TYPE_PPROF: REPORT_TYPE_PPROF unspecified\n - REPORT_TYPE_TOP: REPORT_TYPE_TOP unspecified\n - REPORT_TYPE_CALLGRAPH: REPORT_TYPE_CALLGRAPH unspecified\n - REPORT_TYPE_FLAMEGRAPH_TABLE: REPORT_TYPE_FLAMEGRAPH_TABLE unspecified\n - REPORT_TYPE_FLAMEGRAPH_ARROW: REPORT_TYPE_FLAMEGRAPH_ARROW unspecified\n - REPORT_TYPE_SOURCE: REPORT_TYPE_SOURCE contains source code annotated with profiling information\n - REPORT_TYPE_TABLE_ARROW: REPORT_TYPE_TABLE_ARROW unspecified", "title": "ReportType is the type of report to return" }, "metastorev1alpha1Function": { diff --git a/pkg/query/columnquery.go b/pkg/query/columnquery.go index 157b138dd8c..e825e1fc72e 100644 --- a/pkg/query/columnquery.go +++ b/pkg/query/columnquery.go @@ -592,6 +592,18 @@ func RenderReport( Filtered: filtered, Report: &pb.QueryResponse_Top{Top: top}, }, nil + case pb.QueryRequest_REPORT_TYPE_TABLE_ARROW: + table, cumulative, err := GenerateTable(ctx, mem, tracer, p) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to generate table: %v", err.Error()) + } + + return &pb.QueryResponse{ + Total: cumulative, + Filtered: filtered, + Report: &pb.QueryResponse_TableArrow{TableArrow: table}, + }, nil + case pb.QueryRequest_REPORT_TYPE_CALLGRAPH: op, err := converter.Convert(ctx, p) if err != nil { diff --git a/pkg/query/flamegraph_arrow_test.go b/pkg/query/flamegraph_arrow_test.go index 281c3b93e99..3b770ad9ee7 100644 --- a/pkg/query/flamegraph_arrow_test.go +++ b/pkg/query/flamegraph_arrow_test.go @@ -119,6 +119,16 @@ func requireColumn(t *testing.T, r arrow.Record, field string, expected any) { expected, r.Column(r.Schema().FieldIndices(field)[0]).(*array.Uint64).Uint64Values(), ) + case []bool: + actual := make([]bool, r.NumRows()) + col := r.Column(r.Schema().FieldIndices(field)[0]).(*array.Boolean) + for i := 0; i < int(r.NumRows()); i++ { + actual[i] = col.Value(i) + } + require.Equal(t, expected, actual) + + default: + require.Fail(t, "unsupported type") } } @@ -127,14 +137,30 @@ func requireColumnBinaryDict(t *testing.T, r arrow.Record, field string, expecte switch expected.(type) { case []string: - mappingFilesString := dict.Dictionary().(*array.Binary) - mappingFiles := make([]string, r.NumRows()) - for i := 0; i < int(r.NumRows()); i++ { - if dict.IsValid(i) { - mappingFiles[i] = string(mappingFilesString.Value(dict.GetValueIndex(i))) + if dictStringsBytes, ok := dict.Dictionary().(*array.Binary); ok { + actual := make([]string, r.NumRows()) + for i := 0; i < int(r.NumRows()); i++ { + if dict.IsValid(i) { + actual[i] = string(dictStringsBytes.Value(dict.GetValueIndex(i))) + } else { + actual[i] = "(null)" + } + } + require.Equal(t, expected, actual) + } + if dictStrings, ok := dict.Dictionary().(*array.String); ok { + actual := make([]string, r.NumRows()) + for i := 0; i < int(r.NumRows()); i++ { + if dict.IsValid(i) { + actual[i] = dictStrings.Value(dict.GetValueIndex(i)) + } else { + actual[i] = "(null)" + } } + require.Equal(t, expected, actual) } - require.Equal(t, expected, mappingFiles) + default: + require.Fail(t, "unsupported type") } } @@ -297,7 +323,7 @@ func TestGenerateFlamegraphArrow(t *testing.T) { height: 5, trimmed: 0, // TODO rows: []flamegraphRow{ - {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "", MappingBuildID: "", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "", FunctionSystemName: "", FunctionFilename: "", Cumulative: 10, Labels: nil, Children: []uint32{1, 3, 7, 11}}, // 0 + {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "(null)", MappingBuildID: "(null)", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "(null)", FunctionSystemName: "(null)", FunctionFilename: "(null)", Cumulative: 10, Labels: nil, Children: []uint32{1, 3, 7, 11}}, // 0 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 2, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{2}}, // 1 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 2, Labels: map[string]string{"goroutine": "1"}, Children: nil}, // 2 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 1, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{4}}, // 3 @@ -321,12 +347,12 @@ func TestGenerateFlamegraphArrow(t *testing.T) { height: 5, trimmed: 0, // TODO rows: []flamegraphRow{ - {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "", MappingBuildID: "", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "", FunctionSystemName: "", FunctionFilename: "", Cumulative: 10, Labels: nil, Children: []uint32{1}}, // 0 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 10, Labels: nil, Children: []uint32{2}}, // 1 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 10, Labels: nil, Children: []uint32{3}}, // 2 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, FunctionStartLine: 3, FunctionName: "3", FunctionSystemName: "3", FunctionFilename: "3", Cumulative: 8, Labels: nil, Children: []uint32{4, 5}}, // 3 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa5, LocationFolded: false, LocationLine: 5, FunctionStartLine: 5, FunctionName: "5", FunctionSystemName: "5", FunctionFilename: "5", Cumulative: 5, Labels: nil, Children: nil}, // 4 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa4, LocationFolded: false, LocationLine: 4, FunctionStartLine: 4, FunctionName: "4", FunctionSystemName: "4", FunctionFilename: "4", Cumulative: 3, Labels: nil, Children: nil}, // 5 + {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "(null)", MappingBuildID: "(null)", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "(null)", FunctionSystemName: "(null)", FunctionFilename: "(null)", Cumulative: 10, Labels: nil, Children: []uint32{1}}, // 0 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 10, Labels: nil, Children: []uint32{2}}, // 1 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 10, Labels: nil, Children: []uint32{3}}, // 2 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, FunctionStartLine: 3, FunctionName: "3", FunctionSystemName: "3", FunctionFilename: "3", Cumulative: 8, Labels: nil, Children: []uint32{4, 5}}, // 3 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa5, LocationFolded: false, LocationLine: 5, FunctionStartLine: 5, FunctionName: "5", FunctionSystemName: "5", FunctionFilename: "5", Cumulative: 5, Labels: nil, Children: nil}, // 4 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa4, LocationFolded: false, LocationLine: 4, FunctionStartLine: 4, FunctionName: "4", FunctionSystemName: "4", FunctionFilename: "4", Cumulative: 3, Labels: nil, Children: nil}, // 5 }, }, { name: "aggregate-pprof-labels", @@ -336,24 +362,24 @@ func TestGenerateFlamegraphArrow(t *testing.T) { height: 6, trimmed: 0, // TODO rows: []flamegraphRow{ - {LabelsOnly: true, MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "", MappingBuildID: "", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "", FunctionSystemName: "", FunctionFilename: "", Cumulative: 10, Labels: nil, Children: []uint32{1, 6, 10}}, // 0 + {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "(null)", MappingBuildID: "(null)", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: `(null)`, FunctionSystemName: "(null)", FunctionFilename: "(null)", Cumulative: 10, Labels: nil, Children: []uint32{1, 6, 10}}, // 0 // all of these have the same labels, so they are aggregated - {LabelsOnly: true, MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "", MappingBuildID: "", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "", FunctionSystemName: "", FunctionFilename: "", Cumulative: 3, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{2}}, // 1 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 3, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{3}}, // 2 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 3, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{4}}, // 3 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, FunctionStartLine: 3, FunctionName: "3", FunctionSystemName: "3", FunctionFilename: "3", Cumulative: 1, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{5}}, // 4 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa5, LocationFolded: false, LocationLine: 5, FunctionStartLine: 5, FunctionName: "5", FunctionSystemName: "5", FunctionFilename: "5", Cumulative: 1, Labels: map[string]string{"goroutine": "1"}, Children: nil}, // 5 + {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "(null)", MappingBuildID: "(null)", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: `(null)`, FunctionSystemName: "(null)", FunctionFilename: "(null)", Cumulative: 3, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{2}, LabelsOnly: true}, // 1 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 3, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{3}}, // 2 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 3, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{4}}, // 3 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, FunctionStartLine: 3, FunctionName: "3", FunctionSystemName: "3", FunctionFilename: "3", Cumulative: 1, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{5}}, // 4 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa5, LocationFolded: false, LocationLine: 5, FunctionStartLine: 5, FunctionName: "5", FunctionSystemName: "5", FunctionFilename: "5", Cumulative: 1, Labels: map[string]string{"goroutine": "1"}, Children: nil}, // 5 // all of these have no labels, so they are kept separate {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 3, Labels: nil, Children: []uint32{7}}, // 6 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 3, Labels: nil, Children: []uint32{8}}, // 7 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, FunctionStartLine: 3, FunctionName: "3", FunctionSystemName: "3", FunctionFilename: "3", Cumulative: 3, Labels: nil, Children: []uint32{9}}, // 8 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa4, LocationFolded: false, LocationLine: 4, FunctionStartLine: 4, FunctionName: "4", FunctionSystemName: "4", FunctionFilename: "4", Cumulative: 3, Labels: nil, Children: nil}, // 9 // the same stack as the second stack, but a different pprof label - {LabelsOnly: true, MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "", MappingBuildID: "", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "", FunctionSystemName: "", FunctionFilename: "", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: []uint32{11}}, // 10 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: []uint32{12}}, // 11 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: []uint32{13}}, // 12 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, FunctionStartLine: 3, FunctionName: "3", FunctionSystemName: "3", FunctionFilename: "3", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: []uint32{14}}, // 13 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa5, LocationFolded: false, LocationLine: 5, FunctionStartLine: 5, FunctionName: "5", FunctionSystemName: "5", FunctionFilename: "5", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: nil}, // 14 + {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "(null)", MappingBuildID: "(null)", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: `(null)`, FunctionSystemName: "(null)", FunctionFilename: "(null)", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: []uint32{11}, LabelsOnly: true}, // 10 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: []uint32{12}}, // 11 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: []uint32{13}}, // 12 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, FunctionStartLine: 3, FunctionName: "3", FunctionSystemName: "3", FunctionFilename: "3", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: []uint32{14}}, // 13 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa5, LocationFolded: false, LocationLine: 5, FunctionStartLine: 5, FunctionName: "5", FunctionSystemName: "5", FunctionFilename: "5", Cumulative: 4, Labels: map[string]string{"goroutine": "2"}, Children: nil}, // 14 }, }, { name: "aggregate-mapping-file", @@ -364,11 +390,11 @@ func TestGenerateFlamegraphArrow(t *testing.T) { trimmed: 0, // TODO rows: []flamegraphRow{ // This aggregates all the rows with the same mapping file, meaning that we only keep one flamegraphRow per stack depth in this example. - {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "", MappingBuildID: "", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "", FunctionSystemName: "", FunctionFilename: "", Cumulative: 10, Labels: nil, Children: []uint32{1}}, // 0 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 10, Labels: nil, Children: []uint32{2}}, // 1 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 10, Labels: nil, Children: []uint32{3}}, // 2 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, FunctionStartLine: 3, FunctionName: "3", FunctionSystemName: "3", FunctionFilename: "3", Cumulative: 8, Labels: nil, Children: []uint32{4}}, // 3 - {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa5, LocationFolded: false, LocationLine: 5, FunctionStartLine: 5, FunctionName: "5", FunctionSystemName: "5", FunctionFilename: "5", Cumulative: 8, Labels: nil, Children: nil}, // 4 + {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "(null)", MappingBuildID: "(null)", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "(null)", FunctionSystemName: "(null)", FunctionFilename: "(null)", Cumulative: 10, Labels: nil, Children: []uint32{1}}, // 0 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, FunctionStartLine: 1, FunctionName: "1", FunctionSystemName: "1", FunctionFilename: "1", Cumulative: 10, Labels: nil, Children: []uint32{2}}, // 1 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, FunctionStartLine: 2, FunctionName: "2", FunctionSystemName: "2", FunctionFilename: "2", Cumulative: 10, Labels: nil, Children: []uint32{3}}, // 2 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, FunctionStartLine: 3, FunctionName: "3", FunctionSystemName: "3", FunctionFilename: "3", Cumulative: 8, Labels: nil, Children: []uint32{4}}, // 3 + {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa5, LocationFolded: false, LocationLine: 5, FunctionStartLine: 5, FunctionName: "5", FunctionSystemName: "5", FunctionFilename: "5", Cumulative: 8, Labels: nil, Children: nil}, // 4 }, }} { t.Run(tc.name, func(t *testing.T) { @@ -391,6 +417,7 @@ func TestGenerateFlamegraphArrow(t *testing.T) { // Convert the numRows to columns for easier access when testing below. columns := rowsToColumn(tc.rows) + requireColumn(t, fa, FlamegraphFieldLabelsOnly, columns.labelsOnly) requireColumn(t, fa, FlamegraphFieldMappingStart, columns.mappingStart) requireColumn(t, fa, FlamegraphFieldMappingLimit, columns.mappingLimit) requireColumn(t, fa, FlamegraphFieldMappingOffset, columns.mappingOffset) @@ -500,7 +527,7 @@ func TestGenerateFlamegraphArrowWithInlined(t *testing.T) { require.Equal(t, int64(5), record.NumRows()) rows := []flamegraphRow{ - {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "", FunctionSystemName: "", FunctionFilename: "", Cumulative: 1, Labels: nil, Children: []uint32{1}}, // 0 + {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0, LocationFolded: false, LocationLine: 0, FunctionStartLine: 0, FunctionName: "(null)", FunctionSystemName: "(null)", FunctionFilename: "(null)", Cumulative: 1, Labels: nil, Children: []uint32{1}}, // 0 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 173, FunctionStartLine: 0, FunctionName: "net.(*netFD).accept", FunctionSystemName: "net.(*netFD).accept", FunctionFilename: "net/fd_unix.go", Cumulative: 1, Labels: map[string]string{"goroutine": "1"}, Children: []uint32{2}}, // 1 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 402, FunctionStartLine: 0, FunctionName: "internal/poll.(*pollDesc).waitRead", FunctionSystemName: "internal/poll.(*pollDesc).waitRead", FunctionFilename: "internal/poll/fd_poll_runtime.go", Cumulative: 1, Labels: nil, Children: []uint32{3}}, // 2 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 89, FunctionStartLine: 0, FunctionName: "internal/poll.(*FD).Accept", FunctionSystemName: "internal/poll.(*FD).Accept", FunctionFilename: "internal/poll/fd_unix.go", Cumulative: 1, Labels: nil, Children: []uint32{4}}, // 3 @@ -604,7 +631,7 @@ func TestGenerateFlamegraphArrowUnsymbolized(t *testing.T) { height: 5, trimmed: 0, // TODO rows: []flamegraphRow{ - {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "", MappingBuildID: "", LocationAddress: 0, LocationFolded: false, LocationLine: 0, Cumulative: 6, Children: []uint32{1}}, // 0 + {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "(null)", MappingBuildID: "(null)", LocationAddress: 0, LocationFolded: false, LocationLine: 0, Cumulative: 6, Children: []uint32{1}}, // 0 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, Cumulative: 6, Children: []uint32{2}}, // 1 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, Cumulative: 6, Children: []uint32{3}}, // 2 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, Cumulative: 4, Children: []uint32{4, 5}}, // 3 @@ -620,7 +647,7 @@ func TestGenerateFlamegraphArrowUnsymbolized(t *testing.T) { height: 5, trimmed: 0, // TODO rows: []flamegraphRow{ - {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "", MappingBuildID: "", LocationAddress: 0, LocationFolded: false, LocationLine: 0, Cumulative: 6, Children: []uint32{1}}, // 0 + {MappingStart: 0, MappingLimit: 0, MappingOffset: 0, MappingFile: "(null)", MappingBuildID: "(null)", LocationAddress: 0, LocationFolded: false, LocationLine: 0, Cumulative: 6, Children: []uint32{1}}, // 0 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa1, LocationFolded: false, LocationLine: 1, Cumulative: 6, Children: []uint32{2}}, // 1 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa2, LocationFolded: false, LocationLine: 2, Cumulative: 6, Children: []uint32{3}}, // 2 {MappingStart: 1, MappingLimit: 1, MappingOffset: 0x1234, MappingFile: "a", MappingBuildID: "aID", LocationAddress: 0xa3, LocationFolded: false, LocationLine: 3, Cumulative: 4, Children: []uint32{4, 5}}, // 3 diff --git a/pkg/query/table.go b/pkg/query/table.go new file mode 100644 index 00000000000..9663ec95688 --- /dev/null +++ b/pkg/query/table.go @@ -0,0 +1,393 @@ +// Copyright 2023 The Parca Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package query + +import ( + "bytes" + "context" + "fmt" + + "github.com/apache/arrow/go/v13/arrow" + "github.com/apache/arrow/go/v13/arrow/array" + "github.com/apache/arrow/go/v13/arrow/ipc" + "github.com/apache/arrow/go/v13/arrow/math" + "github.com/apache/arrow/go/v13/arrow/memory" + "github.com/polarsignals/frostdb/pqarrow/builder" + "go.opentelemetry.io/otel/trace" + + queryv1alpha1 "github.com/parca-dev/parca/gen/proto/go/parca/query/v1alpha1" + "github.com/parca-dev/parca/pkg/profile" +) + +const ( + TableFieldMappingStart = "mapping_start" + TableFieldMappingLimit = "mapping_limit" + TableFieldMappingOffset = "mapping_offset" + TableFieldMappingFile = "mapping_file" + TableFieldMappingBuildID = "mapping_build_id" + + TableFieldLocationAddress = "location_address" + TableFieldLocationFolded = "location_folded" + TableFieldLocationLine = "location_line" + + TableFieldFunctionStartLine = "function_startline" + TableFieldFunctionName = "function_name" + TableFieldFunctionSystemName = "function_system_name" + TableFieldFunctionFileName = "function_file_name" + + TableFieldCumulative = "cumulative" + TableFieldCumulativeDiff = "cumulative_diff" + TableFieldFlat = "flat" + TableFieldFlatDiff = "flat_diff" +) + +func GenerateTable( + ctx context.Context, + mem memory.Allocator, + tracer trace.Tracer, + p profile.Profile, +) (*queryv1alpha1.TableArrow, int64, error) { + ctx, span := tracer.Start(ctx, "GenerateTable") + defer span.End() + + record, cumulative, err := generateTableArrowRecord(ctx, mem, tracer, p) + if err != nil { + return nil, 0, err + } + defer record.Release() + + // TODO: Reuse buffer and potentially writers + var buf bytes.Buffer + w := ipc.NewWriter(&buf, + ipc.WithSchema(record.Schema()), + ipc.WithAllocator(mem), + ) + defer w.Close() + + if err = w.Write(record); err != nil { + return nil, 0, err + } + + return &queryv1alpha1.TableArrow{ + Record: buf.Bytes(), + Unit: p.Meta.SampleType.Unit, + }, cumulative, nil +} + +func generateTableArrowRecord( + ctx context.Context, + mem memory.Allocator, + tracer trace.Tracer, + p profile.Profile, +) (arrow.Record, int64, error) { + _, span := tracer.Start(ctx, "generateTableArrowRecord") + defer span.End() + + tb := newTableBuilder(mem) + defer tb.Release() + + row := 0 + + profileReader := profile.NewReader(p) + for _, r := range profileReader.RecordReaders { + tb.cumulative += math.Int64.Sum(r.Value) + + for sampleRow := 0; sampleRow < int(r.Record.NumRows()); sampleRow++ { + lOffsetStart, lOffsetEnd := r.Locations.ValueOffsets(sampleRow) + for locationRow := int(lOffsetStart); locationRow < int(lOffsetEnd); locationRow++ { + if r.Lines.IsNull(locationRow) { + // The location has no lines, we therefore compare its address. + + isLeaf := locationRow == int(lOffsetStart) + var buildID []byte + if r.MappingBuildIDDict.IsValid(locationRow) { + buildID = r.MappingBuildIDDict.Value(r.MappingBuildID.GetValueIndex(locationRow)) + } + addr := r.Address.Value(locationRow) + + // Check if we've seen the address for the mapping before. + // If not, we add it as a new row and add the address to the mapping to keep track of it. + // If we have seen the address before, we merge the address with the existing row by summing the values. + // Note for Go developers: This won't panic. Tests have shown that if the first check fails, the second check won't be run. + if cr, ok := tb.addresses[unsafeString(buildID)][addr]; !ok { + if err := tb.appendRow(r, sampleRow, locationRow, -1, isLeaf); err != nil { + return nil, 0, err + } + + if _, ok := tb.addresses[unsafeString(buildID)]; !ok { + tb.addresses[string(buildID)] = map[uint64]int{addr: row} + } else { + tb.addresses[string(buildID)][addr] = row + } + row++ + } else { + tb.mergeRow(r, cr, sampleRow, isLeaf) + } + } else { + // The location has lines, we therefore compare its function names. + + llOffsetStart, llOffsetEnd := r.Lines.ValueOffsets(locationRow) + for lineRow := int(llOffsetStart); lineRow < int(llOffsetEnd); lineRow++ { + isLeaf := locationRow == int(lOffsetStart) && lineRow == int(llOffsetStart) + + if r.Line.IsValid(lineRow) && r.LineFunction.IsValid(lineRow) { + fn := r.LineFunctionNameDict.Value(r.LineFunctionName.GetValueIndex(lineRow)) + if cr, ok := tb.functions[unsafeString(fn)]; !ok { + if err := tb.appendRow(r, sampleRow, locationRow, lineRow, isLeaf); err != nil { + return nil, 0, err + } + tb.functions[string(fn)] = row + row++ + } else { + tb.mergeRow(r, cr, sampleRow, isLeaf) + } + } + } + } + } + } + } + + rec, err := tb.NewRecord() + return rec, tb.cumulative, err +} + +type tableBuilder struct { + mem memory.Allocator + cumulative int64 + addresses map[string]map[uint64]int + functions map[string]int + + rb *builder.RecordBuilder + schema *arrow.Schema + + builderMappingStart *array.Uint64Builder + builderMappingLimit *array.Uint64Builder + builderMappingOffset *array.Uint64Builder + builderMappingFile *array.BinaryDictionaryBuilder + builderMappingBuildID *array.BinaryDictionaryBuilder + builderLocationAddress *array.Uint64Builder + builderLocationFolded *builder.OptBooleanBuilder + builderLocationLine *builder.OptInt64Builder + builderFunctionStartLine *builder.OptInt64Builder + builderFunctionName *array.BinaryDictionaryBuilder + builderFunctionSystemName *array.BinaryDictionaryBuilder + builderFunctionFileName *array.BinaryDictionaryBuilder + builderCumulative *builder.OptInt64Builder + builderCumulativeDiff *builder.OptInt64Builder + builderFlat *builder.OptInt64Builder + builderFlatDiff *builder.OptInt64Builder +} + +func newTableBuilder(mem memory.Allocator) *tableBuilder { + schema := arrow.NewSchema([]arrow.Field{ + {Name: TableFieldMappingStart, Type: arrow.PrimitiveTypes.Uint64}, + {Name: TableFieldMappingLimit, Type: arrow.PrimitiveTypes.Uint64}, + {Name: TableFieldMappingOffset, Type: arrow.PrimitiveTypes.Uint64}, + {Name: TableFieldMappingFile, Type: &arrow.DictionaryType{IndexType: arrow.PrimitiveTypes.Uint16, ValueType: arrow.BinaryTypes.String}}, + {Name: TableFieldMappingBuildID, Type: &arrow.DictionaryType{IndexType: arrow.PrimitiveTypes.Uint16, ValueType: arrow.BinaryTypes.String}}, + // Location + {Name: TableFieldLocationAddress, Type: arrow.PrimitiveTypes.Uint64}, + {Name: TableFieldLocationFolded, Type: &arrow.BooleanType{}}, + {Name: TableFieldLocationLine, Type: arrow.PrimitiveTypes.Int64}, + // Function + {Name: TableFieldFunctionStartLine, Type: arrow.PrimitiveTypes.Int64}, + {Name: TableFieldFunctionName, Type: &arrow.DictionaryType{IndexType: arrow.PrimitiveTypes.Uint32, ValueType: arrow.BinaryTypes.String}}, + {Name: TableFieldFunctionSystemName, Type: &arrow.DictionaryType{IndexType: arrow.PrimitiveTypes.Uint16, ValueType: arrow.BinaryTypes.String}}, + {Name: TableFieldFunctionFileName, Type: &arrow.DictionaryType{IndexType: arrow.PrimitiveTypes.Uint32, ValueType: arrow.BinaryTypes.String}}, + // Values + {Name: TableFieldCumulative, Type: arrow.PrimitiveTypes.Int64}, + {Name: TableFieldCumulativeDiff, Type: arrow.PrimitiveTypes.Int64, Nullable: true}, + {Name: TableFieldFlat, Type: arrow.PrimitiveTypes.Int64}, + {Name: TableFieldFlatDiff, Type: arrow.PrimitiveTypes.Int64}, + }, nil) + + rb := builder.NewRecordBuilder(mem, schema) + + tb := &tableBuilder{ + mem: mem, + addresses: map[string]map[uint64]int{}, + functions: map[string]int{}, + + rb: rb, + schema: schema, + builderMappingStart: rb.Field(schema.FieldIndices(TableFieldMappingStart)[0]).(*array.Uint64Builder), + builderMappingLimit: rb.Field(schema.FieldIndices(TableFieldMappingLimit)[0]).(*array.Uint64Builder), + builderMappingOffset: rb.Field(schema.FieldIndices(TableFieldMappingOffset)[0]).(*array.Uint64Builder), + builderMappingFile: rb.Field(schema.FieldIndices(TableFieldMappingFile)[0]).(*array.BinaryDictionaryBuilder), + builderMappingBuildID: rb.Field(schema.FieldIndices(TableFieldMappingBuildID)[0]).(*array.BinaryDictionaryBuilder), + builderLocationAddress: rb.Field(schema.FieldIndices(TableFieldLocationAddress)[0]).(*array.Uint64Builder), + builderLocationFolded: rb.Field(schema.FieldIndices(TableFieldLocationFolded)[0]).(*builder.OptBooleanBuilder), + builderLocationLine: rb.Field(schema.FieldIndices(TableFieldLocationLine)[0]).(*builder.OptInt64Builder), + builderFunctionStartLine: rb.Field(schema.FieldIndices(TableFieldFunctionStartLine)[0]).(*builder.OptInt64Builder), + builderFunctionName: rb.Field(schema.FieldIndices(TableFieldFunctionName)[0]).(*array.BinaryDictionaryBuilder), + builderFunctionSystemName: rb.Field(schema.FieldIndices(TableFieldFunctionSystemName)[0]).(*array.BinaryDictionaryBuilder), + builderFunctionFileName: rb.Field(schema.FieldIndices(TableFieldFunctionFileName)[0]).(*array.BinaryDictionaryBuilder), + builderCumulative: rb.Field(schema.FieldIndices(TableFieldCumulative)[0]).(*builder.OptInt64Builder), + builderCumulativeDiff: rb.Field(schema.FieldIndices(TableFieldCumulativeDiff)[0]).(*builder.OptInt64Builder), + builderFlat: rb.Field(schema.FieldIndices(TableFieldFlat)[0]).(*builder.OptInt64Builder), + builderFlatDiff: rb.Field(schema.FieldIndices(TableFieldFlatDiff)[0]).(*builder.OptInt64Builder), + } + + return tb +} + +// NewRecord returns a new record from the builders. +func (tb *tableBuilder) NewRecord() (arrow.Record, error) { + return tb.rb.NewRecord(), nil +} + +func (tb *tableBuilder) Release() { + tb.rb.Release() +} + +func (tb *tableBuilder) appendRow( + r *profile.RecordReader, + sampleRow, locationRow, lineRow int, + leaf bool, +) error { + for j := range tb.rb.Fields() { + switch tb.schema.Field(j).Name { + // Mapping + case TableFieldMappingStart: + if r.Mapping.IsValid(locationRow) && r.MappingStart.Value(locationRow) > 0 { + tb.builderMappingStart.Append(r.MappingStart.Value(locationRow)) + } else { + tb.builderMappingStart.AppendNull() + } + case TableFieldMappingLimit: + if r.Mapping.IsValid(locationRow) && r.MappingLimit.Value(locationRow) > 0 { + tb.builderMappingLimit.Append(r.MappingLimit.Value(locationRow)) + } else { + tb.builderMappingLimit.AppendNull() + } + case TableFieldMappingOffset: + if r.Mapping.IsValid(locationRow) && r.MappingOffset.Value(locationRow) > 0 { + tb.builderMappingOffset.Append(r.MappingOffset.Value(locationRow)) + } else { + tb.builderMappingOffset.AppendNull() + } + case TableFieldMappingFile: + if r.MappingFileDict.Len() == 0 { + tb.builderMappingFile.AppendNull() + } else { + if r.Mapping.IsValid(locationRow) && len(r.MappingFileDict.Value(r.MappingFile.GetValueIndex(locationRow))) > 0 { + _ = tb.builderMappingFile.Append(r.MappingFileDict.Value(r.MappingFile.GetValueIndex(locationRow))) + } else { + tb.builderMappingFile.AppendNull() + } + } + case TableFieldMappingBuildID: + if r.MappingBuildIDDict.Len() == 0 { + tb.builderMappingBuildID.AppendNull() + } else { + if r.Mapping.IsValid(locationRow) && len(r.MappingBuildIDDict.Value(r.MappingBuildID.GetValueIndex(locationRow))) > 0 { + _ = tb.builderMappingBuildID.Append(r.MappingBuildIDDict.Value(r.MappingBuildID.GetValueIndex(locationRow))) + } else { + tb.builderMappingBuildID.AppendNull() + } + } + // Location + case TableFieldLocationAddress: + tb.builderLocationAddress.Append(r.Address.Value(locationRow)) + + // TODO: Location isFolded we should remove this until we actually support folded functions. + case TableFieldLocationFolded: + tb.builderLocationFolded.AppendSingle(false) + case TableFieldLocationLine: + if lineRow >= 0 && r.Line.IsValid(lineRow) { + tb.builderLocationLine.Append(r.LineNumber.Value(lineRow)) + } else { + tb.builderLocationLine.AppendNull() + } + // Function + case TableFieldFunctionStartLine: + if lineRow >= 0 && r.LineFunction.IsValid(lineRow) && r.LineFunctionStartLine.Value(lineRow) > 0 { + tb.builderFunctionStartLine.Append(r.LineFunctionStartLine.Value(lineRow)) + } else { + tb.builderFunctionStartLine.AppendNull() + } + case TableFieldFunctionName: + if r.LineFunctionNameDict.Len() == 0 || lineRow == -1 { + tb.builderFunctionName.AppendNull() + } else { + if lineRow >= 0 && r.LineFunction.IsValid(lineRow) && len(r.LineFunctionNameDict.Value(r.LineFunctionName.GetValueIndex(lineRow))) > 0 { + _ = tb.builderFunctionName.Append(r.LineFunctionNameDict.Value(r.LineFunctionName.GetValueIndex(lineRow))) + } else { + tb.builderFunctionName.AppendNull() + } + } + case TableFieldFunctionSystemName: + if r.LineFunctionSystemNameDict.Len() == 0 || lineRow == -1 { + tb.builderFunctionSystemName.AppendNull() + } else { + if lineRow >= 0 && r.LineFunction.IsValid(lineRow) && len(r.LineFunctionSystemNameDict.Value(r.LineFunctionSystemName.GetValueIndex(lineRow))) > 0 { + _ = tb.builderFunctionSystemName.Append(r.LineFunctionSystemNameDict.Value(r.LineFunctionSystemName.GetValueIndex(lineRow))) + } else { + tb.builderFunctionSystemName.AppendNull() + } + } + case TableFieldFunctionFileName: + if r.LineFunctionFilenameDict.Len() == 0 || lineRow == -1 { + tb.builderFunctionFileName.AppendNull() + } else { + if lineRow >= 0 && r.LineFunction.IsValid(lineRow) && len(r.LineFunctionFilenameDict.Value(r.LineFunctionFilename.GetValueIndex(lineRow))) > 0 { + _ = tb.builderFunctionFileName.Append(r.LineFunctionFilenameDict.Value(r.LineFunctionFilename.GetValueIndex(lineRow))) + } else { + tb.builderFunctionFileName.AppendNull() + } + } + // Values + case TableFieldCumulative: + tb.builderCumulative.Append(r.Value.Value(sampleRow)) + case TableFieldCumulativeDiff: + if r.Diff.Value(sampleRow) > 0 { + tb.builderCumulativeDiff.Append(r.Diff.Value(sampleRow)) + } else { + tb.builderCumulativeDiff.AppendNull() + } + case TableFieldFlat: + if leaf { + tb.builderFlat.Append(r.Value.Value(sampleRow)) + } else { + // don't set null as it might also just be merged into a bigger number. + tb.builderFlat.Append(0) + } + case TableFieldFlatDiff: + if leaf { + tb.builderFlatDiff.Append(r.Diff.Value(sampleRow)) + } else { + // don't set null as it might also just be merged into a bigger number. + tb.builderFlatDiff.Append(0) + } + default: + panic(fmt.Sprintf("unknown field %s", tb.schema.Field(j).Name)) + } + } + return nil +} + +func (tb *tableBuilder) mergeRow(r *profile.RecordReader, mergeRow, sampleRow int, isLeaf bool) { + tb.builderCumulative.Add(mergeRow, r.Value.Value(sampleRow)) + if r.Diff.Value(sampleRow) != 0 { + tb.builderCumulativeDiff.Add(mergeRow, r.Diff.Value(sampleRow)) + } + + if isLeaf { + tb.builderFlat.Add(mergeRow, r.Value.Value(sampleRow)) + if r.Diff.Value(sampleRow) != 0 { + tb.builderFlatDiff.Add(mergeRow, r.Diff.Value(sampleRow)) + } + } +} diff --git a/pkg/query/table_test.go b/pkg/query/table_test.go new file mode 100644 index 00000000000..8d3cc7a156c --- /dev/null +++ b/pkg/query/table_test.go @@ -0,0 +1,246 @@ +// Copyright 2023 The Parca Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package query + +import ( + "context" + "testing" + + "github.com/apache/arrow/go/v13/arrow/array" + "github.com/apache/arrow/go/v13/arrow/memory" + "github.com/go-kit/log" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/trace" + + pprofpb "github.com/parca-dev/parca/gen/proto/go/google/pprof" + metastorepb "github.com/parca-dev/parca/gen/proto/go/parca/metastore/v1alpha1" + "github.com/parca-dev/parca/pkg/metastore" + "github.com/parca-dev/parca/pkg/metastoretest" + "github.com/parca-dev/parca/pkg/parcacol" + "github.com/parca-dev/parca/pkg/profile" +) + +func TestGenerateTable(t *testing.T) { + ctx := context.Background() + mem := memory.NewGoAllocator() + + reg := prometheus.NewRegistry() + counter := promauto.With(reg).NewCounter(prometheus.CounterOpts{ + Name: "parca_test_counter", + Help: "parca_test_counter", + }) + + fileContent := MustReadAllGzip(t, "testdata/alloc_objects.pb.gz") + p := &pprofpb.Profile{} + require.NoError(t, p.UnmarshalVT(fileContent)) + + l := metastoretest.NewTestMetastore( + t, + log.NewNopLogger(), + prometheus.NewRegistry(), + trace.NewNoopTracerProvider().Tracer(""), + ) + metastore := metastore.NewInProcessClient(l) + normalizer := parcacol.NewNormalizer(metastore, true, counter) + profiles, err := normalizer.NormalizePprof(ctx, "memory", map[string]string{}, p, false, nil) + require.NoError(t, err) + + tracer := trace.NewNoopTracerProvider().Tracer("") + symbolizedProfile, err := parcacol.NewProfileSymbolizer(tracer, metastore).SymbolizeNormalizedProfile(ctx, profiles[0]) + require.NoError(t, err) + + np, err := OldProfileToArrowProfile(symbolizedProfile) + require.NoError(t, err) + + rec, cumulative, err := generateTableArrowRecord(ctx, mem, tracer, np) + require.NoError(t, err) + + require.NotNil(t, rec) + require.NotNil(t, cumulative) + + require.Equal(t, int64(310797348), cumulative) + // require.Equal(t, 899, rec.NumRows()) + + mappingStartColumn := rec.Column(rec.Schema().FieldIndices(TableFieldMappingStart)[0]).(*array.Uint64) + mappingLimitColumn := rec.Column(rec.Schema().FieldIndices(TableFieldMappingLimit)[0]).(*array.Uint64) + mappingOffsetColumn := rec.Column(rec.Schema().FieldIndices(TableFieldMappingOffset)[0]).(*array.Uint64) + mappingFileColumn := rec.Column(rec.Schema().FieldIndices(TableFieldMappingFile)[0]).(*array.Dictionary) + mappingFileColumnDict := mappingFileColumn.Dictionary().(*array.String) + mappingBuildIDColumn := rec.Column(rec.Schema().FieldIndices(TableFieldMappingBuildID)[0]).(*array.Dictionary) + locationAddressColumn := rec.Column(rec.Schema().FieldIndices(TableFieldLocationAddress)[0]).(*array.Uint64) + locationFolded := rec.Column(rec.Schema().FieldIndices(TableFieldLocationFolded)[0]).(*array.Boolean) + locationLineColumn := rec.Column(rec.Schema().FieldIndices(TableFieldLocationLine)[0]).(*array.Int64) + functionStartLineColumn := rec.Column(rec.Schema().FieldIndices(TableFieldFunctionStartLine)[0]).(*array.Int64) + functionNameColumn := rec.Column(rec.Schema().FieldIndices(TableFieldFunctionName)[0]).(*array.Dictionary) + functionNameColumnDict := functionNameColumn.Dictionary().(*array.String) + functionSystemNameColumn := rec.Column(rec.Schema().FieldIndices(TableFieldFunctionSystemName)[0]).(*array.Dictionary) + functionSystemNameColumnDict := functionSystemNameColumn.Dictionary().(*array.String) + functionFileNameColumn := rec.Column(rec.Schema().FieldIndices(TableFieldFunctionFileName)[0]).(*array.Dictionary) + functionFileNameColumnDict := functionFileNameColumn.Dictionary().(*array.String) + cumulativeColumn := rec.Column(rec.Schema().FieldIndices(TableFieldCumulative)[0]).(*array.Int64) + cumulativeDiffColumn := rec.Column(rec.Schema().FieldIndices(TableFieldCumulativeDiff)[0]).(*array.Int64) + flatColumn := rec.Column(rec.Schema().FieldIndices(TableFieldFlat)[0]).(*array.Int64) + flatDiffColumn := rec.Column(rec.Schema().FieldIndices(TableFieldFlatDiff)[0]).(*array.Int64) + + found := false + for i := 0; i < int(rec.NumRows()); i++ { + if locationAddressColumn.Value(i) == uint64(7578561) { + // mapping + require.Equal(t, uint64(4194304), mappingStartColumn.Value(i)) + require.Equal(t, uint64(23252992), mappingLimitColumn.Value(i)) + require.Equal(t, uint64(0), mappingOffsetColumn.Value(i)) + require.Equal(t, "/bin/operator", mappingFileColumnDict.Value(mappingFileColumn.GetValueIndex(i))) + require.True(t, mappingBuildIDColumn.IsNull(i)) + // location + // address is already checked above + require.False(t, locationFolded.Value(i)) + require.Equal(t, int64(107), locationLineColumn.Value(i)) + // function + require.Equal(t, int64(0), functionStartLineColumn.Value(i)) + require.Equal(t, + "encoding/json.Unmarshal", + functionNameColumnDict.Value(functionNameColumn.GetValueIndex(i)), + ) + require.Equal(t, + "encoding/json.Unmarshal", + functionSystemNameColumnDict.Value(functionSystemNameColumn.GetValueIndex(i)), + ) + require.Equal(t, + "/opt/hostedtoolcache/go/1.14.10/x64/src/encoding/json/decode.go", + functionFileNameColumnDict.Value(functionFileNameColumn.GetValueIndex(i)), + ) + // values + require.Equal(t, int64(3135531), cumulativeColumn.Value(i)) + require.Equal(t, int64(1251322), flatColumn.Value(i)) + // diff + require.Equal(t, int64(0), cumulativeDiffColumn.Value(i)) + require.Equal(t, int64(0), flatDiffColumn.Value(i)) + + found = true + } + } + + require.Truef(t, found, "expected to find the specific function") +} + +func TestGenerateTableAggregateFlat(t *testing.T) { + ctx := context.Background() + logger := log.NewNopLogger() + reg := prometheus.NewRegistry() + tracer := trace.NewNoopTracerProvider().Tracer("") + mem := memory.NewGoAllocator() + + metastore := metastore.NewInProcessClient(metastoretest.NewTestMetastore( + t, + logger, + reg, + tracer, + )) + + mres, err := metastore.GetOrCreateMappings(ctx, &metastorepb.GetOrCreateMappingsRequest{ + Mappings: []*metastorepb.Mapping{{ + Id: "1", + Start: 1, + Limit: 1, + Offset: 1, + File: "1", + BuildId: "1", + }}, + }) + require.NoError(t, err) + + lres, err := metastore.GetOrCreateLocations(ctx, &metastorepb.GetOrCreateLocationsRequest{ + Locations: []*metastorepb.Location{{ + Address: 0x1, + MappingId: mres.Mappings[0].Id, + }, { + Address: 0x2, + MappingId: mres.Mappings[0].Id, + }, { + Address: 0x3, + MappingId: mres.Mappings[0].Id, + }, { + Address: 0x4, + MappingId: mres.Mappings[0].Id, + }}, + }) + require.NoError(t, err) + require.Equal(t, 4, len(lres.Locations)) + l0 := lres.Locations[0] + l1 := lres.Locations[1] + l2 := lres.Locations[2] + l3 := lres.Locations[3] + + sres, err := metastore.GetOrCreateStacktraces(ctx, &metastorepb.GetOrCreateStacktracesRequest{ + Stacktraces: []*metastorepb.Stacktrace{{ + LocationIds: []string{l1.Id, l0.Id}, + }, { + LocationIds: []string{l2.Id, l0.Id}, + }, { + LocationIds: []string{l3.Id, l0.Id}, + }, { + LocationIds: []string{l0.Id}, + }}, + }) + require.NoError(t, err) + require.Equal(t, 4, len(sres.Stacktraces)) + + p, err := parcacol.NewProfileSymbolizer(tracer, metastore).SymbolizeNormalizedProfile(ctx, &profile.NormalizedProfile{ + Samples: []*profile.NormalizedSample{{ + StacktraceID: sres.Stacktraces[0].Id, + Value: 1, + }, { + StacktraceID: sres.Stacktraces[1].Id, + Value: 2, + }, { + StacktraceID: sres.Stacktraces[2].Id, + Value: 3, + }, { + StacktraceID: sres.Stacktraces[3].Id, + Value: 4, + }}, + }) + require.NoError(t, err) + + np, err := OldProfileToArrowProfile(p) + require.NoError(t, err) + + rec, cumulative, err := generateTableArrowRecord(ctx, mem, tracer, np) + require.NoError(t, err) + + require.Equal(t, int64(4), rec.NumRows()) + require.Equal(t, int64(10), cumulative) + + requireColumn(t, rec, TableFieldMappingStart, []uint64{1, 1, 1, 1}) + requireColumn(t, rec, TableFieldMappingLimit, []uint64{1, 1, 1, 1}) + requireColumn(t, rec, TableFieldMappingOffset, []uint64{1, 1, 1, 1}) + requireColumnBinaryDict(t, rec, TableFieldMappingFile, []string{"1", "1", "1", "1"}) + requireColumnBinaryDict(t, rec, TableFieldMappingBuildID, []string{"1", "1", "1", "1"}) + + requireColumn(t, rec, TableFieldLocationAddress, []uint64{2, 1, 3, 4}) + requireColumn(t, rec, TableFieldLocationFolded, []bool{false, false, false, false}) + requireColumn(t, rec, TableFieldLocationLine, []int64{0, 0, 0, 0}) + + requireColumn(t, rec, TableFieldFunctionStartLine, []int64{0, 0, 0, 0}) + requireColumnBinaryDict(t, rec, TableFieldFunctionName, []string{"(null)", "(null)", "(null)", "(null)"}) + requireColumnBinaryDict(t, rec, TableFieldFunctionSystemName, []string{"(null)", "(null)", "(null)", "(null)"}) + requireColumnBinaryDict(t, rec, TableFieldFunctionFileName, []string{"(null)", "(null)", "(null)", "(null)"}) + + requireColumn(t, rec, TableFieldCumulative, []int64{1, 10, 2, 3}) + requireColumn(t, rec, TableFieldCumulativeDiff, []int64{0, 0, 0, 0}) + requireColumn(t, rec, TableFieldFlat, []int64{1, 4, 2, 3}) + requireColumn(t, rec, TableFieldFlatDiff, []int64{0, 0, 0, 0}) +} diff --git a/proto/parca/query/v1alpha1/query.proto b/proto/parca/query/v1alpha1/query.proto index 6b0f8bc7699..165617c2ee3 100644 --- a/proto/parca/query/v1alpha1/query.proto +++ b/proto/parca/query/v1alpha1/query.proto @@ -233,6 +233,9 @@ message QueryRequest { // REPORT_TYPE_SOURCE contains source code annotated with profiling information REPORT_TYPE_SOURCE = 6; + + // REPORT_TYPE_TABLE_ARROW unspecified + REPORT_TYPE_TABLE_ARROW = 7; } // report_type is the type of report to return @@ -502,6 +505,9 @@ message QueryResponse { // source is the source report type result Source source = 12; + + // table_arrow is a table encoded as a arrow record + TableArrow table_arrow = 13; } // total is the total number of samples shown in the report. @@ -594,3 +600,12 @@ message ShareProfileResponse { // link to access the profile string link = 1; } + +// TableArrow has the table encoded as a arrow record +message TableArrow { + // record is the arrow record containing the actual table data + bytes record = 1; + + // unit is the unit represented by the flame graph + string unit = 2; +} diff --git a/ui/packages/shared/client/src/parca/query/v1alpha1/query.ts b/ui/packages/shared/client/src/parca/query/v1alpha1/query.ts index 78b91ada5a2..67ab8a376b1 100644 --- a/ui/packages/shared/client/src/parca/query/v1alpha1/query.ts +++ b/ui/packages/shared/client/src/parca/query/v1alpha1/query.ts @@ -457,7 +457,13 @@ export enum QueryRequest_ReportType { * * @generated from protobuf enum value: REPORT_TYPE_SOURCE = 6; */ - SOURCE = 6 + SOURCE = 6, + /** + * REPORT_TYPE_TABLE_ARROW unspecified + * + * @generated from protobuf enum value: REPORT_TYPE_TABLE_ARROW = 7; + */ + TABLE_ARROW = 7 } /** * SourceReference contains a reference to source code. @@ -996,6 +1002,14 @@ export interface QueryResponse { * @generated from protobuf field: parca.query.v1alpha1.Source source = 12; */ source: Source; + } | { + oneofKind: "tableArrow"; + /** + * table_arrow is a table encoded as a arrow record + * + * @generated from protobuf field: parca.query.v1alpha1.TableArrow table_arrow = 13; + */ + tableArrow: TableArrow; } | { oneofKind: undefined; }; @@ -1189,6 +1203,25 @@ export interface ShareProfileResponse { */ link: string; } +/** + * TableArrow has the table encoded as a arrow record + * + * @generated from protobuf message parca.query.v1alpha1.TableArrow + */ +export interface TableArrow { + /** + * record is the arrow record containing the actual table data + * + * @generated from protobuf field: bytes record = 1; + */ + record: Uint8Array; + /** + * unit is the unit represented by the flame graph + * + * @generated from protobuf field: string unit = 2; + */ + unit: string; +} // @generated message type with reflection information, may provide speed optimized methods class ProfileTypesRequest$Type extends MessageType { constructor() { @@ -2987,6 +3020,7 @@ class QueryResponse$Type extends MessageType { { no: 8, name: "callgraph", kind: "message", oneof: "report", T: () => Callgraph }, { no: 11, name: "flamegraph_arrow", kind: "message", oneof: "report", T: () => FlamegraphArrow }, { no: 12, name: "source", kind: "message", oneof: "report", T: () => Source }, + { no: 13, name: "table_arrow", kind: "message", oneof: "report", T: () => TableArrow }, { no: 9, name: "total", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, { no: 10, name: "filtered", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } ]); @@ -3039,6 +3073,12 @@ class QueryResponse$Type extends MessageType { source: Source.internalBinaryRead(reader, reader.uint32(), options, (message.report as any).source) }; break; + case /* parca.query.v1alpha1.TableArrow table_arrow */ 13: + message.report = { + oneofKind: "tableArrow", + tableArrow: TableArrow.internalBinaryRead(reader, reader.uint32(), options, (message.report as any).tableArrow) + }; + break; case /* int64 total */ 9: message.total = reader.int64().toBigInt(); break; @@ -3075,6 +3115,9 @@ class QueryResponse$Type extends MessageType { /* parca.query.v1alpha1.Source source = 12; */ if (message.report.oneofKind === "source") Source.internalBinaryWrite(message.report.source, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); + /* parca.query.v1alpha1.TableArrow table_arrow = 13; */ + if (message.report.oneofKind === "tableArrow") + TableArrow.internalBinaryWrite(message.report.tableArrow, writer.tag(13, WireType.LengthDelimited).fork(), options).join(); /* int64 total = 9; */ if (message.total !== 0n) writer.tag(9, WireType.Varint).int64(message.total); @@ -3570,6 +3613,60 @@ class ShareProfileResponse$Type extends MessageType { * @generated MessageType for protobuf message parca.query.v1alpha1.ShareProfileResponse */ export const ShareProfileResponse = new ShareProfileResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class TableArrow$Type extends MessageType { + constructor() { + super("parca.query.v1alpha1.TableArrow", [ + { no: 1, name: "record", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "unit", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): TableArrow { + const message = { record: new Uint8Array(0), unit: "" }; + globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TableArrow): TableArrow { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* bytes record */ 1: + message.record = reader.bytes(); + break; + case /* string unit */ 2: + message.unit = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: TableArrow, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bytes record = 1; */ + if (message.record.length) + writer.tag(1, WireType.LengthDelimited).bytes(message.record); + /* string unit = 2; */ + if (message.unit !== "") + writer.tag(2, WireType.LengthDelimited).string(message.unit); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message parca.query.v1alpha1.TableArrow + */ +export const TableArrow = new TableArrow$Type(); /** * @generated ServiceType for protobuf service parca.query.v1alpha1.QueryService */ diff --git a/ui/packages/shared/components/src/Table/index.tsx b/ui/packages/shared/components/src/Table/index.tsx index 1d37a9eb42a..8b68bede6fc 100644 --- a/ui/packages/shared/components/src/Table/index.tsx +++ b/ui/packages/shared/components/src/Table/index.tsx @@ -21,6 +21,7 @@ import { useReactTable, type ColumnDef, type SortingState, + type VisibilityState, } from '@tanstack/react-table'; import cx from 'classnames'; import {useVirtual} from 'react-virtual'; @@ -36,6 +37,7 @@ interface Props { data: TData[]; columns: Array>; initialSorting?: SortingState; + columnVisibility?: VisibilityState; onRowClick?: (row: TData) => void; enableHighlighting?: boolean; shouldHighlightRow?: (row: TData) => boolean; @@ -46,6 +48,7 @@ const Table = ({ data, columns, initialSorting = [], + columnVisibility = {}, onRowClick, enableHighlighting = false, usePointerCursor = true, @@ -60,6 +63,7 @@ const Table = ({ getSortedRowModel: getSortedRowModel(), state: { sorting, + columnVisibility, }, onSortingChange: setSorting, enableColumnResizing: true, diff --git a/ui/packages/shared/profile/src/ProfileView/index.tsx b/ui/packages/shared/profile/src/ProfileView/index.tsx index 3303f18c859..b3a5b7c34fc 100644 --- a/ui/packages/shared/profile/src/ProfileView/index.tsx +++ b/ui/packages/shared/profile/src/ProfileView/index.tsx @@ -13,7 +13,7 @@ import {Profiler, ProfilerProps, useEffect, useMemo, useState} from 'react'; -import {Table} from 'apache-arrow'; +import {Table as ArrowTable} from 'apache-arrow'; import cx from 'classnames'; import {scaleLinear} from 'd3'; import graphviz from 'graphviz-wasm'; @@ -30,6 +30,7 @@ import { Flamegraph, QueryServiceClient, Source, + TableArrow, Top, } from '@parca/client'; import { @@ -49,7 +50,7 @@ import {jsonToDot} from '../Callgraph/utils'; import ProfileIcicleGraph from '../ProfileIcicleGraph'; import {ProfileSource} from '../ProfileSource'; import {SourceView} from '../SourceView'; -import {TopTable} from '../TopTable'; +import Table from '../Table'; import ProfileShareButton from '../components/ProfileShareButton'; import useDelayedLoader from '../useDelayedLoader'; import FilterByFunctionButton from './FilterByFunctionButton'; @@ -62,7 +63,7 @@ type NavigateFunction = (path: string, queryParams: any, options?: {replace?: bo export interface FlamegraphData { loading: boolean; data?: Flamegraph; - table?: Table; + table?: ArrowTable; total?: bigint; filtered?: bigint; error?: any; @@ -70,7 +71,8 @@ export interface FlamegraphData { export interface TopTableData { loading: boolean; - data?: Top; + arrow?: TableArrow; + data?: Top; // TODO: Remove this once we only have arrow support total?: bigint; filtered?: bigint; error?: any; @@ -294,9 +296,9 @@ export const ProfileView = ({ } case 'table': { return topTableData != null ? ( - (); + +interface row { + name: string; + flat: bigint; + flatDiff: bigint; + cumulative: bigint; + cumulativeDiff: bigint; +} + +interface TableProps { + data?: Uint8Array; + sampleUnit: string; + navigateTo?: NavigateFunction; + loading: boolean; + currentSearchString?: string; + setActionButtons?: (buttons: React.JSX.Element) => void; +} + +export const Table = React.memo(function Table({ + data, + sampleUnit: unit, + navigateTo, + loading, + currentSearchString, + setActionButtons, +}: TableProps): React.JSX.Element { + const router = parseParams(window?.location.search); + const [rawDashboardItems] = useURLState({param: 'dashboard_items'}); + const [rawcompareMode] = useURLState({param: 'compare_a'}); + + const compareMode: boolean = rawcompareMode === undefined ? false : rawcompareMode === 'true'; + + const dashboardItems = useMemo(() => { + if (rawDashboardItems !== undefined) { + return rawDashboardItems as string[]; + } + return ['icicle']; + }, [rawDashboardItems]); + + const columns = useMemo(() => { + const cols: Array> = [ + columnHelper.accessor('flat', { + header: () => 'Flat', + cell: info => valueFormatter(info.getValue(), unit, 2), + size: 80, + meta: { + align: 'right', + }, + invertSorting: true, + }), + columnHelper.accessor('flatDiff', { + header: () => 'Flat Diff', + cell: info => addPlusSign(valueFormatter(info.getValue(), unit, 2)), + size: 120, + meta: { + align: 'right', + }, + invertSorting: true, + }), + columnHelper.accessor('cumulative', { + header: () => 'Cumulative', + cell: info => valueFormatter(info.getValue(), unit, 2), + size: 130, + meta: { + align: 'right', + }, + invertSorting: true, + }), + columnHelper.accessor('cumulativeDiff', { + header: () => 'Cumulative Diff', + cell: info => addPlusSign(valueFormatter(info.getValue(), unit, 2)), + size: 170, + meta: { + align: 'right', + }, + invertSorting: true, + }), + columnHelper.accessor('name', { + header: () => Name, + cell: info => info.getValue(), + }), + ]; + return cols; + }, [unit]); + + const selectSpan = useCallback( + (span: string): void => { + if (navigateTo != null) { + navigateTo( + '/', + { + ...router, + ...{search_string: span.trim()}, + }, + {replace: true} + ); + } + }, + [navigateTo, router] + ); + + const onRowClick = useCallback( + (row: row) => { + // If there is only one dashboard item, we don't want to select a span + if (dashboardItems.length <= 1) { + return; + } + selectSpan(row.name); + }, + [selectSpan, dashboardItems.length] + ); + + const shouldHighlightRow = useCallback( + (row: row) => { + const name = row.name; + return isSearchMatch(currentSearchString as string, name); + }, + [currentSearchString] + ); + + const enableHighlighting = useMemo(() => { + return currentSearchString != null && currentSearchString?.length > 0; + }, [currentSearchString]); + + const clearSelection = useCallback((): void => { + if (navigateTo != null) { + navigateTo( + '/', + { + ...router, + ...{search_string: ''}, + }, + {replace: true} + ); + } + }, [navigateTo, router]); + + useEffect(() => { + if (setActionButtons === undefined) { + return; + } + setActionButtons( + dashboardItems.length > 1 ? ( + + ) : ( + <> + ) + ); + }, [dashboardItems, clearSelection, currentSearchString, setActionButtons]); + + const initialSorting = useMemo(() => { + return [ + { + id: compareMode ? 'flatDiff' : 'flat', + desc: false, // columns sorting are inverted - so this is actually descending + }, + ]; + }, [compareMode]); + + const columnVisibility = useMemo(() => { + // TODO: Make this configurable via the UI and add more columns. + return { + flat: true, + flatDiff: compareMode, + cumulative: true, + cumulativeDiff: compareMode, + name: true, + }; + }, [compareMode]); + + if (loading) return <>Loading...; + if (data === undefined) return <>Profile has no samples; + + const table = tableFromIPC(data); + const flatColumn = table.getChild('flat'); + const flatDiffColumn = table.getChild('flat_diff'); + const cumulativeColumn = table.getChild('cumulative'); + const cumulativeDiffColumn = table.getChild('cumulative_diff'); + + if (table.numRows === 0) return <>Profile has no samples; + + const rows: row[] = []; + // TODO: Figure out how to only read the data of the columns we need for the virtualized table + for (let i = 0; i < table.numRows; i++) { + const flat: bigint = flatColumn?.get(i) ?? 0n; + const flatDiff: bigint = flatDiffColumn?.get(i) ?? 0n; + const cumulative: bigint = cumulativeColumn?.get(i) ?? 0n; + const cumulativeDiff: bigint = cumulativeDiffColumn?.get(i) ?? 0n; + rows.push({ + name: RowName(table, i), + flat, + flatDiff, + cumulative, + cumulativeDiff, + }); + } + + return ( +
+
+ 1} + /> +
+
+ ); +}); + +const addPlusSign = (num: string): string => { + if (num.charAt(0) === '0' || num.charAt(0) === '-') { + return num; + } + + return `+${num}`; +}; + +export const RowName = (table: ArrowTable, row: number): string => { + const mappingFileColumn = table.getChild('mapping_file'); + if (mappingFileColumn === null) { + console.error('mapping_file column not found'); + return ''; + } + + const mappingFile: string | null = mappingFileColumn?.get(row); + let mapping = ''; + // Show the last item in the mapping file only if there are more than 1 mappings + if (mappingFile != null && mappingFileColumn.data.length > 1) { + mapping = `[${getLastItem(mappingFile) ?? ''}]`; + } + const functionName: string | null = table.getChild('function_name')?.get(row) ?? ''; + if (functionName !== null) { + return `${mapping} ${functionName}`; + } + + const address: bigint = table.getChild('location_address')?.get(row) ?? 0; + + return hexifyAddress(address); +}; + +export default Table;