From f4a36e11b14a6d98437b61d34e33d6f35fa52471 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Thu, 18 Apr 2024 08:49:32 -0300 Subject: [PATCH 01/27] Add API signature --- api/gen/proto/go/querier/v1/querier.pb.go | 936 +++- .../proto/go/querier/v1/querier_vtproto.pb.go | 3817 ++++++++++++----- .../v1/querierv1connect/querier.connect.go | 30 + .../querierv1connect/querier.connect.mux.go | 5 + api/openapiv2/gen/phlare.swagger.json | 305 ++ api/querier/v1/querier.proto | 60 + pkg/frontend/frontend_analyze_query.go | 16 + pkg/querier/querier.go | 6 + 8 files changed, 4004 insertions(+), 1171 deletions(-) create mode 100644 pkg/frontend/frontend_analyze_query.go diff --git a/api/gen/proto/go/querier/v1/querier.pb.go b/api/gen/proto/go/querier/v1/querier.pb.go index df58bc561c..f0063a3d58 100644 --- a/api/gen/proto/go/querier/v1/querier.pb.go +++ b/api/gen/proto/go/querier/v1/querier.pb.go @@ -22,6 +22,122 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type QueryType int32 + +const ( + QueryType_PROFILE_TYPES QueryType = 0 + QueryType_LABEL_NAMES QueryType = 1 + QueryType_LABEL_VALUES QueryType = 2 + QueryType_SERIES QueryType = 3 + QueryType_FLAME_GRAPH QueryType = 4 + QueryType_SPAN_PROFILE_FLAME_GRAPH QueryType = 5 + QueryType_PPROF QueryType = 6 + QueryType_TIME_SERIES QueryType = 7 + QueryType_DIFF QueryType = 8 +) + +// Enum value maps for QueryType. +var ( + QueryType_name = map[int32]string{ + 0: "PROFILE_TYPES", + 1: "LABEL_NAMES", + 2: "LABEL_VALUES", + 3: "SERIES", + 4: "FLAME_GRAPH", + 5: "SPAN_PROFILE_FLAME_GRAPH", + 6: "PPROF", + 7: "TIME_SERIES", + 8: "DIFF", + } + QueryType_value = map[string]int32{ + "PROFILE_TYPES": 0, + "LABEL_NAMES": 1, + "LABEL_VALUES": 2, + "SERIES": 3, + "FLAME_GRAPH": 4, + "SPAN_PROFILE_FLAME_GRAPH": 5, + "PPROF": 6, + "TIME_SERIES": 7, + "DIFF": 8, + } +) + +func (x QueryType) Enum() *QueryType { + p := new(QueryType) + *p = x + return p +} + +func (x QueryType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (QueryType) Descriptor() protoreflect.EnumDescriptor { + return file_querier_v1_querier_proto_enumTypes[0].Descriptor() +} + +func (QueryType) Type() protoreflect.EnumType { + return &file_querier_v1_querier_proto_enumTypes[0] +} + +func (x QueryType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use QueryType.Descriptor instead. +func (QueryType) EnumDescriptor() ([]byte, []int) { + return file_querier_v1_querier_proto_rawDescGZIP(), []int{0} +} + +type QueryImpactType int32 + +const ( + QueryImpactType_LOW QueryImpactType = 0 + QueryImpactType_MEDIUM QueryImpactType = 1 + QueryImpactType_HIGH QueryImpactType = 2 +) + +// Enum value maps for QueryImpactType. +var ( + QueryImpactType_name = map[int32]string{ + 0: "LOW", + 1: "MEDIUM", + 2: "HIGH", + } + QueryImpactType_value = map[string]int32{ + "LOW": 0, + "MEDIUM": 1, + "HIGH": 2, + } +) + +func (x QueryImpactType) Enum() *QueryImpactType { + p := new(QueryImpactType) + *p = x + return p +} + +func (x QueryImpactType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (QueryImpactType) Descriptor() protoreflect.EnumDescriptor { + return file_querier_v1_querier_proto_enumTypes[1].Descriptor() +} + +func (QueryImpactType) Type() protoreflect.EnumType { + return &file_querier_v1_querier_proto_enumTypes[1] +} + +func (x QueryImpactType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use QueryImpactType.Descriptor instead. +func (QueryImpactType) EnumDescriptor() ([]byte, []int) { + return file_querier_v1_querier_proto_rawDescGZIP(), []int{1} +} + type ProfileTypesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1068,6 +1184,370 @@ func (x *SelectSeriesResponse) GetSeries() []*v1.Series { return nil } +type AnalyzeQueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type QueryType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryType" json:"type,omitempty"` + ProfileTypesRequest *ProfileTypesRequest `protobuf:"bytes,2,opt,name=profile_types_request,json=profileTypesRequest,proto3" json:"profile_types_request,omitempty"` + LabelNamesRequest *v1.LabelNamesRequest `protobuf:"bytes,3,opt,name=label_names_request,json=labelNamesRequest,proto3" json:"label_names_request,omitempty"` + LabelValuesRequest *v1.LabelValuesRequest `protobuf:"bytes,4,opt,name=label_values_request,json=labelValuesRequest,proto3" json:"label_values_request,omitempty"` + SeriesRequest *SeriesRequest `protobuf:"bytes,5,opt,name=series_request,json=seriesRequest,proto3" json:"series_request,omitempty"` + FlamegraphRequest *SelectMergeStacktracesRequest `protobuf:"bytes,6,opt,name=flamegraph_request,json=flamegraphRequest,proto3" json:"flamegraph_request,omitempty"` + SpanProfileFlamegraphRequest *SelectMergeSpanProfileRequest `protobuf:"bytes,7,opt,name=span_profile_flamegraph_request,json=spanProfileFlamegraphRequest,proto3" json:"span_profile_flamegraph_request,omitempty"` + PprofRequest *SelectMergeProfileRequest `protobuf:"bytes,8,opt,name=pprof_request,json=pprofRequest,proto3" json:"pprof_request,omitempty"` + TimeseriesRequest *SelectSeriesRequest `protobuf:"bytes,9,opt,name=timeseries_request,json=timeseriesRequest,proto3" json:"timeseries_request,omitempty"` + DiffRequest *DiffRequest `protobuf:"bytes,10,opt,name=diff_request,json=diffRequest,proto3" json:"diff_request,omitempty"` +} + +func (x *AnalyzeQueryRequest) Reset() { + *x = AnalyzeQueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_querier_v1_querier_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnalyzeQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnalyzeQueryRequest) ProtoMessage() {} + +func (x *AnalyzeQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_querier_v1_querier_proto_msgTypes[16] + 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 AnalyzeQueryRequest.ProtoReflect.Descriptor instead. +func (*AnalyzeQueryRequest) Descriptor() ([]byte, []int) { + return file_querier_v1_querier_proto_rawDescGZIP(), []int{16} +} + +func (x *AnalyzeQueryRequest) GetType() QueryType { + if x != nil { + return x.Type + } + return QueryType_PROFILE_TYPES +} + +func (x *AnalyzeQueryRequest) GetProfileTypesRequest() *ProfileTypesRequest { + if x != nil { + return x.ProfileTypesRequest + } + return nil +} + +func (x *AnalyzeQueryRequest) GetLabelNamesRequest() *v1.LabelNamesRequest { + if x != nil { + return x.LabelNamesRequest + } + return nil +} + +func (x *AnalyzeQueryRequest) GetLabelValuesRequest() *v1.LabelValuesRequest { + if x != nil { + return x.LabelValuesRequest + } + return nil +} + +func (x *AnalyzeQueryRequest) GetSeriesRequest() *SeriesRequest { + if x != nil { + return x.SeriesRequest + } + return nil +} + +func (x *AnalyzeQueryRequest) GetFlamegraphRequest() *SelectMergeStacktracesRequest { + if x != nil { + return x.FlamegraphRequest + } + return nil +} + +func (x *AnalyzeQueryRequest) GetSpanProfileFlamegraphRequest() *SelectMergeSpanProfileRequest { + if x != nil { + return x.SpanProfileFlamegraphRequest + } + return nil +} + +func (x *AnalyzeQueryRequest) GetPprofRequest() *SelectMergeProfileRequest { + if x != nil { + return x.PprofRequest + } + return nil +} + +func (x *AnalyzeQueryRequest) GetTimeseriesRequest() *SelectSeriesRequest { + if x != nil { + return x.TimeseriesRequest + } + return nil +} + +func (x *AnalyzeQueryRequest) GetDiffRequest() *DiffRequest { + if x != nil { + return x.DiffRequest + } + return nil +} + +type AnalyzeQueryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueryValidationErrors []string `protobuf:"bytes,1,rep,name=queryValidationErrors,proto3" json:"queryValidationErrors,omitempty"` + QueryScopes []*QueryScope `protobuf:"bytes,2,rep,name=query_scopes,json=queryScopes,proto3" json:"query_scopes,omitempty"` // detailed view of what the query will require + QueryImpact *QueryImpact `protobuf:"bytes,3,opt,name=query_impact,json=queryImpact,proto3" json:"query_impact,omitempty"` // summary of the query impact / performance +} + +func (x *AnalyzeQueryResponse) Reset() { + *x = AnalyzeQueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_querier_v1_querier_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnalyzeQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnalyzeQueryResponse) ProtoMessage() {} + +func (x *AnalyzeQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_querier_v1_querier_proto_msgTypes[17] + 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 AnalyzeQueryResponse.ProtoReflect.Descriptor instead. +func (*AnalyzeQueryResponse) Descriptor() ([]byte, []int) { + return file_querier_v1_querier_proto_rawDescGZIP(), []int{17} +} + +func (x *AnalyzeQueryResponse) GetQueryValidationErrors() []string { + if x != nil { + return x.QueryValidationErrors + } + return nil +} + +func (x *AnalyzeQueryResponse) GetQueryScopes() []*QueryScope { + if x != nil { + return x.QueryScopes + } + return nil +} + +func (x *AnalyzeQueryResponse) GetQueryImpact() *QueryImpact { + if x != nil { + return x.QueryImpact + } + return nil +} + +type QueryScope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ComponentType string `protobuf:"bytes,1,opt,name=component_type,json=componentType,proto3" json:"component_type,omitempty"` // high level, e.g., "short term" or "long term" storage + ComponentCount int64 `protobuf:"varint,2,opt,name=component_count,json=componentCount,proto3" json:"component_count,omitempty"` // how many components of this type will work on the query + NumBlocks int64 `protobuf:"varint,3,opt,name=num_blocks,json=numBlocks,proto3" json:"num_blocks,omitempty"` + NumSeries int64 `protobuf:"varint,4,opt,name=num_series,json=numSeries,proto3" json:"num_series,omitempty"` + NumProfiles int64 `protobuf:"varint,5,opt,name=num_profiles,json=numProfiles,proto3" json:"num_profiles,omitempty"` + NumSamples int64 `protobuf:"varint,6,opt,name=num_samples,json=numSamples,proto3" json:"num_samples,omitempty"` + IndexBytes int64 `protobuf:"varint,7,opt,name=index_bytes,json=indexBytes,proto3" json:"index_bytes,omitempty"` + ProfileBytes int64 `protobuf:"varint,8,opt,name=profile_bytes,json=profileBytes,proto3" json:"profile_bytes,omitempty"` + SymbolBytes int64 `protobuf:"varint,9,opt,name=symbol_bytes,json=symbolBytes,proto3" json:"symbol_bytes,omitempty"` +} + +func (x *QueryScope) Reset() { + *x = QueryScope{} + if protoimpl.UnsafeEnabled { + mi := &file_querier_v1_querier_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryScope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryScope) ProtoMessage() {} + +func (x *QueryScope) ProtoReflect() protoreflect.Message { + mi := &file_querier_v1_querier_proto_msgTypes[18] + 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 QueryScope.ProtoReflect.Descriptor instead. +func (*QueryScope) Descriptor() ([]byte, []int) { + return file_querier_v1_querier_proto_rawDescGZIP(), []int{18} +} + +func (x *QueryScope) GetComponentType() string { + if x != nil { + return x.ComponentType + } + return "" +} + +func (x *QueryScope) GetComponentCount() int64 { + if x != nil { + return x.ComponentCount + } + return 0 +} + +func (x *QueryScope) GetNumBlocks() int64 { + if x != nil { + return x.NumBlocks + } + return 0 +} + +func (x *QueryScope) GetNumSeries() int64 { + if x != nil { + return x.NumSeries + } + return 0 +} + +func (x *QueryScope) GetNumProfiles() int64 { + if x != nil { + return x.NumProfiles + } + return 0 +} + +func (x *QueryScope) GetNumSamples() int64 { + if x != nil { + return x.NumSamples + } + return 0 +} + +func (x *QueryScope) GetIndexBytes() int64 { + if x != nil { + return x.IndexBytes + } + return 0 +} + +func (x *QueryScope) GetProfileBytes() int64 { + if x != nil { + return x.ProfileBytes + } + return 0 +} + +func (x *QueryScope) GetSymbolBytes() int64 { + if x != nil { + return x.SymbolBytes + } + return 0 +} + +type QueryImpact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type QueryImpactType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryImpactType" json:"type,omitempty"` + SubQueryCount int64 `protobuf:"varint,2,opt,name=sub_query_count,json=subQueryCount,proto3" json:"sub_query_count,omitempty"` + TotalBytesRead int64 `protobuf:"varint,3,opt,name=total_bytes_read,json=totalBytesRead,proto3" json:"total_bytes_read,omitempty"` + EstimatedTimeNanos int64 `protobuf:"varint,4,opt,name=estimated_time_nanos,json=estimatedTimeNanos,proto3" json:"estimated_time_nanos,omitempty"` // not sure how we can do this yet, but it would be a formula based on the query scopes above +} + +func (x *QueryImpact) Reset() { + *x = QueryImpact{} + if protoimpl.UnsafeEnabled { + mi := &file_querier_v1_querier_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryImpact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryImpact) ProtoMessage() {} + +func (x *QueryImpact) ProtoReflect() protoreflect.Message { + mi := &file_querier_v1_querier_proto_msgTypes[19] + 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 QueryImpact.ProtoReflect.Descriptor instead. +func (*QueryImpact) Descriptor() ([]byte, []int) { + return file_querier_v1_querier_proto_rawDescGZIP(), []int{19} +} + +func (x *QueryImpact) GetType() QueryImpactType { + if x != nil { + return x.Type + } + return QueryImpactType_LOW +} + +func (x *QueryImpact) GetSubQueryCount() int64 { + if x != nil { + return x.SubQueryCount + } + return 0 +} + +func (x *QueryImpact) GetTotalBytesRead() int64 { + if x != nil { + return x.TotalBytesRead + } + return 0 +} + +func (x *QueryImpact) GetEstimatedTimeNanos() int64 { + if x != nil { + return x.EstimatedTimeNanos + } + return 0 +} + var File_querier_v1_querier_proto protoreflect.FileDescriptor var file_querier_v1_querier_proto_rawDesc = []byte{ @@ -1219,73 +1699,186 @@ var file_querier_v1_querier_proto_rawDesc = []byte{ 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x06, 0x73, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x32, 0xe6, 0x06, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, - 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, - 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, - 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x51, 0x0a, 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, - 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, - 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xab, - 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, - 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x51, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x98, 0x06, 0x0a, 0x13, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, + 0x13, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x14, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x12, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x73, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x73, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x12, + 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, + 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x11, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x1f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x1c, 0x73, 0x70, 0x61, 0x6e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x0d, 0x70, 0x70, 0x72, 0x6f, + 0x66, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x0b, 0x64, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0xc3, 0x01, 0x0a, 0x14, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x71, 0x75, 0x65, 0x72, 0x79, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, + 0x39, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0b, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x75, 0x6d, + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x22, 0xc2, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, + 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x12, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x2a, 0xa2, 0x01, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, + 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, + 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, + 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, + 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, + 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, + 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, + 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, + 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x46, 0x46, 0x10, 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, + 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, + 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, + 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, + 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, + 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, + 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, + 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, + 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, + 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, + 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, + 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, + 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, + 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, + 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1300,76 +1893,98 @@ func file_querier_v1_querier_proto_rawDescGZIP() []byte { return file_querier_v1_querier_proto_rawDescData } -var file_querier_v1_querier_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_querier_v1_querier_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_querier_v1_querier_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_querier_v1_querier_proto_goTypes = []interface{}{ - (*ProfileTypesRequest)(nil), // 0: querier.v1.ProfileTypesRequest - (*ProfileTypesResponse)(nil), // 1: querier.v1.ProfileTypesResponse - (*SeriesRequest)(nil), // 2: querier.v1.SeriesRequest - (*SeriesResponse)(nil), // 3: querier.v1.SeriesResponse - (*SelectMergeStacktracesRequest)(nil), // 4: querier.v1.SelectMergeStacktracesRequest - (*SelectMergeStacktracesResponse)(nil), // 5: querier.v1.SelectMergeStacktracesResponse - (*SelectMergeSpanProfileRequest)(nil), // 6: querier.v1.SelectMergeSpanProfileRequest - (*SelectMergeSpanProfileResponse)(nil), // 7: querier.v1.SelectMergeSpanProfileResponse - (*DiffRequest)(nil), // 8: querier.v1.DiffRequest - (*DiffResponse)(nil), // 9: querier.v1.DiffResponse - (*FlameGraph)(nil), // 10: querier.v1.FlameGraph - (*FlameGraphDiff)(nil), // 11: querier.v1.FlameGraphDiff - (*Level)(nil), // 12: querier.v1.Level - (*SelectMergeProfileRequest)(nil), // 13: querier.v1.SelectMergeProfileRequest - (*SelectSeriesRequest)(nil), // 14: querier.v1.SelectSeriesRequest - (*SelectSeriesResponse)(nil), // 15: querier.v1.SelectSeriesResponse - (*v1.ProfileType)(nil), // 16: types.v1.ProfileType - (*v1.Labels)(nil), // 17: types.v1.Labels - (*v1.StackTraceSelector)(nil), // 18: types.v1.StackTraceSelector - (v1.TimeSeriesAggregationType)(0), // 19: types.v1.TimeSeriesAggregationType - (*v1.Series)(nil), // 20: types.v1.Series - (*v1.LabelValuesRequest)(nil), // 21: types.v1.LabelValuesRequest - (*v1.LabelNamesRequest)(nil), // 22: types.v1.LabelNamesRequest - (*v1.GetProfileStatsRequest)(nil), // 23: types.v1.GetProfileStatsRequest - (*v1.LabelValuesResponse)(nil), // 24: types.v1.LabelValuesResponse - (*v1.LabelNamesResponse)(nil), // 25: types.v1.LabelNamesResponse - (*v11.Profile)(nil), // 26: google.v1.Profile - (*v1.GetProfileStatsResponse)(nil), // 27: types.v1.GetProfileStatsResponse + (QueryType)(0), // 0: querier.v1.QueryType + (QueryImpactType)(0), // 1: querier.v1.QueryImpactType + (*ProfileTypesRequest)(nil), // 2: querier.v1.ProfileTypesRequest + (*ProfileTypesResponse)(nil), // 3: querier.v1.ProfileTypesResponse + (*SeriesRequest)(nil), // 4: querier.v1.SeriesRequest + (*SeriesResponse)(nil), // 5: querier.v1.SeriesResponse + (*SelectMergeStacktracesRequest)(nil), // 6: querier.v1.SelectMergeStacktracesRequest + (*SelectMergeStacktracesResponse)(nil), // 7: querier.v1.SelectMergeStacktracesResponse + (*SelectMergeSpanProfileRequest)(nil), // 8: querier.v1.SelectMergeSpanProfileRequest + (*SelectMergeSpanProfileResponse)(nil), // 9: querier.v1.SelectMergeSpanProfileResponse + (*DiffRequest)(nil), // 10: querier.v1.DiffRequest + (*DiffResponse)(nil), // 11: querier.v1.DiffResponse + (*FlameGraph)(nil), // 12: querier.v1.FlameGraph + (*FlameGraphDiff)(nil), // 13: querier.v1.FlameGraphDiff + (*Level)(nil), // 14: querier.v1.Level + (*SelectMergeProfileRequest)(nil), // 15: querier.v1.SelectMergeProfileRequest + (*SelectSeriesRequest)(nil), // 16: querier.v1.SelectSeriesRequest + (*SelectSeriesResponse)(nil), // 17: querier.v1.SelectSeriesResponse + (*AnalyzeQueryRequest)(nil), // 18: querier.v1.AnalyzeQueryRequest + (*AnalyzeQueryResponse)(nil), // 19: querier.v1.AnalyzeQueryResponse + (*QueryScope)(nil), // 20: querier.v1.QueryScope + (*QueryImpact)(nil), // 21: querier.v1.QueryImpact + (*v1.ProfileType)(nil), // 22: types.v1.ProfileType + (*v1.Labels)(nil), // 23: types.v1.Labels + (*v1.StackTraceSelector)(nil), // 24: types.v1.StackTraceSelector + (v1.TimeSeriesAggregationType)(0), // 25: types.v1.TimeSeriesAggregationType + (*v1.Series)(nil), // 26: types.v1.Series + (*v1.LabelNamesRequest)(nil), // 27: types.v1.LabelNamesRequest + (*v1.LabelValuesRequest)(nil), // 28: types.v1.LabelValuesRequest + (*v1.GetProfileStatsRequest)(nil), // 29: types.v1.GetProfileStatsRequest + (*v1.LabelValuesResponse)(nil), // 30: types.v1.LabelValuesResponse + (*v1.LabelNamesResponse)(nil), // 31: types.v1.LabelNamesResponse + (*v11.Profile)(nil), // 32: google.v1.Profile + (*v1.GetProfileStatsResponse)(nil), // 33: types.v1.GetProfileStatsResponse } var file_querier_v1_querier_proto_depIdxs = []int32{ - 16, // 0: querier.v1.ProfileTypesResponse.profile_types:type_name -> types.v1.ProfileType - 17, // 1: querier.v1.SeriesResponse.labels_set:type_name -> types.v1.Labels - 10, // 2: querier.v1.SelectMergeStacktracesResponse.flamegraph:type_name -> querier.v1.FlameGraph - 10, // 3: querier.v1.SelectMergeSpanProfileResponse.flamegraph:type_name -> querier.v1.FlameGraph - 4, // 4: querier.v1.DiffRequest.left:type_name -> querier.v1.SelectMergeStacktracesRequest - 4, // 5: querier.v1.DiffRequest.right:type_name -> querier.v1.SelectMergeStacktracesRequest - 11, // 6: querier.v1.DiffResponse.flamegraph:type_name -> querier.v1.FlameGraphDiff - 12, // 7: querier.v1.FlameGraph.levels:type_name -> querier.v1.Level - 12, // 8: querier.v1.FlameGraphDiff.levels:type_name -> querier.v1.Level - 18, // 9: querier.v1.SelectMergeProfileRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector - 19, // 10: querier.v1.SelectSeriesRequest.aggregation:type_name -> types.v1.TimeSeriesAggregationType - 18, // 11: querier.v1.SelectSeriesRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector - 20, // 12: querier.v1.SelectSeriesResponse.series:type_name -> types.v1.Series - 0, // 13: querier.v1.QuerierService.ProfileTypes:input_type -> querier.v1.ProfileTypesRequest - 21, // 14: querier.v1.QuerierService.LabelValues:input_type -> types.v1.LabelValuesRequest - 22, // 15: querier.v1.QuerierService.LabelNames:input_type -> types.v1.LabelNamesRequest - 2, // 16: querier.v1.QuerierService.Series:input_type -> querier.v1.SeriesRequest - 4, // 17: querier.v1.QuerierService.SelectMergeStacktraces:input_type -> querier.v1.SelectMergeStacktracesRequest - 6, // 18: querier.v1.QuerierService.SelectMergeSpanProfile:input_type -> querier.v1.SelectMergeSpanProfileRequest - 13, // 19: querier.v1.QuerierService.SelectMergeProfile:input_type -> querier.v1.SelectMergeProfileRequest - 14, // 20: querier.v1.QuerierService.SelectSeries:input_type -> querier.v1.SelectSeriesRequest - 8, // 21: querier.v1.QuerierService.Diff:input_type -> querier.v1.DiffRequest - 23, // 22: querier.v1.QuerierService.GetProfileStats:input_type -> types.v1.GetProfileStatsRequest - 1, // 23: querier.v1.QuerierService.ProfileTypes:output_type -> querier.v1.ProfileTypesResponse - 24, // 24: querier.v1.QuerierService.LabelValues:output_type -> types.v1.LabelValuesResponse - 25, // 25: querier.v1.QuerierService.LabelNames:output_type -> types.v1.LabelNamesResponse - 3, // 26: querier.v1.QuerierService.Series:output_type -> querier.v1.SeriesResponse - 5, // 27: querier.v1.QuerierService.SelectMergeStacktraces:output_type -> querier.v1.SelectMergeStacktracesResponse - 7, // 28: querier.v1.QuerierService.SelectMergeSpanProfile:output_type -> querier.v1.SelectMergeSpanProfileResponse - 26, // 29: querier.v1.QuerierService.SelectMergeProfile:output_type -> google.v1.Profile - 15, // 30: querier.v1.QuerierService.SelectSeries:output_type -> querier.v1.SelectSeriesResponse - 9, // 31: querier.v1.QuerierService.Diff:output_type -> querier.v1.DiffResponse - 27, // 32: querier.v1.QuerierService.GetProfileStats:output_type -> types.v1.GetProfileStatsResponse - 23, // [23:33] is the sub-list for method output_type - 13, // [13:23] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 22, // 0: querier.v1.ProfileTypesResponse.profile_types:type_name -> types.v1.ProfileType + 23, // 1: querier.v1.SeriesResponse.labels_set:type_name -> types.v1.Labels + 12, // 2: querier.v1.SelectMergeStacktracesResponse.flamegraph:type_name -> querier.v1.FlameGraph + 12, // 3: querier.v1.SelectMergeSpanProfileResponse.flamegraph:type_name -> querier.v1.FlameGraph + 6, // 4: querier.v1.DiffRequest.left:type_name -> querier.v1.SelectMergeStacktracesRequest + 6, // 5: querier.v1.DiffRequest.right:type_name -> querier.v1.SelectMergeStacktracesRequest + 13, // 6: querier.v1.DiffResponse.flamegraph:type_name -> querier.v1.FlameGraphDiff + 14, // 7: querier.v1.FlameGraph.levels:type_name -> querier.v1.Level + 14, // 8: querier.v1.FlameGraphDiff.levels:type_name -> querier.v1.Level + 24, // 9: querier.v1.SelectMergeProfileRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector + 25, // 10: querier.v1.SelectSeriesRequest.aggregation:type_name -> types.v1.TimeSeriesAggregationType + 24, // 11: querier.v1.SelectSeriesRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector + 26, // 12: querier.v1.SelectSeriesResponse.series:type_name -> types.v1.Series + 0, // 13: querier.v1.AnalyzeQueryRequest.type:type_name -> querier.v1.QueryType + 2, // 14: querier.v1.AnalyzeQueryRequest.profile_types_request:type_name -> querier.v1.ProfileTypesRequest + 27, // 15: querier.v1.AnalyzeQueryRequest.label_names_request:type_name -> types.v1.LabelNamesRequest + 28, // 16: querier.v1.AnalyzeQueryRequest.label_values_request:type_name -> types.v1.LabelValuesRequest + 4, // 17: querier.v1.AnalyzeQueryRequest.series_request:type_name -> querier.v1.SeriesRequest + 6, // 18: querier.v1.AnalyzeQueryRequest.flamegraph_request:type_name -> querier.v1.SelectMergeStacktracesRequest + 8, // 19: querier.v1.AnalyzeQueryRequest.span_profile_flamegraph_request:type_name -> querier.v1.SelectMergeSpanProfileRequest + 15, // 20: querier.v1.AnalyzeQueryRequest.pprof_request:type_name -> querier.v1.SelectMergeProfileRequest + 16, // 21: querier.v1.AnalyzeQueryRequest.timeseries_request:type_name -> querier.v1.SelectSeriesRequest + 10, // 22: querier.v1.AnalyzeQueryRequest.diff_request:type_name -> querier.v1.DiffRequest + 20, // 23: querier.v1.AnalyzeQueryResponse.query_scopes:type_name -> querier.v1.QueryScope + 21, // 24: querier.v1.AnalyzeQueryResponse.query_impact:type_name -> querier.v1.QueryImpact + 1, // 25: querier.v1.QueryImpact.type:type_name -> querier.v1.QueryImpactType + 2, // 26: querier.v1.QuerierService.ProfileTypes:input_type -> querier.v1.ProfileTypesRequest + 28, // 27: querier.v1.QuerierService.LabelValues:input_type -> types.v1.LabelValuesRequest + 27, // 28: querier.v1.QuerierService.LabelNames:input_type -> types.v1.LabelNamesRequest + 4, // 29: querier.v1.QuerierService.Series:input_type -> querier.v1.SeriesRequest + 6, // 30: querier.v1.QuerierService.SelectMergeStacktraces:input_type -> querier.v1.SelectMergeStacktracesRequest + 8, // 31: querier.v1.QuerierService.SelectMergeSpanProfile:input_type -> querier.v1.SelectMergeSpanProfileRequest + 15, // 32: querier.v1.QuerierService.SelectMergeProfile:input_type -> querier.v1.SelectMergeProfileRequest + 16, // 33: querier.v1.QuerierService.SelectSeries:input_type -> querier.v1.SelectSeriesRequest + 10, // 34: querier.v1.QuerierService.Diff:input_type -> querier.v1.DiffRequest + 29, // 35: querier.v1.QuerierService.GetProfileStats:input_type -> types.v1.GetProfileStatsRequest + 18, // 36: querier.v1.QuerierService.AnalyzeQuery:input_type -> querier.v1.AnalyzeQueryRequest + 3, // 37: querier.v1.QuerierService.ProfileTypes:output_type -> querier.v1.ProfileTypesResponse + 30, // 38: querier.v1.QuerierService.LabelValues:output_type -> types.v1.LabelValuesResponse + 31, // 39: querier.v1.QuerierService.LabelNames:output_type -> types.v1.LabelNamesResponse + 5, // 40: querier.v1.QuerierService.Series:output_type -> querier.v1.SeriesResponse + 7, // 41: querier.v1.QuerierService.SelectMergeStacktraces:output_type -> querier.v1.SelectMergeStacktracesResponse + 9, // 42: querier.v1.QuerierService.SelectMergeSpanProfile:output_type -> querier.v1.SelectMergeSpanProfileResponse + 32, // 43: querier.v1.QuerierService.SelectMergeProfile:output_type -> google.v1.Profile + 17, // 44: querier.v1.QuerierService.SelectSeries:output_type -> querier.v1.SelectSeriesResponse + 11, // 45: querier.v1.QuerierService.Diff:output_type -> querier.v1.DiffResponse + 33, // 46: querier.v1.QuerierService.GetProfileStats:output_type -> types.v1.GetProfileStatsResponse + 19, // 47: querier.v1.QuerierService.AnalyzeQuery:output_type -> querier.v1.AnalyzeQueryResponse + 37, // [37:48] is the sub-list for method output_type + 26, // [26:37] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_querier_v1_querier_proto_init() } @@ -1570,6 +2185,54 @@ func file_querier_v1_querier_proto_init() { return nil } } + file_querier_v1_querier_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnalyzeQueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_querier_v1_querier_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnalyzeQueryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_querier_v1_querier_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryScope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_querier_v1_querier_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryImpact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_querier_v1_querier_proto_msgTypes[4].OneofWrappers = []interface{}{} file_querier_v1_querier_proto_msgTypes[6].OneofWrappers = []interface{}{} @@ -1580,13 +2243,14 @@ func file_querier_v1_querier_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_querier_v1_querier_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, + NumEnums: 2, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, GoTypes: file_querier_v1_querier_proto_goTypes, DependencyIndexes: file_querier_v1_querier_proto_depIdxs, + EnumInfos: file_querier_v1_querier_proto_enumTypes, MessageInfos: file_querier_v1_querier_proto_msgTypes, }.Build() File_querier_v1_querier_proto = out.File diff --git a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go index ce2014cc6b..ed218a35c9 100644 --- a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go +++ b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go @@ -439,6 +439,122 @@ func (m *SelectSeriesResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *AnalyzeQueryRequest) CloneVT() *AnalyzeQueryRequest { + if m == nil { + return (*AnalyzeQueryRequest)(nil) + } + r := &AnalyzeQueryRequest{ + Type: m.Type, + ProfileTypesRequest: m.ProfileTypesRequest.CloneVT(), + SeriesRequest: m.SeriesRequest.CloneVT(), + FlamegraphRequest: m.FlamegraphRequest.CloneVT(), + SpanProfileFlamegraphRequest: m.SpanProfileFlamegraphRequest.CloneVT(), + PprofRequest: m.PprofRequest.CloneVT(), + TimeseriesRequest: m.TimeseriesRequest.CloneVT(), + DiffRequest: m.DiffRequest.CloneVT(), + } + if rhs := m.LabelNamesRequest; rhs != nil { + if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.LabelNamesRequest }); ok { + r.LabelNamesRequest = vtpb.CloneVT() + } else { + r.LabelNamesRequest = proto.Clone(rhs).(*v1.LabelNamesRequest) + } + } + if rhs := m.LabelValuesRequest; rhs != nil { + if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.LabelValuesRequest }); ok { + r.LabelValuesRequest = vtpb.CloneVT() + } else { + r.LabelValuesRequest = proto.Clone(rhs).(*v1.LabelValuesRequest) + } + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *AnalyzeQueryRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *AnalyzeQueryResponse) CloneVT() *AnalyzeQueryResponse { + if m == nil { + return (*AnalyzeQueryResponse)(nil) + } + r := &AnalyzeQueryResponse{ + QueryImpact: m.QueryImpact.CloneVT(), + } + if rhs := m.QueryValidationErrors; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.QueryValidationErrors = tmpContainer + } + if rhs := m.QueryScopes; rhs != nil { + tmpContainer := make([]*QueryScope, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.QueryScopes = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *AnalyzeQueryResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *QueryScope) CloneVT() *QueryScope { + if m == nil { + return (*QueryScope)(nil) + } + r := &QueryScope{ + ComponentType: m.ComponentType, + ComponentCount: m.ComponentCount, + NumBlocks: m.NumBlocks, + NumSeries: m.NumSeries, + NumProfiles: m.NumProfiles, + NumSamples: m.NumSamples, + IndexBytes: m.IndexBytes, + ProfileBytes: m.ProfileBytes, + SymbolBytes: m.SymbolBytes, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *QueryScope) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *QueryImpact) CloneVT() *QueryImpact { + if m == nil { + return (*QueryImpact)(nil) + } + r := &QueryImpact{ + Type: m.Type, + SubQueryCount: m.SubQueryCount, + TotalBytesRead: m.TotalBytesRead, + EstimatedTimeNanos: m.EstimatedTimeNanos, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *QueryImpact) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (this *ProfileTypesRequest) EqualVT(that *ProfileTypesRequest) bool { if this == that { return true @@ -981,6 +1097,180 @@ func (this *SelectSeriesResponse) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } +func (this *AnalyzeQueryRequest) EqualVT(that *AnalyzeQueryRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Type != that.Type { + return false + } + if !this.ProfileTypesRequest.EqualVT(that.ProfileTypesRequest) { + return false + } + if equal, ok := interface{}(this.LabelNamesRequest).(interface { + EqualVT(*v1.LabelNamesRequest) bool + }); ok { + if !equal.EqualVT(that.LabelNamesRequest) { + return false + } + } else if !proto.Equal(this.LabelNamesRequest, that.LabelNamesRequest) { + return false + } + if equal, ok := interface{}(this.LabelValuesRequest).(interface { + EqualVT(*v1.LabelValuesRequest) bool + }); ok { + if !equal.EqualVT(that.LabelValuesRequest) { + return false + } + } else if !proto.Equal(this.LabelValuesRequest, that.LabelValuesRequest) { + return false + } + if !this.SeriesRequest.EqualVT(that.SeriesRequest) { + return false + } + if !this.FlamegraphRequest.EqualVT(that.FlamegraphRequest) { + return false + } + if !this.SpanProfileFlamegraphRequest.EqualVT(that.SpanProfileFlamegraphRequest) { + return false + } + if !this.PprofRequest.EqualVT(that.PprofRequest) { + return false + } + if !this.TimeseriesRequest.EqualVT(that.TimeseriesRequest) { + return false + } + if !this.DiffRequest.EqualVT(that.DiffRequest) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *AnalyzeQueryRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*AnalyzeQueryRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *AnalyzeQueryResponse) EqualVT(that *AnalyzeQueryResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.QueryValidationErrors) != len(that.QueryValidationErrors) { + return false + } + for i, vx := range this.QueryValidationErrors { + vy := that.QueryValidationErrors[i] + if vx != vy { + return false + } + } + if len(this.QueryScopes) != len(that.QueryScopes) { + return false + } + for i, vx := range this.QueryScopes { + vy := that.QueryScopes[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &QueryScope{} + } + if q == nil { + q = &QueryScope{} + } + if !p.EqualVT(q) { + return false + } + } + } + if !this.QueryImpact.EqualVT(that.QueryImpact) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *AnalyzeQueryResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*AnalyzeQueryResponse) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *QueryScope) EqualVT(that *QueryScope) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.ComponentType != that.ComponentType { + return false + } + if this.ComponentCount != that.ComponentCount { + return false + } + if this.NumBlocks != that.NumBlocks { + return false + } + if this.NumSeries != that.NumSeries { + return false + } + if this.NumProfiles != that.NumProfiles { + return false + } + if this.NumSamples != that.NumSamples { + return false + } + if this.IndexBytes != that.IndexBytes { + return false + } + if this.ProfileBytes != that.ProfileBytes { + return false + } + if this.SymbolBytes != that.SymbolBytes { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *QueryScope) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*QueryScope) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *QueryImpact) EqualVT(that *QueryImpact) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Type != that.Type { + return false + } + if this.SubQueryCount != that.SubQueryCount { + return false + } + if this.TotalBytesRead != that.TotalBytesRead { + return false + } + if this.EstimatedTimeNanos != that.EstimatedTimeNanos { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *QueryImpact) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*QueryImpact) + if !ok { + return false + } + return this.EqualVT(that) +} // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -1011,6 +1301,7 @@ type QuerierServiceClient interface { Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) // GetProfileStats returns profile stats for the current tenant. GetProfileStats(ctx context.Context, in *v1.GetProfileStatsRequest, opts ...grpc.CallOption) (*v1.GetProfileStatsResponse, error) + AnalyzeQuery(ctx context.Context, in *AnalyzeQueryRequest, opts ...grpc.CallOption) (*AnalyzeQueryResponse, error) } type querierServiceClient struct { @@ -1111,6 +1402,15 @@ func (c *querierServiceClient) GetProfileStats(ctx context.Context, in *v1.GetPr return out, nil } +func (c *querierServiceClient) AnalyzeQuery(ctx context.Context, in *AnalyzeQueryRequest, opts ...grpc.CallOption) (*AnalyzeQueryResponse, error) { + out := new(AnalyzeQueryResponse) + err := c.cc.Invoke(ctx, "/querier.v1.QuerierService/AnalyzeQuery", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QuerierServiceServer is the server API for QuerierService service. // All implementations must embed UnimplementedQuerierServiceServer // for forward compatibility @@ -1135,6 +1435,7 @@ type QuerierServiceServer interface { Diff(context.Context, *DiffRequest) (*DiffResponse, error) // GetProfileStats returns profile stats for the current tenant. GetProfileStats(context.Context, *v1.GetProfileStatsRequest) (*v1.GetProfileStatsResponse, error) + AnalyzeQuery(context.Context, *AnalyzeQueryRequest) (*AnalyzeQueryResponse, error) mustEmbedUnimplementedQuerierServiceServer() } @@ -1172,6 +1473,9 @@ func (UnimplementedQuerierServiceServer) Diff(context.Context, *DiffRequest) (*D func (UnimplementedQuerierServiceServer) GetProfileStats(context.Context, *v1.GetProfileStatsRequest) (*v1.GetProfileStatsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProfileStats not implemented") } +func (UnimplementedQuerierServiceServer) AnalyzeQuery(context.Context, *AnalyzeQueryRequest) (*AnalyzeQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AnalyzeQuery not implemented") +} func (UnimplementedQuerierServiceServer) mustEmbedUnimplementedQuerierServiceServer() {} // UnsafeQuerierServiceServer may be embedded to opt out of forward compatibility for this service. @@ -1365,6 +1669,24 @@ func _QuerierService_GetProfileStats_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _QuerierService_AnalyzeQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AnalyzeQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuerierServiceServer).AnalyzeQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/querier.v1.QuerierService/AnalyzeQuery", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServiceServer).AnalyzeQuery(ctx, req.(*AnalyzeQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + // QuerierService_ServiceDesc is the grpc.ServiceDesc for QuerierService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1412,6 +1734,10 @@ var QuerierService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetProfileStats", Handler: _QuerierService_GetProfileStats_Handler, }, + { + MethodName: "AnalyzeQuery", + Handler: _QuerierService_AnalyzeQuery_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "querier/v1/querier.proto", @@ -2382,416 +2708,1892 @@ func (m *SelectSeriesResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ProfileTypesRequest) SizeVT() (n int) { +func (m *AnalyzeQueryRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Start != 0 { - n += 1 + sov(uint64(m.Start)) + return nil, nil } - if m.End != 0 { - n += 1 + sov(uint64(m.End)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *ProfileTypesResponse) SizeVT() (n int) { +func (m *AnalyzeQueryRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AnalyzeQueryRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if len(m.ProfileTypes) > 0 { - for _, e := range m.ProfileTypes { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) - } - n += 1 + l + sov(uint64(l)) - } + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - n += len(m.unknownFields) - return n -} - -func (m *SeriesRequest) SizeVT() (n int) { - if m == nil { - return 0 + if m.DiffRequest != nil { + size, err := m.DiffRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 } - var l int - _ = l - if len(m.Matchers) > 0 { - for _, s := range m.Matchers { - l = len(s) - n += 1 + l + sov(uint64(l)) + if m.TimeseriesRequest != nil { + size, err := m.TimeseriesRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x4a } - if len(m.LabelNames) > 0 { - for _, s := range m.LabelNames { - l = len(s) - n += 1 + l + sov(uint64(l)) + if m.PprofRequest != nil { + size, err := m.PprofRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x42 } - if m.Start != 0 { - n += 1 + sov(uint64(m.Start)) + if m.SpanProfileFlamegraphRequest != nil { + size, err := m.SpanProfileFlamegraphRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3a } - if m.End != 0 { - n += 1 + sov(uint64(m.End)) + if m.FlamegraphRequest != nil { + size, err := m.FlamegraphRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } - n += len(m.unknownFields) - return n -} - -func (m *SeriesResponse) SizeVT() (n int) { - if m == nil { - return 0 + if m.SeriesRequest != nil { + size, err := m.SeriesRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } - var l int - _ = l - if len(m.LabelsSet) > 0 { - for _, e := range m.LabelsSet { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) + if m.LabelValuesRequest != nil { + if vtmsg, ok := interface{}(m.LabelValuesRequest).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } - n += 1 + l + sov(uint64(l)) + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.LabelValuesRequest) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) } + i-- + dAtA[i] = 0x22 } - n += len(m.unknownFields) - return n -} - -func (m *SelectMergeStacktracesRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProfileTypeID) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.LabelSelector) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Start != 0 { - n += 1 + sov(uint64(m.Start)) + if m.LabelNamesRequest != nil { + if vtmsg, ok := interface{}(m.LabelNamesRequest).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.LabelNamesRequest) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x1a } - if m.End != 0 { - n += 1 + sov(uint64(m.End)) + if m.ProfileTypesRequest != nil { + size, err := m.ProfileTypesRequest.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - if m.MaxNodes != nil { - n += 1 + sov(uint64(*m.MaxNodes)) + if m.Type != 0 { + i = encodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SelectMergeStacktracesResponse) SizeVT() (n int) { +func (m *AnalyzeQueryResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if m.Flamegraph != nil { - l = m.Flamegraph.SizeVT() - n += 1 + l + sov(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *SelectMergeSpanProfileRequest) SizeVT() (n int) { +func (m *AnalyzeQueryResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *AnalyzeQueryResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.ProfileTypeID) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.LabelSelector) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.SpanSelector) > 0 { - for _, s := range m.SpanSelector { - l = len(s) - n += 1 + l + sov(uint64(l)) + if m.QueryImpact != nil { + size, err := m.QueryImpact.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } - if m.Start != 0 { - n += 1 + sov(uint64(m.Start)) - } - if m.End != 0 { - n += 1 + sov(uint64(m.End)) + if len(m.QueryScopes) > 0 { + for iNdEx := len(m.QueryScopes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.QueryScopes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } } - if m.MaxNodes != nil { - n += 1 + sov(uint64(*m.MaxNodes)) + if len(m.QueryValidationErrors) > 0 { + for iNdEx := len(m.QueryValidationErrors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.QueryValidationErrors[iNdEx]) + copy(dAtA[i:], m.QueryValidationErrors[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.QueryValidationErrors[iNdEx]))) + i-- + dAtA[i] = 0xa + } } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SelectMergeSpanProfileResponse) SizeVT() (n int) { +func (m *QueryScope) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if m.Flamegraph != nil { - l = m.Flamegraph.SizeVT() - n += 1 + l + sov(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *DiffRequest) SizeVT() (n int) { +func (m *QueryScope) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *QueryScope) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Left != nil { - l = m.Left.SizeVT() - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Right != nil { - l = m.Right.SizeVT() - n += 1 + l + sov(uint64(l)) + if m.SymbolBytes != 0 { + i = encodeVarint(dAtA, i, uint64(m.SymbolBytes)) + i-- + dAtA[i] = 0x48 } - n += len(m.unknownFields) - return n -} - -func (m *DiffResponse) SizeVT() (n int) { - if m == nil { - return 0 + if m.ProfileBytes != 0 { + i = encodeVarint(dAtA, i, uint64(m.ProfileBytes)) + i-- + dAtA[i] = 0x40 } - var l int + if m.IndexBytes != 0 { + i = encodeVarint(dAtA, i, uint64(m.IndexBytes)) + i-- + dAtA[i] = 0x38 + } + if m.NumSamples != 0 { + i = encodeVarint(dAtA, i, uint64(m.NumSamples)) + i-- + dAtA[i] = 0x30 + } + if m.NumProfiles != 0 { + i = encodeVarint(dAtA, i, uint64(m.NumProfiles)) + i-- + dAtA[i] = 0x28 + } + if m.NumSeries != 0 { + i = encodeVarint(dAtA, i, uint64(m.NumSeries)) + i-- + dAtA[i] = 0x20 + } + if m.NumBlocks != 0 { + i = encodeVarint(dAtA, i, uint64(m.NumBlocks)) + i-- + dAtA[i] = 0x18 + } + if m.ComponentCount != 0 { + i = encodeVarint(dAtA, i, uint64(m.ComponentCount)) + i-- + dAtA[i] = 0x10 + } + if len(m.ComponentType) > 0 { + i -= len(m.ComponentType) + copy(dAtA[i:], m.ComponentType) + i = encodeVarint(dAtA, i, uint64(len(m.ComponentType))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryImpact) 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 *QueryImpact) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *QueryImpact) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int _ = l - if m.Flamegraph != nil { - l = m.Flamegraph.SizeVT() - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.EstimatedTimeNanos != 0 { + i = encodeVarint(dAtA, i, uint64(m.EstimatedTimeNanos)) + i-- + dAtA[i] = 0x20 + } + if m.TotalBytesRead != 0 { + i = encodeVarint(dAtA, i, uint64(m.TotalBytesRead)) + i-- + dAtA[i] = 0x18 + } + if m.SubQueryCount != 0 { + i = encodeVarint(dAtA, i, uint64(m.SubQueryCount)) + i-- + dAtA[i] = 0x10 + } + if m.Type != 0 { + i = encodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarint(dAtA []byte, offset int, v uint64) int { + offset -= sov(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ProfileTypesRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Start != 0 { + n += 1 + sov(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sov(uint64(m.End)) } n += len(m.unknownFields) return n } -func (m *FlameGraph) SizeVT() (n int) { +func (m *ProfileTypesResponse) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Names) > 0 { - for _, s := range m.Names { + if len(m.ProfileTypes) > 0 { + for _, e := range m.ProfileTypes { + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *SeriesRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Matchers) > 0 { + for _, s := range m.Matchers { l = len(s) n += 1 + l + sov(uint64(l)) } } - if len(m.Levels) > 0 { - for _, e := range m.Levels { - l = e.SizeVT() + if len(m.LabelNames) > 0 { + for _, s := range m.LabelNames { + l = len(s) n += 1 + l + sov(uint64(l)) } } - if m.Total != 0 { - n += 1 + sov(uint64(m.Total)) + if m.Start != 0 { + n += 1 + sov(uint64(m.Start)) } - if m.MaxSelf != 0 { - n += 1 + sov(uint64(m.MaxSelf)) + if m.End != 0 { + n += 1 + sov(uint64(m.End)) } n += len(m.unknownFields) return n } -func (m *FlameGraphDiff) SizeVT() (n int) { +func (m *SeriesResponse) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Names) > 0 { - for _, s := range m.Names { - l = len(s) + if len(m.LabelsSet) > 0 { + for _, e := range m.LabelsSet { + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } n += 1 + l + sov(uint64(l)) } } - if len(m.Levels) > 0 { - for _, e := range m.Levels { - l = e.SizeVT() + n += len(m.unknownFields) + return n +} + +func (m *SelectMergeStacktracesRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProfileTypeID) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.LabelSelector) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Start != 0 { + n += 1 + sov(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sov(uint64(m.End)) + } + if m.MaxNodes != nil { + n += 1 + sov(uint64(*m.MaxNodes)) + } + n += len(m.unknownFields) + return n +} + +func (m *SelectMergeStacktracesResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Flamegraph != nil { + l = m.Flamegraph.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SelectMergeSpanProfileRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProfileTypeID) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.LabelSelector) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.SpanSelector) > 0 { + for _, s := range m.SpanSelector { + l = len(s) n += 1 + l + sov(uint64(l)) } } - if m.Total != 0 { - n += 1 + sov(uint64(m.Total)) + if m.Start != 0 { + n += 1 + sov(uint64(m.Start)) } - if m.MaxSelf != 0 { - n += 1 + sov(uint64(m.MaxSelf)) + if m.End != 0 { + n += 1 + sov(uint64(m.End)) } - if m.LeftTicks != 0 { - n += 1 + sov(uint64(m.LeftTicks)) + if m.MaxNodes != nil { + n += 1 + sov(uint64(*m.MaxNodes)) } - if m.RightTicks != 0 { - n += 1 + sov(uint64(m.RightTicks)) + n += len(m.unknownFields) + return n +} + +func (m *SelectMergeSpanProfileResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Flamegraph != nil { + l = m.Flamegraph.SizeVT() + n += 1 + l + sov(uint64(l)) } n += len(m.unknownFields) return n } -func (m *Level) SizeVT() (n int) { +func (m *DiffRequest) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Values) > 0 { - l = 0 - for _, e := range m.Values { - l += sov(uint64(e)) + if m.Left != nil { + l = m.Left.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.Right != nil { + l = m.Right.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *DiffResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Flamegraph != nil { + l = m.Flamegraph.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *FlameGraph) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Names) > 0 { + for _, s := range m.Names { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Levels) > 0 { + for _, e := range m.Levels { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.Total != 0 { + n += 1 + sov(uint64(m.Total)) + } + if m.MaxSelf != 0 { + n += 1 + sov(uint64(m.MaxSelf)) + } + n += len(m.unknownFields) + return n +} + +func (m *FlameGraphDiff) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Names) > 0 { + for _, s := range m.Names { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Levels) > 0 { + for _, e := range m.Levels { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.Total != 0 { + n += 1 + sov(uint64(m.Total)) + } + if m.MaxSelf != 0 { + n += 1 + sov(uint64(m.MaxSelf)) + } + if m.LeftTicks != 0 { + n += 1 + sov(uint64(m.LeftTicks)) + } + if m.RightTicks != 0 { + n += 1 + sov(uint64(m.RightTicks)) + } + n += len(m.unknownFields) + return n +} + +func (m *Level) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + l = 0 + for _, e := range m.Values { + l += sov(uint64(e)) + } + n += 1 + sov(uint64(l)) + l + } + n += len(m.unknownFields) + return n +} + +func (m *SelectMergeProfileRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProfileTypeID) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.LabelSelector) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Start != 0 { + n += 1 + sov(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sov(uint64(m.End)) + } + if m.MaxNodes != nil { + n += 1 + sov(uint64(*m.MaxNodes)) + } + if m.StackTraceSelector != nil { + if size, ok := interface{}(m.StackTraceSelector).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.StackTraceSelector) + } + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SelectSeriesRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProfileTypeID) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.LabelSelector) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Start != 0 { + n += 1 + sov(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sov(uint64(m.End)) + } + if len(m.GroupBy) > 0 { + for _, s := range m.GroupBy { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if m.Step != 0 { + n += 9 + } + if m.Aggregation != nil { + n += 1 + sov(uint64(*m.Aggregation)) + } + if m.StackTraceSelector != nil { + if size, ok := interface{}(m.StackTraceSelector).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.StackTraceSelector) + } + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SelectSeriesResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Series) > 0 { + for _, e := range m.Series { + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *AnalyzeQueryRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sov(uint64(m.Type)) + } + if m.ProfileTypesRequest != nil { + l = m.ProfileTypesRequest.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.LabelNamesRequest != nil { + if size, ok := interface{}(m.LabelNamesRequest).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.LabelNamesRequest) + } + n += 1 + l + sov(uint64(l)) + } + if m.LabelValuesRequest != nil { + if size, ok := interface{}(m.LabelValuesRequest).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.LabelValuesRequest) + } + n += 1 + l + sov(uint64(l)) + } + if m.SeriesRequest != nil { + l = m.SeriesRequest.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.FlamegraphRequest != nil { + l = m.FlamegraphRequest.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.SpanProfileFlamegraphRequest != nil { + l = m.SpanProfileFlamegraphRequest.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.PprofRequest != nil { + l = m.PprofRequest.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.TimeseriesRequest != nil { + l = m.TimeseriesRequest.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.DiffRequest != nil { + l = m.DiffRequest.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AnalyzeQueryResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.QueryValidationErrors) > 0 { + for _, s := range m.QueryValidationErrors { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if len(m.QueryScopes) > 0 { + for _, e := range m.QueryScopes { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.QueryImpact != nil { + l = m.QueryImpact.SizeVT() + n += 1 + l + sov(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *QueryScope) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ComponentType) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.ComponentCount != 0 { + n += 1 + sov(uint64(m.ComponentCount)) + } + if m.NumBlocks != 0 { + n += 1 + sov(uint64(m.NumBlocks)) + } + if m.NumSeries != 0 { + n += 1 + sov(uint64(m.NumSeries)) + } + if m.NumProfiles != 0 { + n += 1 + sov(uint64(m.NumProfiles)) + } + if m.NumSamples != 0 { + n += 1 + sov(uint64(m.NumSamples)) + } + if m.IndexBytes != 0 { + n += 1 + sov(uint64(m.IndexBytes)) + } + if m.ProfileBytes != 0 { + n += 1 + sov(uint64(m.ProfileBytes)) + } + if m.SymbolBytes != 0 { + n += 1 + sov(uint64(m.SymbolBytes)) + } + n += len(m.unknownFields) + return n +} + +func (m *QueryImpact) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sov(uint64(m.Type)) + } + if m.SubQueryCount != 0 { + n += 1 + sov(uint64(m.SubQueryCount)) + } + if m.TotalBytesRead != 0 { + n += 1 + sov(uint64(m.TotalBytesRead)) + } + if m.EstimatedTimeNanos != 0 { + n += 1 + sov(uint64(m.EstimatedTimeNanos)) + } + n += len(m.unknownFields) + return n +} + +func sov(x uint64) (n int) { + return (bits.Len64(x|1) + 6) / 7 +} +func soz(x uint64) (n int) { + return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ProfileTypesRequest) 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: ProfileTypesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProfileTypesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 (m *ProfileTypesResponse) 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: ProfileTypesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProfileTypesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypes", 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 + } + m.ProfileTypes = append(m.ProfileTypes, &v1.ProfileType{}) + if unmarshal, ok := interface{}(m.ProfileTypes[len(m.ProfileTypes)-1]).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ProfileTypes[len(m.ProfileTypes)-1]); err != nil { + return err + } + } + 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 (m *SeriesRequest) 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: SeriesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SeriesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Matchers", 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.Matchers = append(m.Matchers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelNames", 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.LabelNames = append(m.LabelNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 (m *SeriesResponse) 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: SeriesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SeriesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelsSet", 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 + } + m.LabelsSet = append(m.LabelsSet, &v1.Labels{}) + if unmarshal, ok := interface{}(m.LabelsSet[len(m.LabelsSet)-1]).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.LabelsSet[len(m.LabelsSet)-1]); err != nil { + return err + } + } + 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 (m *SelectMergeStacktracesRequest) 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: SelectMergeStacktracesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelectMergeStacktracesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypeID", 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.ProfileTypeID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", 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.LabelSelector = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxNodes", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MaxNodes = &v + 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 (m *SelectMergeStacktracesResponse) 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: SelectMergeStacktracesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelectMergeStacktracesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flamegraph", 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 m.Flamegraph == nil { + m.Flamegraph = &FlameGraph{} + } + if err := m.Flamegraph.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 (m *SelectMergeSpanProfileRequest) 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: SelectMergeSpanProfileRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SelectMergeSpanProfileRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypeID", 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.ProfileTypeID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", 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.LabelSelector = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanSelector", 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.SpanSelector = append(m.SpanSelector, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxNodes", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MaxNodes = &v + 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 } - n += 1 + sov(uint64(l)) + l } - n += len(m.unknownFields) - return n -} -func (m *SelectMergeProfileRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProfileTypeID) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.LabelSelector) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Start != 0 { - n += 1 + sov(uint64(m.Start)) - } - if m.End != 0 { - n += 1 + sov(uint64(m.End)) - } - if m.MaxNodes != nil { - n += 1 + sov(uint64(*m.MaxNodes)) - } - if m.StackTraceSelector != nil { - if size, ok := interface{}(m.StackTraceSelector).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.StackTraceSelector) - } - n += 1 + l + sov(uint64(l)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - n += len(m.unknownFields) - return n + return nil } - -func (m *SelectSeriesRequest) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProfileTypeID) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.LabelSelector) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Start != 0 { - n += 1 + sov(uint64(m.Start)) - } - if m.End != 0 { - n += 1 + sov(uint64(m.End)) - } - if len(m.GroupBy) > 0 { - for _, s := range m.GroupBy { - l = len(s) - n += 1 + l + sov(uint64(l)) +func (m *SelectMergeSpanProfileResponse) 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 + } } - } - if m.Step != 0 { - n += 9 - } - if m.Aggregation != nil { - n += 1 + sov(uint64(*m.Aggregation)) - } - if m.StackTraceSelector != nil { - if size, ok := interface{}(m.StackTraceSelector).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.StackTraceSelector) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SelectMergeSpanProfileResponse: wiretype end group for non-group") } - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *SelectSeriesResponse) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Series) > 0 { - for _, e := range m.Series { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) + if fieldNum <= 0 { + return fmt.Errorf("proto: SelectMergeSpanProfileResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flamegraph", wireType) } - n += 1 + l + sov(uint64(l)) + 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 m.Flamegraph == nil { + m.Flamegraph = &FlameGraph{} + } + if err := m.Flamegraph.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 } } - n += len(m.unknownFields) - return n -} -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *ProfileTypesRequest) UnmarshalVT(dAtA []byte) error { +func (m *DiffRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2814,17 +4616,17 @@ func (m *ProfileTypesRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ProfileTypesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DiffRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ProfileTypesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiffRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) } - m.Start = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -2834,16 +4636,33 @@ func (m *ProfileTypesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= int64(b&0x7F) << shift + 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 m.Left == nil { + m.Left = &SelectMergeStacktracesRequest{} + } + if err := m.Left.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) } - m.End = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -2853,11 +4672,28 @@ func (m *ProfileTypesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= int64(b&0x7F) << shift + 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 m.Right == nil { + m.Right = &SelectMergeStacktracesRequest{} + } + if err := m.Right.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -2880,7 +4716,7 @@ func (m *ProfileTypesRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ProfileTypesResponse) UnmarshalVT(dAtA []byte) error { +func (m *DiffResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2903,15 +4739,15 @@ func (m *ProfileTypesResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ProfileTypesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DiffResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ProfileTypesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiffResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Flamegraph", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2938,17 +4774,11 @@ func (m *ProfileTypesResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ProfileTypes = append(m.ProfileTypes, &v1.ProfileType{}) - if unmarshal, ok := interface{}(m.ProfileTypes[len(m.ProfileTypes)-1]).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.ProfileTypes[len(m.ProfileTypes)-1]); err != nil { - return err - } + if m.Flamegraph == nil { + m.Flamegraph = &FlameGraphDiff{} + } + if err := m.Flamegraph.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -2973,7 +4803,7 @@ func (m *ProfileTypesResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SeriesRequest) UnmarshalVT(dAtA []byte) error { +func (m *FlameGraph) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2996,15 +4826,15 @@ func (m *SeriesRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SeriesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: FlameGraph: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SeriesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FlameGraph: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Matchers", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3032,13 +4862,13 @@ func (m *SeriesRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Matchers = append(m.Matchers, string(dAtA[iNdEx:postIndex])) + m.Names = append(m.Names, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Levels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3048,29 +4878,31 @@ func (m *SeriesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.LabelNames = append(m.LabelNames, string(dAtA[iNdEx:postIndex])) + m.Levels = append(m.Levels, &Level{}) + if err := m.Levels[len(m.Levels)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - m.Start = 0 + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3080,16 +4912,16 @@ func (m *SeriesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= int64(b&0x7F) << shift + m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaxSelf", wireType) } - m.End = 0 + m.MaxSelf = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3099,7 +4931,7 @@ func (m *SeriesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= int64(b&0x7F) << shift + m.MaxSelf |= int64(b&0x7F) << shift if b < 0x80 { break } @@ -3126,7 +4958,7 @@ func (m *SeriesRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SeriesResponse) UnmarshalVT(dAtA []byte) error { +func (m *FlameGraphDiff) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3149,17 +4981,17 @@ func (m *SeriesResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SeriesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: FlameGraphDiff: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SeriesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FlameGraphDiff: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 2: + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelsSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3169,90 +5001,29 @@ func (m *SeriesResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.LabelsSet = append(m.LabelsSet, &v1.Labels{}) - if unmarshal, ok := interface{}(m.LabelsSet[len(m.LabelsSet)-1]).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.LabelsSet[len(m.LabelsSet)-1]); err != nil { - return err - } - } + m.Names = append(m.Names, 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 (m *SelectMergeStacktracesRequest) 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: SelectMergeStacktracesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SelectMergeStacktracesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypeID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Levels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3262,29 +5033,31 @@ func (m *SelectMergeStacktracesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.ProfileTypeID = string(dAtA[iNdEx:postIndex]) + m.Levels = append(m.Levels, &Level{}) + if err := m.Levels[len(m.Levels)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - var stringLen uint64 + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3294,29 +5067,16 @@ func (m *SelectMergeStacktracesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Total |= int64(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.LabelSelector = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaxSelf", wireType) } - m.Start = 0 + m.MaxSelf = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3326,16 +5086,16 @@ func (m *SelectMergeStacktracesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= int64(b&0x7F) << shift + m.MaxSelf |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LeftTicks", wireType) } - m.End = 0 + m.LeftTicks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3345,16 +5105,16 @@ func (m *SelectMergeStacktracesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= int64(b&0x7F) << shift + m.LeftTicks |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 5: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RightTicks", wireType) } - var v int64 + m.RightTicks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3364,12 +5124,11 @@ func (m *SelectMergeStacktracesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + m.RightTicks |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.MaxNodes = &v default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -3392,7 +5151,7 @@ func (m *SelectMergeStacktracesRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SelectMergeStacktracesResponse) UnmarshalVT(dAtA []byte) error { +func (m *Level) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3415,48 +5174,88 @@ func (m *SelectMergeStacktracesResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SelectMergeStacktracesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Level: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SelectMergeStacktracesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Level: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flamegraph", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { + if packedLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } } + elementCount = count + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Flamegraph == nil { - m.Flamegraph = &FlameGraph{} - } - if err := m.Flamegraph.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -3479,7 +5278,7 @@ func (m *SelectMergeStacktracesResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SelectMergeSpanProfileRequest) UnmarshalVT(dAtA []byte) error { +func (m *SelectMergeProfileRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3502,10 +5301,10 @@ func (m *SelectMergeSpanProfileRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SelectMergeSpanProfileRequest: wiretype end group for non-group") + return fmt.Errorf("proto: SelectMergeProfileRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SelectMergeSpanProfileRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SelectMergeProfileRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3573,10 +5372,10 @@ func (m *SelectMergeSpanProfileRequest) UnmarshalVT(dAtA []byte) error { m.LabelSelector = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanSelector", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) } - var stringLen uint64 + m.Start = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3586,29 +5385,16 @@ func (m *SelectMergeSpanProfileRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Start |= int64(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.SpanSelector = append(m.SpanSelector, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) } - m.Start = 0 + m.End = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3618,16 +5404,16 @@ func (m *SelectMergeSpanProfileRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= int64(b&0x7F) << shift + m.End |= int64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MaxNodes", wireType) } - m.End = 0 + var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3637,16 +5423,17 @@ func (m *SelectMergeSpanProfileRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= int64(b&0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } } + m.MaxNodes = &v case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNodes", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StackTraceSelector", wireType) } - var v int64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3656,12 +5443,36 @@ func (m *SelectMergeSpanProfileRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.MaxNodes = &v + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StackTraceSelector == nil { + m.StackTraceSelector = &v1.StackTraceSelector{} + } + if unmarshal, ok := interface{}(m.StackTraceSelector).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.StackTraceSelector); err != nil { + return err + } + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -3684,7 +5495,7 @@ func (m *SelectMergeSpanProfileRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SelectMergeSpanProfileResponse) UnmarshalVT(dAtA []byte) error { +func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3707,17 +5518,17 @@ func (m *SelectMergeSpanProfileResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SelectMergeSpanProfileResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SelectSeriesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SelectMergeSpanProfileResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SelectSeriesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flamegraph", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypeID", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3727,84 +5538,99 @@ func (m *SelectMergeSpanProfileResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Flamegraph == nil { - m.Flamegraph = &FlameGraph{} + m.ProfileTypeID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) } - if err := m.Flamegraph.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + 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 + } } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLength } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DiffRequest) 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 + m.LabelSelector = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + m.Start = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Start |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiffRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiffRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3814,31 +5640,58 @@ func (m *DiffRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Left == nil { - m.Left = &SelectMergeStacktracesRequest{} + m.GroupBy = append(m.GroupBy, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) } - if err := m.Left.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 2: + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Step = float64(math.Float64frombits(v)) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", wireType) + } + var v v1.TimeSeriesAggregationType + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= v1.TimeSeriesAggregationType(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Aggregation = &v + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StackTraceSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3865,11 +5718,19 @@ func (m *DiffRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Right == nil { - m.Right = &SelectMergeStacktracesRequest{} + if m.StackTraceSelector == nil { + m.StackTraceSelector = &v1.StackTraceSelector{} } - if err := m.Right.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + if unmarshal, ok := interface{}(m.StackTraceSelector).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.StackTraceSelector); err != nil { + return err + } } iNdEx = postIndex default: @@ -3894,7 +5755,7 @@ func (m *DiffRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *DiffResponse) UnmarshalVT(dAtA []byte) error { +func (m *SelectSeriesResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3917,15 +5778,15 @@ func (m *DiffResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DiffResponse: wiretype end group for non-group") + return fmt.Errorf("proto: SelectSeriesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DiffResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SelectSeriesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flamegraph", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3952,11 +5813,17 @@ func (m *DiffResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Flamegraph == nil { - m.Flamegraph = &FlameGraphDiff{} - } - if err := m.Flamegraph.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Series = append(m.Series, &v1.Series{}) + if unmarshal, ok := interface{}(m.Series[len(m.Series)-1]).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Series[len(m.Series)-1]); err != nil { + return err + } } iNdEx = postIndex default: @@ -3981,7 +5848,7 @@ func (m *DiffResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FlameGraph) UnmarshalVT(dAtA []byte) error { +func (m *AnalyzeQueryRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4004,17 +5871,36 @@ func (m *FlameGraph) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FlameGraph: wiretype end group for non-group") + return fmt.Errorf("proto: AnalyzeQueryRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FlameGraph: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AnalyzeQueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= QueryType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypesRequest", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4024,27 +5910,31 @@ func (m *FlameGraph) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Names = append(m.Names, string(dAtA[iNdEx:postIndex])) + if m.ProfileTypesRequest == nil { + m.ProfileTypesRequest = &ProfileTypesRequest{} + } + if err := m.ProfileTypesRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Levels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LabelNamesRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4071,16 +5961,26 @@ func (m *FlameGraph) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Levels = append(m.Levels, &Level{}) - if err := m.Levels[len(m.Levels)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.LabelNamesRequest == nil { + m.LabelNamesRequest = &v1.LabelNamesRequest{} + } + if unmarshal, ok := interface{}(m.LabelNamesRequest).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.LabelNamesRequest); err != nil { + return err + } } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelValuesRequest", wireType) } - m.Total = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4090,16 +5990,41 @@ func (m *FlameGraph) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSelf", wireType) + if msglen < 0 { + return ErrInvalidLength } - m.MaxSelf = 0 + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LabelValuesRequest == nil { + m.LabelValuesRequest = &v1.LabelValuesRequest{} + } + if unmarshal, ok := interface{}(m.LabelValuesRequest).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.LabelValuesRequest); err != nil { + return err + } + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SeriesRequest", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4109,67 +6034,33 @@ func (m *FlameGraph) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.MaxSelf |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err + if msglen < 0 { + return ErrInvalidLength } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + msglen + if postIndex < 0 { return ErrInvalidLength } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FlameGraphDiff) 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 + if m.SeriesRequest == nil { + m.SeriesRequest = &SeriesRequest{} } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := m.SeriesRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FlameGraphDiff: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FlameGraphDiff: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FlamegraphRequest", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4179,27 +6070,31 @@ func (m *FlameGraphDiff) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Names = append(m.Names, string(dAtA[iNdEx:postIndex])) + if m.FlamegraphRequest == nil { + m.FlamegraphRequest = &SelectMergeStacktracesRequest{} + } + if err := m.FlamegraphRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Levels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SpanProfileFlamegraphRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4226,16 +6121,18 @@ func (m *FlameGraphDiff) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Levels = append(m.Levels, &Level{}) - if err := m.Levels[len(m.Levels)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.SpanProfileFlamegraphRequest == nil { + m.SpanProfileFlamegraphRequest = &SelectMergeSpanProfileRequest{} + } + if err := m.SpanProfileFlamegraphRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PprofRequest", wireType) } - m.Total = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4245,35 +6142,33 @@ func (m *FlameGraphDiff) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSelf", wireType) + if msglen < 0 { + return ErrInvalidLength } - m.MaxSelf = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxSelf |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LeftTicks", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - m.LeftTicks = 0 + if m.PprofRequest == nil { + m.PprofRequest = &SelectMergeProfileRequest{} + } + if err := m.PprofRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeseriesRequest", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4283,16 +6178,33 @@ func (m *FlameGraphDiff) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LeftTicks |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RightTicks", wireType) + if msglen < 0 { + return ErrInvalidLength } - m.RightTicks = 0 + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeseriesRequest == nil { + m.TimeseriesRequest = &SelectSeriesRequest{} + } + if err := m.TimeseriesRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DiffRequest", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4302,138 +6214,28 @@ func (m *FlameGraphDiff) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.RightTicks |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 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 (m *Level) 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 + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.DiffRequest == nil { + m.DiffRequest = &DiffRequest{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Level: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Level: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Values = append(m.Values, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Values) == 0 { - m.Values = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Values = append(m.Values, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + if err := m.DiffRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -4456,7 +6258,7 @@ func (m *Level) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SelectMergeProfileRequest) UnmarshalVT(dAtA []byte) error { +func (m *AnalyzeQueryResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4475,51 +6277,19 @@ func (m *SelectMergeProfileRequest) UnmarshalVT(dAtA []byte) error { if b < 0x80 { break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SelectMergeProfileRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SelectMergeProfileRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypeID", 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.ProfileTypeID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AnalyzeQueryResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnalyzeQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field QueryValidationErrors", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4547,13 +6317,13 @@ func (m *SelectMergeProfileRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LabelSelector = string(dAtA[iNdEx:postIndex]) + m.QueryValidationErrors = append(m.QueryValidationErrors, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryScopes", wireType) } - m.Start = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4563,53 +6333,29 @@ func (m *SelectMergeProfileRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + if msglen < 0 { + return ErrInvalidLength } - m.End = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.End |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxNodes", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + m.QueryScopes = append(m.QueryScopes, &QueryScope{}) + if err := m.QueryScopes[len(m.QueryScopes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.MaxNodes = &v - case 6: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StackTraceSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field QueryImpact", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4636,19 +6382,11 @@ func (m *SelectMergeProfileRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StackTraceSelector == nil { - m.StackTraceSelector = &v1.StackTraceSelector{} + if m.QueryImpact == nil { + m.QueryImpact = &QueryImpact{} } - if unmarshal, ok := interface{}(m.StackTraceSelector).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.StackTraceSelector); err != nil { - return err - } + if err := m.QueryImpact.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -4673,7 +6411,7 @@ func (m *SelectMergeProfileRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { +func (m *QueryScope) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4696,15 +6434,15 @@ func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SelectSeriesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryScope: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SelectSeriesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryScope: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypeID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ComponentType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4732,13 +6470,13 @@ func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ProfileTypeID = string(dAtA[iNdEx:postIndex]) + m.ComponentType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ComponentCount", wireType) } - var stringLen uint64 + m.ComponentCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4748,29 +6486,16 @@ func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.ComponentCount |= int64(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.LabelSelector = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NumBlocks", wireType) } - m.Start = 0 + m.NumBlocks = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4780,16 +6505,16 @@ func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Start |= int64(b&0x7F) << shift + m.NumBlocks |= int64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NumSeries", wireType) } - m.End = 0 + m.NumSeries = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4799,16 +6524,16 @@ func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.End |= int64(b&0x7F) << shift + m.NumSeries |= int64(b&0x7F) << shift if b < 0x80 { break } } case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumProfiles", wireType) } - var stringLen uint64 + m.NumProfiles = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4818,40 +6543,35 @@ func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.NumProfiles |= int64(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.GroupBy = append(m.GroupBy, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex case 6: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumSamples", wireType) } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF + m.NumSamples = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumSamples |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Step = float64(math.Float64frombits(v)) case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IndexBytes", wireType) } - var v v1.TimeSeriesAggregationType + m.IndexBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4861,17 +6581,16 @@ func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= v1.TimeSeriesAggregationType(b&0x7F) << shift + m.IndexBytes |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.Aggregation = &v case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StackTraceSelector", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileBytes", wireType) } - var msglen int + m.ProfileBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4881,36 +6600,30 @@ func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.ProfileBytes |= int64(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 m.StackTraceSelector == nil { - m.StackTraceSelector = &v1.StackTraceSelector{} + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SymbolBytes", wireType) } - if unmarshal, ok := interface{}(m.StackTraceSelector).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.SymbolBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.StackTraceSelector); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SymbolBytes |= int64(b&0x7F) << shift + if b < 0x80 { + break } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -4933,7 +6646,7 @@ func (m *SelectSeriesRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SelectSeriesResponse) UnmarshalVT(dAtA []byte) error { +func (m *QueryImpact) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4956,17 +6669,17 @@ func (m *SelectSeriesResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SelectSeriesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryImpact: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SelectSeriesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryImpact: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Series", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4976,34 +6689,68 @@ func (m *SelectSeriesResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Type |= QueryImpactType(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLength + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubQueryCount", wireType) } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength + m.SubQueryCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SubQueryCount |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBytesRead", wireType) } - m.Series = append(m.Series, &v1.Series{}) - if unmarshal, ok := interface{}(m.Series[len(m.Series)-1]).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.TotalBytesRead = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Series[len(m.Series)-1]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalBytesRead |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EstimatedTimeNanos", wireType) + } + m.EstimatedTimeNanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EstimatedTimeNanos |= int64(b&0x7F) << shift + if b < 0x80 { + break } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/api/gen/proto/go/querier/v1/querierv1connect/querier.connect.go b/api/gen/proto/go/querier/v1/querierv1connect/querier.connect.go index 6ee89563c0..fcf4bd79c3 100644 --- a/api/gen/proto/go/querier/v1/querierv1connect/querier.connect.go +++ b/api/gen/proto/go/querier/v1/querierv1connect/querier.connect.go @@ -63,6 +63,9 @@ const ( // QuerierServiceGetProfileStatsProcedure is the fully-qualified name of the QuerierService's // GetProfileStats RPC. QuerierServiceGetProfileStatsProcedure = "/querier.v1.QuerierService/GetProfileStats" + // QuerierServiceAnalyzeQueryProcedure is the fully-qualified name of the QuerierService's + // AnalyzeQuery RPC. + QuerierServiceAnalyzeQueryProcedure = "/querier.v1.QuerierService/AnalyzeQuery" ) // These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. @@ -78,6 +81,7 @@ var ( querierServiceSelectSeriesMethodDescriptor = querierServiceServiceDescriptor.Methods().ByName("SelectSeries") querierServiceDiffMethodDescriptor = querierServiceServiceDescriptor.Methods().ByName("Diff") querierServiceGetProfileStatsMethodDescriptor = querierServiceServiceDescriptor.Methods().ByName("GetProfileStats") + querierServiceAnalyzeQueryMethodDescriptor = querierServiceServiceDescriptor.Methods().ByName("AnalyzeQuery") ) // QuerierServiceClient is a client for the querier.v1.QuerierService service. @@ -102,6 +106,7 @@ type QuerierServiceClient interface { Diff(context.Context, *connect.Request[v1.DiffRequest]) (*connect.Response[v1.DiffResponse], error) // GetProfileStats returns profile stats for the current tenant. GetProfileStats(context.Context, *connect.Request[v11.GetProfileStatsRequest]) (*connect.Response[v11.GetProfileStatsResponse], error) + AnalyzeQuery(context.Context, *connect.Request[v1.AnalyzeQueryRequest]) (*connect.Response[v1.AnalyzeQueryResponse], error) } // NewQuerierServiceClient constructs a client for the querier.v1.QuerierService service. By @@ -174,6 +179,12 @@ func NewQuerierServiceClient(httpClient connect.HTTPClient, baseURL string, opts connect.WithSchema(querierServiceGetProfileStatsMethodDescriptor), connect.WithClientOptions(opts...), ), + analyzeQuery: connect.NewClient[v1.AnalyzeQueryRequest, v1.AnalyzeQueryResponse]( + httpClient, + baseURL+QuerierServiceAnalyzeQueryProcedure, + connect.WithSchema(querierServiceAnalyzeQueryMethodDescriptor), + connect.WithClientOptions(opts...), + ), } } @@ -189,6 +200,7 @@ type querierServiceClient struct { selectSeries *connect.Client[v1.SelectSeriesRequest, v1.SelectSeriesResponse] diff *connect.Client[v1.DiffRequest, v1.DiffResponse] getProfileStats *connect.Client[v11.GetProfileStatsRequest, v11.GetProfileStatsResponse] + analyzeQuery *connect.Client[v1.AnalyzeQueryRequest, v1.AnalyzeQueryResponse] } // ProfileTypes calls querier.v1.QuerierService.ProfileTypes. @@ -241,6 +253,11 @@ func (c *querierServiceClient) GetProfileStats(ctx context.Context, req *connect return c.getProfileStats.CallUnary(ctx, req) } +// AnalyzeQuery calls querier.v1.QuerierService.AnalyzeQuery. +func (c *querierServiceClient) AnalyzeQuery(ctx context.Context, req *connect.Request[v1.AnalyzeQueryRequest]) (*connect.Response[v1.AnalyzeQueryResponse], error) { + return c.analyzeQuery.CallUnary(ctx, req) +} + // QuerierServiceHandler is an implementation of the querier.v1.QuerierService service. type QuerierServiceHandler interface { // ProfileType returns a list of the existing profile types. @@ -263,6 +280,7 @@ type QuerierServiceHandler interface { Diff(context.Context, *connect.Request[v1.DiffRequest]) (*connect.Response[v1.DiffResponse], error) // GetProfileStats returns profile stats for the current tenant. GetProfileStats(context.Context, *connect.Request[v11.GetProfileStatsRequest]) (*connect.Response[v11.GetProfileStatsResponse], error) + AnalyzeQuery(context.Context, *connect.Request[v1.AnalyzeQueryRequest]) (*connect.Response[v1.AnalyzeQueryResponse], error) } // NewQuerierServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -331,6 +349,12 @@ func NewQuerierServiceHandler(svc QuerierServiceHandler, opts ...connect.Handler connect.WithSchema(querierServiceGetProfileStatsMethodDescriptor), connect.WithHandlerOptions(opts...), ) + querierServiceAnalyzeQueryHandler := connect.NewUnaryHandler( + QuerierServiceAnalyzeQueryProcedure, + svc.AnalyzeQuery, + connect.WithSchema(querierServiceAnalyzeQueryMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) return "/querier.v1.QuerierService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case QuerierServiceProfileTypesProcedure: @@ -353,6 +377,8 @@ func NewQuerierServiceHandler(svc QuerierServiceHandler, opts ...connect.Handler querierServiceDiffHandler.ServeHTTP(w, r) case QuerierServiceGetProfileStatsProcedure: querierServiceGetProfileStatsHandler.ServeHTTP(w, r) + case QuerierServiceAnalyzeQueryProcedure: + querierServiceAnalyzeQueryHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -401,3 +427,7 @@ func (UnimplementedQuerierServiceHandler) Diff(context.Context, *connect.Request func (UnimplementedQuerierServiceHandler) GetProfileStats(context.Context, *connect.Request[v11.GetProfileStatsRequest]) (*connect.Response[v11.GetProfileStatsResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("querier.v1.QuerierService.GetProfileStats is not implemented")) } + +func (UnimplementedQuerierServiceHandler) AnalyzeQuery(context.Context, *connect.Request[v1.AnalyzeQueryRequest]) (*connect.Response[v1.AnalyzeQueryResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("querier.v1.QuerierService.AnalyzeQuery is not implemented")) +} diff --git a/api/gen/proto/go/querier/v1/querierv1connect/querier.connect.mux.go b/api/gen/proto/go/querier/v1/querierv1connect/querier.connect.mux.go index f94c88c3c9..9a82702031 100644 --- a/api/gen/proto/go/querier/v1/querierv1connect/querier.connect.mux.go +++ b/api/gen/proto/go/querier/v1/querierv1connect/querier.connect.mux.go @@ -69,4 +69,9 @@ func RegisterQuerierServiceHandler(mux *mux.Router, svc QuerierServiceHandler, o svc.GetProfileStats, opts..., )) + mux.Handle("/querier.v1.QuerierService/AnalyzeQuery", connect.NewUnaryHandler( + "/querier.v1.QuerierService/AnalyzeQuery", + svc.AnalyzeQuery, + opts..., + )) } diff --git a/api/openapiv2/gen/phlare.swagger.json b/api/openapiv2/gen/phlare.swagger.json index b48cd981c2..fce7fd1c58 100644 --- a/api/openapiv2/gen/phlare.swagger.json +++ b/api/openapiv2/gen/phlare.swagger.json @@ -343,6 +343,21 @@ "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, + "querierv1ProfileTypesRequest": { + "type": "object", + "properties": { + "start": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch. If missing or zero, only the ingesters will be\nqueried." + }, + "end": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch. If missing or zero, only the ingesters will be\nqueried." + } + } + }, "querierv1ProfileTypesResponse": { "type": "object", "properties": { @@ -355,6 +370,33 @@ } } }, + "querierv1SeriesRequest": { + "type": "object", + "properties": { + "matchers": { + "type": "array", + "items": { + "type": "string" + } + }, + "labelNames": { + "type": "array", + "items": { + "type": "string" + } + }, + "start": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch. If missing or zero, only the ingesters will be\nqueried." + }, + "end": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch. If missing or zero, only the ingesters will be\nqueried." + } + } + }, "querierv1SeriesResponse": { "type": "object", "properties": { @@ -451,6 +493,29 @@ } } }, + "v1AnalyzeQueryResponse": { + "type": "object", + "properties": { + "queryValidationErrors": { + "type": "array", + "items": { + "type": "string" + } + }, + "queryScopes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QueryScope" + }, + "title": "detailed view of what the query will require" + }, + "queryImpact": { + "$ref": "#/definitions/v1QueryImpact", + "title": "summary of the query impact / performance" + } + } + }, "v1BlockCompaction": { "type": "object", "properties": { @@ -540,6 +605,17 @@ } } }, + "v1DiffRequest": { + "type": "object", + "properties": { + "left": { + "$ref": "#/definitions/v1SelectMergeStacktracesRequest" + }, + "right": { + "$ref": "#/definitions/v1SelectMergeStacktracesRequest" + } + } + }, "v1DiffResponse": { "type": "object", "properties": { @@ -777,6 +853,25 @@ }, "title": "Hints are used to propagate information about querying" }, + "v1LabelNamesRequest": { + "type": "object", + "properties": { + "matchers": { + "type": "array", + "items": { + "type": "string" + } + }, + "start": { + "type": "string", + "format": "int64" + }, + "end": { + "type": "string", + "format": "int64" + } + } + }, "v1LabelNamesResponse": { "type": "object", "properties": { @@ -799,6 +894,28 @@ } } }, + "v1LabelValuesRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "matchers": { + "type": "array", + "items": { + "type": "string" + } + }, + "start": { + "type": "string", + "format": "int64" + }, + "end": { + "type": "string", + "format": "int64" + } + } + }, "v1LabelValuesResponse": { "type": "object", "properties": { @@ -1050,6 +1167,93 @@ "v1PushResponse": { "type": "object" }, + "v1QueryImpact": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/v1QueryImpactType" + }, + "subQueryCount": { + "type": "string", + "format": "int64" + }, + "totalBytesRead": { + "type": "string", + "format": "int64" + }, + "estimatedTimeNanos": { + "type": "string", + "format": "int64", + "title": "not sure how we can do this yet, but it would be a formula based on the query scopes above" + } + } + }, + "v1QueryImpactType": { + "type": "string", + "enum": [ + "LOW", + "MEDIUM", + "HIGH" + ], + "default": "LOW" + }, + "v1QueryScope": { + "type": "object", + "properties": { + "componentType": { + "type": "string", + "title": "high level, e.g., \"short term\" or \"long term\" storage" + }, + "componentCount": { + "type": "string", + "format": "int64", + "title": "how many components of this type will work on the query" + }, + "numBlocks": { + "type": "string", + "format": "int64" + }, + "numSeries": { + "type": "string", + "format": "int64" + }, + "numProfiles": { + "type": "string", + "format": "int64" + }, + "numSamples": { + "type": "string", + "format": "int64" + }, + "indexBytes": { + "type": "string", + "format": "int64" + }, + "profileBytes": { + "type": "string", + "format": "int64" + }, + "symbolBytes": { + "type": "string", + "format": "int64" + } + } + }, + "v1QueryType": { + "type": "string", + "enum": [ + "PROFILE_TYPES", + "LABEL_NAMES", + "LABEL_VALUES", + "SERIES", + "FLAME_GRAPH", + "SPAN_PROFILE_FLAME_GRAPH", + "PPROF", + "TIME_SERIES", + "DIFF" + ], + "default": "PROFILE_TYPES" + }, "v1RawProfileSeries": { "type": "object", "properties": { @@ -1117,6 +1321,68 @@ }, "description": "Each Sample records values encountered in some program\ncontext. The program context is typically a stack trace, perhaps\naugmented with auxiliary information like the thread-id, some\nindicator of a higher level request being handled etc." }, + "v1SelectMergeProfileRequest": { + "type": "object", + "properties": { + "profileTypeID": { + "type": "string" + }, + "labelSelector": { + "type": "string" + }, + "start": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch." + }, + "end": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch." + }, + "maxNodes": { + "type": "string", + "format": "int64", + "title": "Limit the nodes returned to only show the node with the max_node's biggest total" + }, + "stackTraceSelector": { + "$ref": "#/definitions/v1StackTraceSelector", + "description": "Select stack traces that match the provided selector." + } + } + }, + "v1SelectMergeSpanProfileRequest": { + "type": "object", + "properties": { + "profileTypeID": { + "type": "string" + }, + "labelSelector": { + "type": "string" + }, + "spanSelector": { + "type": "array", + "items": { + "type": "string" + } + }, + "start": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch." + }, + "end": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch." + }, + "maxNodes": { + "type": "string", + "format": "int64", + "title": "Limit the nodes returned to only show the node with the max_node's biggest total" + } + } + }, "v1SelectMergeSpanProfileResponse": { "type": "object", "properties": { @@ -1188,6 +1454,45 @@ } } }, + "v1SelectSeriesRequest": { + "type": "object", + "properties": { + "profileTypeID": { + "type": "string" + }, + "labelSelector": { + "type": "string" + }, + "start": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch." + }, + "end": { + "type": "string", + "format": "int64", + "description": "Milliseconds since epoch." + }, + "groupBy": { + "type": "array", + "items": { + "type": "string" + } + }, + "step": { + "type": "number", + "format": "double" + }, + "aggregation": { + "$ref": "#/definitions/v1TimeSeriesAggregationType", + "title": "Query resolution step width in seconds" + }, + "stackTraceSelector": { + "$ref": "#/definitions/v1StackTraceSelector", + "description": "Select stack traces that match the provided selector." + } + } + }, "v1SelectSeriesResponse": { "type": "object", "properties": { diff --git a/api/querier/v1/querier.proto b/api/querier/v1/querier.proto index 8a6fca2c9d..fe1f16bc48 100644 --- a/api/querier/v1/querier.proto +++ b/api/querier/v1/querier.proto @@ -28,6 +28,7 @@ service QuerierService { // GetProfileStats returns profile stats for the current tenant. rpc GetProfileStats(types.v1.GetProfileStatsRequest) returns (types.v1.GetProfileStatsResponse) {} + rpc AnalyzeQuery(AnalyzeQueryRequest) returns (AnalyzeQueryResponse) {} } message ProfileTypesRequest { @@ -150,3 +151,62 @@ message SelectSeriesRequest { message SelectSeriesResponse { repeated types.v1.Series series = 1; } + +message AnalyzeQueryRequest { + QueryType type = 1; + + ProfileTypesRequest profile_types_request = 2; + types.v1.LabelNamesRequest label_names_request = 3; + types.v1.LabelValuesRequest label_values_request = 4; + SeriesRequest series_request = 5; + SelectMergeStacktracesRequest flamegraph_request = 6; + SelectMergeSpanProfileRequest span_profile_flamegraph_request = 7; + SelectMergeProfileRequest pprof_request = 8; + SelectSeriesRequest timeseries_request = 9; + DiffRequest diff_request = 10; +} + +enum QueryType { + PROFILE_TYPES = 0; + LABEL_NAMES = 1; + LABEL_VALUES = 2; + SERIES = 3; + FLAME_GRAPH = 4; + SPAN_PROFILE_FLAME_GRAPH = 5; + PPROF = 6; + TIME_SERIES = 7; + DIFF = 8; +} + +message AnalyzeQueryResponse { + repeated string queryValidationErrors = 1; + + repeated QueryScope query_scopes = 2; // detailed view of what the query will require + QueryImpact query_impact = 3; // summary of the query impact / performance +} + +message QueryScope { + string component_type = 1; // high level, e.g., "short term" or "long term" storage + int64 component_count = 2; // how many components of this type will work on the query + + int64 num_blocks = 3; + int64 num_series = 4; + int64 num_profiles = 5; + int64 num_samples = 6; + int64 index_bytes = 7; + int64 profile_bytes = 8; + int64 symbol_bytes = 9; +} + +message QueryImpact { + QueryImpactType type = 1; + int64 sub_query_count = 2; + int64 total_bytes_read = 3; + int64 estimated_time_nanos = 4; // not sure how we can do this yet, but it would be a formula based on the query scopes above +} + +enum QueryImpactType { + LOW = 0; + MEDIUM = 1; + HIGH = 2; +} diff --git a/pkg/frontend/frontend_analyze_query.go b/pkg/frontend/frontend_analyze_query.go new file mode 100644 index 0000000000..e6e6d30374 --- /dev/null +++ b/pkg/frontend/frontend_analyze_query.go @@ -0,0 +1,16 @@ +package frontend + +import ( + "context" + + "connectrpc.com/connect" + + querierv1 "github.com/grafana/pyroscope/api/gen/proto/go/querier/v1" +) + +func (f *Frontend) AnalyzeQuery(ctx context.Context, + c *connect.Request[querierv1.AnalyzeQueryRequest]) ( + *connect.Response[querierv1.AnalyzeQueryResponse], error, +) { + return nil, nil +} diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 1ebf7025d9..d4e3c160eb 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -572,6 +572,12 @@ func (q *Querier) GetProfileStats(ctx context.Context, req *connect.Request[type return connect.NewResponse(response), nil } +func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querierv1.AnalyzeQueryRequest]) (*connect.Response[querierv1.AnalyzeQueryResponse], error) { + sp, ctx := opentracing.StartSpanFromContext(ctx, "AnalyzeQuery") + defer sp.Finish() + return nil, nil +} + func (q *Querier) SelectMergeStacktraces(ctx context.Context, req *connect.Request[querierv1.SelectMergeStacktracesRequest]) (*connect.Response[querierv1.SelectMergeStacktracesResponse], error) { sp, ctx := opentracing.StartSpanFromContext(ctx, "SelectMergeStacktraces") level.Info(spanlogger.FromContext(ctx, q.logger)).Log( From b49e7b0f8c3588ab11b5b46626a33bc0365ae491 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Thu, 18 Apr 2024 14:20:22 -0300 Subject: [PATCH 02/27] Implement AnalyzeQuery (wip) --- api/gen/proto/go/ingester/v1/ingester.pb.go | 397 ++++++-- .../go/ingester/v1/ingester_vtproto.pb.go | 860 ++++++++++++++++-- .../v1/ingesterv1connect/ingester.connect.go | 30 + .../ingesterv1connect/ingester.connect.mux.go | 5 + api/gen/proto/go/querier/v1/querier.pb.go | 500 ++++------ .../proto/go/querier/v1/querier_vtproto.pb.go | 597 +----------- api/ingester/v1/ingester.proto | 18 + api/openapiv2/gen/phlare.swagger.json | 257 +----- api/querier/v1/querier.proto | 34 +- pkg/frontend/frontend_analyze_query.go | 9 +- pkg/ingester/query.go | 7 +- pkg/og/build/build.go | 2 +- pkg/phlaredb/block/metadata.go | 55 ++ pkg/phlaredb/block_querier.go | 4 + pkg/phlaredb/head.go | 8 +- pkg/phlaredb/phlaredb.go | 30 + pkg/querier/ingester_querier.go | 1 + pkg/querier/querier.go | 89 +- pkg/querier/store_gateway_querier.go | 1 + pkg/storegateway/query.go | 20 + 20 files changed, 1686 insertions(+), 1238 deletions(-) diff --git a/api/gen/proto/go/ingester/v1/ingester.pb.go b/api/gen/proto/go/ingester/v1/ingester.pb.go index 571d8b6ded..6f26ed84d7 100644 --- a/api/gen/proto/go/ingester/v1/ingester.pb.go +++ b/api/gen/proto/go/ingester/v1/ingester.pb.go @@ -1654,6 +1654,187 @@ func (x *BlockHints) GetDeduplication() bool { return false } +type GetBlockStatsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ulids []string `protobuf:"bytes,1,rep,name=ulids,proto3" json:"ulids,omitempty"` +} + +func (x *GetBlockStatsRequest) Reset() { + *x = GetBlockStatsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ingester_v1_ingester_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockStatsRequest) ProtoMessage() {} + +func (x *GetBlockStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_ingester_v1_ingester_proto_msgTypes[26] + 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 GetBlockStatsRequest.ProtoReflect.Descriptor instead. +func (*GetBlockStatsRequest) Descriptor() ([]byte, []int) { + return file_ingester_v1_ingester_proto_rawDescGZIP(), []int{26} +} + +func (x *GetBlockStatsRequest) GetUlids() []string { + if x != nil { + return x.Ulids + } + return nil +} + +type GetBlockStatsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockStats []*BlockStats `protobuf:"bytes,1,rep,name=block_stats,json=blockStats,proto3" json:"block_stats,omitempty"` +} + +func (x *GetBlockStatsResponse) Reset() { + *x = GetBlockStatsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ingester_v1_ingester_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockStatsResponse) ProtoMessage() {} + +func (x *GetBlockStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_ingester_v1_ingester_proto_msgTypes[27] + 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 GetBlockStatsResponse.ProtoReflect.Descriptor instead. +func (*GetBlockStatsResponse) Descriptor() ([]byte, []int) { + return file_ingester_v1_ingester_proto_rawDescGZIP(), []int{27} +} + +func (x *GetBlockStatsResponse) GetBlockStats() []*BlockStats { + if x != nil { + return x.BlockStats + } + return nil +} + +type BlockStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NumSeries uint64 `protobuf:"varint,2,opt,name=num_series,json=numSeries,proto3" json:"num_series,omitempty"` + NumProfiles uint64 `protobuf:"varint,3,opt,name=num_profiles,json=numProfiles,proto3" json:"num_profiles,omitempty"` + NumSamples uint64 `protobuf:"varint,4,opt,name=num_samples,json=numSamples,proto3" json:"num_samples,omitempty"` + IndexBytes uint64 `protobuf:"varint,5,opt,name=index_bytes,json=indexBytes,proto3" json:"index_bytes,omitempty"` + ProfilesBytes uint64 `protobuf:"varint,6,opt,name=profiles_bytes,json=profilesBytes,proto3" json:"profiles_bytes,omitempty"` + SymbolsBytes uint64 `protobuf:"varint,7,opt,name=symbols_bytes,json=symbolsBytes,proto3" json:"symbols_bytes,omitempty"` +} + +func (x *BlockStats) Reset() { + *x = BlockStats{} + if protoimpl.UnsafeEnabled { + mi := &file_ingester_v1_ingester_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockStats) ProtoMessage() {} + +func (x *BlockStats) ProtoReflect() protoreflect.Message { + mi := &file_ingester_v1_ingester_proto_msgTypes[28] + 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 BlockStats.ProtoReflect.Descriptor instead. +func (*BlockStats) Descriptor() ([]byte, []int) { + return file_ingester_v1_ingester_proto_rawDescGZIP(), []int{28} +} + +func (x *BlockStats) GetNumSeries() uint64 { + if x != nil { + return x.NumSeries + } + return 0 +} + +func (x *BlockStats) GetNumProfiles() uint64 { + if x != nil { + return x.NumProfiles + } + return 0 +} + +func (x *BlockStats) GetNumSamples() uint64 { + if x != nil { + return x.NumSamples + } + return 0 +} + +func (x *BlockStats) GetIndexBytes() uint64 { + if x != nil { + return x.IndexBytes + } + return 0 +} + +func (x *BlockStats) GetProfilesBytes() uint64 { + if x != nil { + return x.ProfilesBytes + } + return 0 +} + +func (x *BlockStats) GetSymbolsBytes() uint64 { + if x != nil { + return x.SymbolsBytes + } + return 0 +} + var File_ingester_v1_ingester_proto protoreflect.FileDescriptor var file_ingester_v1_ingester_proto_rawDesc = []byte{ @@ -1877,14 +2058,36 @@ var file_ingester_v1_ingester_proto_rawDesc = []byte{ 0x6c, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6c, 0x69, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x6b, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x63, 0x6b, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x75, 0x6c, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x75, 0x6c, 0x69, 0x64, 0x73, 0x22, 0x51, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, + 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0a, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, + 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x75, + 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, + 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, + 0x6e, 0x75, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x2a, 0x6b, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x54, 0x52, 0x41, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x54, 0x52, - 0x45, 0x45, 0x10, 0x02, 0x32, 0xb6, 0x08, 0x0a, 0x0f, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, + 0x45, 0x45, 0x10, 0x02, 0x32, 0x90, 0x09, 0x0a, 0x0f, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x50, 0x75, 0x73, 0x68, 0x12, 0x14, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x76, 0x31, @@ -1951,19 +2154,25 @@ var file_ingester_v1_ingester_proto_rawDesc = []byte{ 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xb3, 0x01, - 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x42, 0x0d, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, - 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x2f, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, - 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, - 0x0b, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x49, - 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x49, 0x6e, 0x67, - 0x65, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x21, + 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xb3, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, + 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x49, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, + 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x67, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x49, 0x6e, 0x67, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, + 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0c, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1979,7 +2188,7 @@ func file_ingester_v1_ingester_proto_rawDescGZIP() []byte { } var file_ingester_v1_ingester_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_ingester_v1_ingester_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_ingester_v1_ingester_proto_msgTypes = make([]protoimpl.MessageInfo, 29) var file_ingester_v1_ingester_proto_goTypes = []interface{}{ (StacktracesMergeFormat)(0), // 0: ingester.v1.StacktracesMergeFormat (*ProfileTypesRequest)(nil), // 1: ingester.v1.ProfileTypesRequest @@ -2008,81 +2217,87 @@ var file_ingester_v1_ingester_proto_goTypes = []interface{}{ (*BlockMetadataResponse)(nil), // 24: ingester.v1.BlockMetadataResponse (*Hints)(nil), // 25: ingester.v1.Hints (*BlockHints)(nil), // 26: ingester.v1.BlockHints - (*v1.ProfileType)(nil), // 27: types.v1.ProfileType - (*v1.Labels)(nil), // 28: types.v1.Labels - (v1.TimeSeriesAggregationType)(0), // 29: types.v1.TimeSeriesAggregationType - (*v1.LabelPair)(nil), // 30: types.v1.LabelPair - (*v1.StackTraceSelector)(nil), // 31: types.v1.StackTraceSelector - (*v1.Series)(nil), // 32: types.v1.Series - (*v1.BlockInfo)(nil), // 33: types.v1.BlockInfo - (*v11.PushRequest)(nil), // 34: push.v1.PushRequest - (*v1.LabelValuesRequest)(nil), // 35: types.v1.LabelValuesRequest - (*v1.LabelNamesRequest)(nil), // 36: types.v1.LabelNamesRequest - (*v1.GetProfileStatsRequest)(nil), // 37: types.v1.GetProfileStatsRequest - (*v11.PushResponse)(nil), // 38: push.v1.PushResponse - (*v1.LabelValuesResponse)(nil), // 39: types.v1.LabelValuesResponse - (*v1.LabelNamesResponse)(nil), // 40: types.v1.LabelNamesResponse - (*v1.GetProfileStatsResponse)(nil), // 41: types.v1.GetProfileStatsResponse + (*GetBlockStatsRequest)(nil), // 27: ingester.v1.GetBlockStatsRequest + (*GetBlockStatsResponse)(nil), // 28: ingester.v1.GetBlockStatsResponse + (*BlockStats)(nil), // 29: ingester.v1.BlockStats + (*v1.ProfileType)(nil), // 30: types.v1.ProfileType + (*v1.Labels)(nil), // 31: types.v1.Labels + (v1.TimeSeriesAggregationType)(0), // 32: types.v1.TimeSeriesAggregationType + (*v1.LabelPair)(nil), // 33: types.v1.LabelPair + (*v1.StackTraceSelector)(nil), // 34: types.v1.StackTraceSelector + (*v1.Series)(nil), // 35: types.v1.Series + (*v1.BlockInfo)(nil), // 36: types.v1.BlockInfo + (*v11.PushRequest)(nil), // 37: push.v1.PushRequest + (*v1.LabelValuesRequest)(nil), // 38: types.v1.LabelValuesRequest + (*v1.LabelNamesRequest)(nil), // 39: types.v1.LabelNamesRequest + (*v1.GetProfileStatsRequest)(nil), // 40: types.v1.GetProfileStatsRequest + (*v11.PushResponse)(nil), // 41: push.v1.PushResponse + (*v1.LabelValuesResponse)(nil), // 42: types.v1.LabelValuesResponse + (*v1.LabelNamesResponse)(nil), // 43: types.v1.LabelNamesResponse + (*v1.GetProfileStatsResponse)(nil), // 44: types.v1.GetProfileStatsResponse } var file_ingester_v1_ingester_proto_depIdxs = []int32{ - 27, // 0: ingester.v1.ProfileTypesResponse.profile_types:type_name -> types.v1.ProfileType - 28, // 1: ingester.v1.SeriesResponse.labels_set:type_name -> types.v1.Labels - 27, // 2: ingester.v1.SelectProfilesRequest.type:type_name -> types.v1.ProfileType + 30, // 0: ingester.v1.ProfileTypesResponse.profile_types:type_name -> types.v1.ProfileType + 31, // 1: ingester.v1.SeriesResponse.labels_set:type_name -> types.v1.Labels + 30, // 2: ingester.v1.SelectProfilesRequest.type:type_name -> types.v1.ProfileType 25, // 3: ingester.v1.SelectProfilesRequest.hints:type_name -> ingester.v1.Hints - 29, // 4: ingester.v1.SelectProfilesRequest.aggregation:type_name -> types.v1.TimeSeriesAggregationType + 32, // 4: ingester.v1.SelectProfilesRequest.aggregation:type_name -> types.v1.TimeSeriesAggregationType 7, // 5: ingester.v1.MergeProfilesStacktracesRequest.request:type_name -> ingester.v1.SelectProfilesRequest 0, // 6: ingester.v1.MergeProfilesStacktracesResult.format:type_name -> ingester.v1.StacktracesMergeFormat 18, // 7: ingester.v1.MergeProfilesStacktracesResult.stacktraces:type_name -> ingester.v1.StacktraceSample 15, // 8: ingester.v1.MergeProfilesStacktracesResponse.selectedProfiles:type_name -> ingester.v1.ProfileSets 9, // 9: ingester.v1.MergeProfilesStacktracesResponse.result:type_name -> ingester.v1.MergeProfilesStacktracesResult - 27, // 10: ingester.v1.SelectSpanProfileRequest.type:type_name -> types.v1.ProfileType + 30, // 10: ingester.v1.SelectSpanProfileRequest.type:type_name -> types.v1.ProfileType 25, // 11: ingester.v1.SelectSpanProfileRequest.hints:type_name -> ingester.v1.Hints 11, // 12: ingester.v1.MergeSpanProfileRequest.request:type_name -> ingester.v1.SelectSpanProfileRequest 15, // 13: ingester.v1.MergeSpanProfileResponse.selectedProfiles:type_name -> ingester.v1.ProfileSets 14, // 14: ingester.v1.MergeSpanProfileResponse.result:type_name -> ingester.v1.MergeSpanProfileResult - 28, // 15: ingester.v1.ProfileSets.labelsSets:type_name -> types.v1.Labels + 31, // 15: ingester.v1.ProfileSets.labelsSets:type_name -> types.v1.Labels 16, // 16: ingester.v1.ProfileSets.profiles:type_name -> ingester.v1.SeriesProfile - 27, // 17: ingester.v1.Profile.type:type_name -> types.v1.ProfileType - 30, // 18: ingester.v1.Profile.labels:type_name -> types.v1.LabelPair + 30, // 17: ingester.v1.Profile.type:type_name -> types.v1.ProfileType + 33, // 18: ingester.v1.Profile.labels:type_name -> types.v1.LabelPair 18, // 19: ingester.v1.Profile.stacktraces:type_name -> ingester.v1.StacktraceSample 7, // 20: ingester.v1.MergeProfilesLabelsRequest.request:type_name -> ingester.v1.SelectProfilesRequest - 31, // 21: ingester.v1.MergeProfilesLabelsRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector + 34, // 21: ingester.v1.MergeProfilesLabelsRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector 15, // 22: ingester.v1.MergeProfilesLabelsResponse.selectedProfiles:type_name -> ingester.v1.ProfileSets - 32, // 23: ingester.v1.MergeProfilesLabelsResponse.series:type_name -> types.v1.Series + 35, // 23: ingester.v1.MergeProfilesLabelsResponse.series:type_name -> types.v1.Series 7, // 24: ingester.v1.MergeProfilesPprofRequest.request:type_name -> ingester.v1.SelectProfilesRequest - 31, // 25: ingester.v1.MergeProfilesPprofRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector + 34, // 25: ingester.v1.MergeProfilesPprofRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector 15, // 26: ingester.v1.MergeProfilesPprofResponse.selectedProfiles:type_name -> ingester.v1.ProfileSets - 33, // 27: ingester.v1.BlockMetadataResponse.blocks:type_name -> types.v1.BlockInfo + 36, // 27: ingester.v1.BlockMetadataResponse.blocks:type_name -> types.v1.BlockInfo 26, // 28: ingester.v1.Hints.block:type_name -> ingester.v1.BlockHints - 34, // 29: ingester.v1.IngesterService.Push:input_type -> push.v1.PushRequest - 35, // 30: ingester.v1.IngesterService.LabelValues:input_type -> types.v1.LabelValuesRequest - 36, // 31: ingester.v1.IngesterService.LabelNames:input_type -> types.v1.LabelNamesRequest - 1, // 32: ingester.v1.IngesterService.ProfileTypes:input_type -> ingester.v1.ProfileTypesRequest - 3, // 33: ingester.v1.IngesterService.Series:input_type -> ingester.v1.SeriesRequest - 5, // 34: ingester.v1.IngesterService.Flush:input_type -> ingester.v1.FlushRequest - 8, // 35: ingester.v1.IngesterService.MergeProfilesStacktraces:input_type -> ingester.v1.MergeProfilesStacktracesRequest - 19, // 36: ingester.v1.IngesterService.MergeProfilesLabels:input_type -> ingester.v1.MergeProfilesLabelsRequest - 21, // 37: ingester.v1.IngesterService.MergeProfilesPprof:input_type -> ingester.v1.MergeProfilesPprofRequest - 12, // 38: ingester.v1.IngesterService.MergeSpanProfile:input_type -> ingester.v1.MergeSpanProfileRequest - 23, // 39: ingester.v1.IngesterService.BlockMetadata:input_type -> ingester.v1.BlockMetadataRequest - 37, // 40: ingester.v1.IngesterService.GetProfileStats:input_type -> types.v1.GetProfileStatsRequest - 38, // 41: ingester.v1.IngesterService.Push:output_type -> push.v1.PushResponse - 39, // 42: ingester.v1.IngesterService.LabelValues:output_type -> types.v1.LabelValuesResponse - 40, // 43: ingester.v1.IngesterService.LabelNames:output_type -> types.v1.LabelNamesResponse - 2, // 44: ingester.v1.IngesterService.ProfileTypes:output_type -> ingester.v1.ProfileTypesResponse - 4, // 45: ingester.v1.IngesterService.Series:output_type -> ingester.v1.SeriesResponse - 6, // 46: ingester.v1.IngesterService.Flush:output_type -> ingester.v1.FlushResponse - 10, // 47: ingester.v1.IngesterService.MergeProfilesStacktraces:output_type -> ingester.v1.MergeProfilesStacktracesResponse - 20, // 48: ingester.v1.IngesterService.MergeProfilesLabels:output_type -> ingester.v1.MergeProfilesLabelsResponse - 22, // 49: ingester.v1.IngesterService.MergeProfilesPprof:output_type -> ingester.v1.MergeProfilesPprofResponse - 13, // 50: ingester.v1.IngesterService.MergeSpanProfile:output_type -> ingester.v1.MergeSpanProfileResponse - 24, // 51: ingester.v1.IngesterService.BlockMetadata:output_type -> ingester.v1.BlockMetadataResponse - 41, // 52: ingester.v1.IngesterService.GetProfileStats:output_type -> types.v1.GetProfileStatsResponse - 41, // [41:53] is the sub-list for method output_type - 29, // [29:41] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 29, // 29: ingester.v1.GetBlockStatsResponse.block_stats:type_name -> ingester.v1.BlockStats + 37, // 30: ingester.v1.IngesterService.Push:input_type -> push.v1.PushRequest + 38, // 31: ingester.v1.IngesterService.LabelValues:input_type -> types.v1.LabelValuesRequest + 39, // 32: ingester.v1.IngesterService.LabelNames:input_type -> types.v1.LabelNamesRequest + 1, // 33: ingester.v1.IngesterService.ProfileTypes:input_type -> ingester.v1.ProfileTypesRequest + 3, // 34: ingester.v1.IngesterService.Series:input_type -> ingester.v1.SeriesRequest + 5, // 35: ingester.v1.IngesterService.Flush:input_type -> ingester.v1.FlushRequest + 8, // 36: ingester.v1.IngesterService.MergeProfilesStacktraces:input_type -> ingester.v1.MergeProfilesStacktracesRequest + 19, // 37: ingester.v1.IngesterService.MergeProfilesLabels:input_type -> ingester.v1.MergeProfilesLabelsRequest + 21, // 38: ingester.v1.IngesterService.MergeProfilesPprof:input_type -> ingester.v1.MergeProfilesPprofRequest + 12, // 39: ingester.v1.IngesterService.MergeSpanProfile:input_type -> ingester.v1.MergeSpanProfileRequest + 23, // 40: ingester.v1.IngesterService.BlockMetadata:input_type -> ingester.v1.BlockMetadataRequest + 40, // 41: ingester.v1.IngesterService.GetProfileStats:input_type -> types.v1.GetProfileStatsRequest + 27, // 42: ingester.v1.IngesterService.GetBlockStats:input_type -> ingester.v1.GetBlockStatsRequest + 41, // 43: ingester.v1.IngesterService.Push:output_type -> push.v1.PushResponse + 42, // 44: ingester.v1.IngesterService.LabelValues:output_type -> types.v1.LabelValuesResponse + 43, // 45: ingester.v1.IngesterService.LabelNames:output_type -> types.v1.LabelNamesResponse + 2, // 46: ingester.v1.IngesterService.ProfileTypes:output_type -> ingester.v1.ProfileTypesResponse + 4, // 47: ingester.v1.IngesterService.Series:output_type -> ingester.v1.SeriesResponse + 6, // 48: ingester.v1.IngesterService.Flush:output_type -> ingester.v1.FlushResponse + 10, // 49: ingester.v1.IngesterService.MergeProfilesStacktraces:output_type -> ingester.v1.MergeProfilesStacktracesResponse + 20, // 50: ingester.v1.IngesterService.MergeProfilesLabels:output_type -> ingester.v1.MergeProfilesLabelsResponse + 22, // 51: ingester.v1.IngesterService.MergeProfilesPprof:output_type -> ingester.v1.MergeProfilesPprofResponse + 13, // 52: ingester.v1.IngesterService.MergeSpanProfile:output_type -> ingester.v1.MergeSpanProfileResponse + 24, // 53: ingester.v1.IngesterService.BlockMetadata:output_type -> ingester.v1.BlockMetadataResponse + 44, // 54: ingester.v1.IngesterService.GetProfileStats:output_type -> types.v1.GetProfileStatsResponse + 28, // 55: ingester.v1.IngesterService.GetBlockStats:output_type -> ingester.v1.GetBlockStatsResponse + 43, // [43:56] is the sub-list for method output_type + 30, // [30:43] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name } func init() { file_ingester_v1_ingester_proto_init() } @@ -2403,6 +2618,42 @@ func file_ingester_v1_ingester_proto_init() { return nil } } + file_ingester_v1_ingester_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBlockStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ingester_v1_ingester_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBlockStatsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ingester_v1_ingester_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_ingester_v1_ingester_proto_msgTypes[6].OneofWrappers = []interface{}{} file_ingester_v1_ingester_proto_msgTypes[7].OneofWrappers = []interface{}{} @@ -2416,7 +2667,7 @@ func file_ingester_v1_ingester_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ingester_v1_ingester_proto_rawDesc, NumEnums: 1, - NumMessages: 26, + NumMessages: 29, NumExtensions: 0, NumServices: 1, }, diff --git a/api/gen/proto/go/ingester/v1/ingester_vtproto.pb.go b/api/gen/proto/go/ingester/v1/ingester_vtproto.pb.go index e65538cb4a..03ec9ac84f 100644 --- a/api/gen/proto/go/ingester/v1/ingester_vtproto.pb.go +++ b/api/gen/proto/go/ingester/v1/ingester_vtproto.pb.go @@ -700,6 +700,73 @@ func (m *BlockHints) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *GetBlockStatsRequest) CloneVT() *GetBlockStatsRequest { + if m == nil { + return (*GetBlockStatsRequest)(nil) + } + r := &GetBlockStatsRequest{} + if rhs := m.Ulids; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Ulids = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetBlockStatsRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *GetBlockStatsResponse) CloneVT() *GetBlockStatsResponse { + if m == nil { + return (*GetBlockStatsResponse)(nil) + } + r := &GetBlockStatsResponse{} + if rhs := m.BlockStats; rhs != nil { + tmpContainer := make([]*BlockStats, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.BlockStats = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *GetBlockStatsResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *BlockStats) CloneVT() *BlockStats { + if m == nil { + return (*BlockStats)(nil) + } + r := &BlockStats{ + NumSeries: m.NumSeries, + NumProfiles: m.NumProfiles, + NumSamples: m.NumSamples, + IndexBytes: m.IndexBytes, + ProfilesBytes: m.ProfilesBytes, + SymbolsBytes: m.SymbolsBytes, + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *BlockStats) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (this *ProfileTypesRequest) EqualVT(that *ProfileTypesRequest) bool { if this == that { return true @@ -1548,6 +1615,98 @@ func (this *BlockHints) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } +func (this *GetBlockStatsRequest) EqualVT(that *GetBlockStatsRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Ulids) != len(that.Ulids) { + return false + } + for i, vx := range this.Ulids { + vy := that.Ulids[i] + if vx != vy { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *GetBlockStatsRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*GetBlockStatsRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *GetBlockStatsResponse) EqualVT(that *GetBlockStatsResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.BlockStats) != len(that.BlockStats) { + return false + } + for i, vx := range this.BlockStats { + vy := that.BlockStats[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &BlockStats{} + } + if q == nil { + q = &BlockStats{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *GetBlockStatsResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*GetBlockStatsResponse) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *BlockStats) EqualVT(that *BlockStats) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.NumSeries != that.NumSeries { + return false + } + if this.NumProfiles != that.NumProfiles { + return false + } + if this.NumSamples != that.NumSamples { + return false + } + if this.IndexBytes != that.IndexBytes { + return false + } + if this.ProfilesBytes != that.ProfilesBytes { + return false + } + if this.SymbolsBytes != that.SymbolsBytes { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *BlockStats) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*BlockStats) + if !ok { + return false + } + return this.EqualVT(that) +} // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -1573,6 +1732,7 @@ type IngesterServiceClient interface { BlockMetadata(ctx context.Context, in *BlockMetadataRequest, opts ...grpc.CallOption) (*BlockMetadataResponse, error) // GetProfileStats returns profile stats for the current tenant. GetProfileStats(ctx context.Context, in *v1.GetProfileStatsRequest, opts ...grpc.CallOption) (*v1.GetProfileStatsResponse, error) + GetBlockStats(ctx context.Context, in *GetBlockStatsRequest, opts ...grpc.CallOption) (*GetBlockStatsResponse, error) } type ingesterServiceClient struct { @@ -1779,6 +1939,15 @@ func (c *ingesterServiceClient) GetProfileStats(ctx context.Context, in *v1.GetP return out, nil } +func (c *ingesterServiceClient) GetBlockStats(ctx context.Context, in *GetBlockStatsRequest, opts ...grpc.CallOption) (*GetBlockStatsResponse, error) { + out := new(GetBlockStatsResponse) + err := c.cc.Invoke(ctx, "/ingester.v1.IngesterService/GetBlockStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // IngesterServiceServer is the server API for IngesterService service. // All implementations must embed UnimplementedIngesterServiceServer // for forward compatibility @@ -1798,6 +1967,7 @@ type IngesterServiceServer interface { BlockMetadata(context.Context, *BlockMetadataRequest) (*BlockMetadataResponse, error) // GetProfileStats returns profile stats for the current tenant. GetProfileStats(context.Context, *v1.GetProfileStatsRequest) (*v1.GetProfileStatsResponse, error) + GetBlockStats(context.Context, *GetBlockStatsRequest) (*GetBlockStatsResponse, error) mustEmbedUnimplementedIngesterServiceServer() } @@ -1841,6 +2011,9 @@ func (UnimplementedIngesterServiceServer) BlockMetadata(context.Context, *BlockM func (UnimplementedIngesterServiceServer) GetProfileStats(context.Context, *v1.GetProfileStatsRequest) (*v1.GetProfileStatsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProfileStats not implemented") } +func (UnimplementedIngesterServiceServer) GetBlockStats(context.Context, *GetBlockStatsRequest) (*GetBlockStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockStats not implemented") +} func (UnimplementedIngesterServiceServer) mustEmbedUnimplementedIngesterServiceServer() {} // UnsafeIngesterServiceServer may be embedded to opt out of forward compatibility for this service. @@ -2102,6 +2275,24 @@ func _IngesterService_GetProfileStats_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _IngesterService_GetBlockStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IngesterServiceServer).GetBlockStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ingester.v1.IngesterService/GetBlockStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IngesterServiceServer).GetBlockStats(ctx, req.(*GetBlockStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // IngesterService_ServiceDesc is the grpc.ServiceDesc for IngesterService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -2141,6 +2332,10 @@ var IngesterService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetProfileStats", Handler: _IngesterService_GetProfileStats_Handler, }, + { + MethodName: "GetBlockStats", + Handler: _IngesterService_GetBlockStats_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -3723,93 +3918,243 @@ func (m *BlockHints) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *GetBlockStatsRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - dAtA[offset] = uint8(v) - return base + 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 *ProfileTypesRequest) SizeVT() (n int) { + +func (m *GetBlockStatsRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetBlockStatsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Start != 0 { - n += 1 + sov(uint64(m.Start)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.End != 0 { - n += 1 + sov(uint64(m.End)) + if len(m.Ulids) > 0 { + for iNdEx := len(m.Ulids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ulids[iNdEx]) + copy(dAtA[i:], m.Ulids[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Ulids[iNdEx]))) + i-- + dAtA[i] = 0xa + } } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *ProfileTypesResponse) SizeVT() (n int) { +func (m *GetBlockStatsResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if len(m.ProfileTypes) > 0 { - for _, e := range m.ProfileTypes { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) - } - n += 1 + l + sov(uint64(l)) - } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *SeriesRequest) SizeVT() (n int) { +func (m *GetBlockStatsResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *GetBlockStatsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if len(m.Matchers) > 0 { - for _, s := range m.Matchers { - l = len(s) - n += 1 + l + sov(uint64(l)) - } + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.LabelNames) > 0 { - for _, s := range m.LabelNames { - l = len(s) - n += 1 + l + sov(uint64(l)) + if len(m.BlockStats) > 0 { + for iNdEx := len(m.BlockStats) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.BlockStats[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } } - if m.Start != 0 { - n += 1 + sov(uint64(m.Start)) - } - if m.End != 0 { - n += 1 + sov(uint64(m.End)) - } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *SeriesResponse) SizeVT() (n int) { +func (m *BlockStats) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if len(m.LabelsSet) > 0 { - for _, e := range m.LabelsSet { - if size, ok := interface{}(e).(interface { - SizeVT() int + 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 *BlockStats) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BlockStats) 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 m.SymbolsBytes != 0 { + i = encodeVarint(dAtA, i, uint64(m.SymbolsBytes)) + i-- + dAtA[i] = 0x38 + } + if m.ProfilesBytes != 0 { + i = encodeVarint(dAtA, i, uint64(m.ProfilesBytes)) + i-- + dAtA[i] = 0x30 + } + if m.IndexBytes != 0 { + i = encodeVarint(dAtA, i, uint64(m.IndexBytes)) + i-- + dAtA[i] = 0x28 + } + if m.NumSamples != 0 { + i = encodeVarint(dAtA, i, uint64(m.NumSamples)) + i-- + dAtA[i] = 0x20 + } + if m.NumProfiles != 0 { + i = encodeVarint(dAtA, i, uint64(m.NumProfiles)) + i-- + dAtA[i] = 0x18 + } + if m.NumSeries != 0 { + i = encodeVarint(dAtA, i, uint64(m.NumSeries)) + i-- + dAtA[i] = 0x10 + } + return len(dAtA) - i, nil +} + +func encodeVarint(dAtA []byte, offset int, v uint64) int { + offset -= sov(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ProfileTypesRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Start != 0 { + n += 1 + sov(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sov(uint64(m.End)) + } + n += len(m.unknownFields) + return n +} + +func (m *ProfileTypesResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ProfileTypes) > 0 { + for _, e := range m.ProfileTypes { + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *SeriesRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Matchers) > 0 { + for _, s := range m.Matchers { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if len(m.LabelNames) > 0 { + for _, s := range m.LabelNames { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if m.Start != 0 { + n += 1 + sov(uint64(m.Start)) + } + if m.End != 0 { + n += 1 + sov(uint64(m.End)) + } + n += len(m.unknownFields) + return n +} + +func (m *SeriesResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LabelsSet) > 0 { + for _, e := range m.LabelsSet { + if size, ok := interface{}(e).(interface { + SizeVT() int }); ok { l = size.SizeVT() } else { @@ -4325,6 +4670,66 @@ func (m *BlockHints) SizeVT() (n int) { return n } +func (m *GetBlockStatsRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Ulids) > 0 { + for _, s := range m.Ulids { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *GetBlockStatsResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.BlockStats) > 0 { + for _, e := range m.BlockStats { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *BlockStats) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NumSeries != 0 { + n += 1 + sov(uint64(m.NumSeries)) + } + if m.NumProfiles != 0 { + n += 1 + sov(uint64(m.NumProfiles)) + } + if m.NumSamples != 0 { + n += 1 + sov(uint64(m.NumSamples)) + } + if m.IndexBytes != 0 { + n += 1 + sov(uint64(m.IndexBytes)) + } + if m.ProfilesBytes != 0 { + n += 1 + sov(uint64(m.ProfilesBytes)) + } + if m.SymbolsBytes != 0 { + n += 1 + sov(uint64(m.SymbolsBytes)) + } + n += len(m.unknownFields) + return n +} + func sov(x uint64) (n int) { return (bits.Len64(x|1) + 6) / 7 } @@ -7830,6 +8235,339 @@ func (m *BlockHints) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *GetBlockStatsRequest) 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: GetBlockStatsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetBlockStatsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ulids", 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.Ulids = append(m.Ulids, 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 (m *GetBlockStatsResponse) 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: GetBlockStatsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetBlockStatsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockStats", 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 + } + m.BlockStats = append(m.BlockStats, &BlockStats{}) + if err := m.BlockStats[len(m.BlockStats)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 (m *BlockStats) 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: BlockStats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockStats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumSeries", wireType) + } + m.NumSeries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumSeries |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumProfiles", wireType) + } + m.NumProfiles = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumProfiles |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumSamples", wireType) + } + m.NumSamples = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumSamples |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IndexBytes", wireType) + } + m.IndexBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IndexBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfilesBytes", wireType) + } + m.ProfilesBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProfilesBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SymbolsBytes", wireType) + } + m.SymbolsBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SymbolsBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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/api/gen/proto/go/ingester/v1/ingesterv1connect/ingester.connect.go b/api/gen/proto/go/ingester/v1/ingesterv1connect/ingester.connect.go index 0540374078..9f629348a5 100644 --- a/api/gen/proto/go/ingester/v1/ingesterv1connect/ingester.connect.go +++ b/api/gen/proto/go/ingester/v1/ingesterv1connect/ingester.connect.go @@ -68,6 +68,9 @@ const ( // IngesterServiceGetProfileStatsProcedure is the fully-qualified name of the IngesterService's // GetProfileStats RPC. IngesterServiceGetProfileStatsProcedure = "/ingester.v1.IngesterService/GetProfileStats" + // IngesterServiceGetBlockStatsProcedure is the fully-qualified name of the IngesterService's + // GetBlockStats RPC. + IngesterServiceGetBlockStatsProcedure = "/ingester.v1.IngesterService/GetBlockStats" ) // These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. @@ -85,6 +88,7 @@ var ( ingesterServiceMergeSpanProfileMethodDescriptor = ingesterServiceServiceDescriptor.Methods().ByName("MergeSpanProfile") ingesterServiceBlockMetadataMethodDescriptor = ingesterServiceServiceDescriptor.Methods().ByName("BlockMetadata") ingesterServiceGetProfileStatsMethodDescriptor = ingesterServiceServiceDescriptor.Methods().ByName("GetProfileStats") + ingesterServiceGetBlockStatsMethodDescriptor = ingesterServiceServiceDescriptor.Methods().ByName("GetBlockStats") ) // IngesterServiceClient is a client for the ingester.v1.IngesterService service. @@ -104,6 +108,7 @@ type IngesterServiceClient interface { BlockMetadata(context.Context, *connect.Request[v1.BlockMetadataRequest]) (*connect.Response[v1.BlockMetadataResponse], error) // GetProfileStats returns profile stats for the current tenant. GetProfileStats(context.Context, *connect.Request[v12.GetProfileStatsRequest]) (*connect.Response[v12.GetProfileStatsResponse], error) + GetBlockStats(context.Context, *connect.Request[v1.GetBlockStatsRequest]) (*connect.Response[v1.GetBlockStatsResponse], error) } // NewIngesterServiceClient constructs a client for the ingester.v1.IngesterService service. By @@ -188,6 +193,12 @@ func NewIngesterServiceClient(httpClient connect.HTTPClient, baseURL string, opt connect.WithSchema(ingesterServiceGetProfileStatsMethodDescriptor), connect.WithClientOptions(opts...), ), + getBlockStats: connect.NewClient[v1.GetBlockStatsRequest, v1.GetBlockStatsResponse]( + httpClient, + baseURL+IngesterServiceGetBlockStatsProcedure, + connect.WithSchema(ingesterServiceGetBlockStatsMethodDescriptor), + connect.WithClientOptions(opts...), + ), } } @@ -205,6 +216,7 @@ type ingesterServiceClient struct { mergeSpanProfile *connect.Client[v1.MergeSpanProfileRequest, v1.MergeSpanProfileResponse] blockMetadata *connect.Client[v1.BlockMetadataRequest, v1.BlockMetadataResponse] getProfileStats *connect.Client[v12.GetProfileStatsRequest, v12.GetProfileStatsResponse] + getBlockStats *connect.Client[v1.GetBlockStatsRequest, v1.GetBlockStatsResponse] } // Push calls ingester.v1.IngesterService.Push. @@ -267,6 +279,11 @@ func (c *ingesterServiceClient) GetProfileStats(ctx context.Context, req *connec return c.getProfileStats.CallUnary(ctx, req) } +// GetBlockStats calls ingester.v1.IngesterService.GetBlockStats. +func (c *ingesterServiceClient) GetBlockStats(ctx context.Context, req *connect.Request[v1.GetBlockStatsRequest]) (*connect.Response[v1.GetBlockStatsResponse], error) { + return c.getBlockStats.CallUnary(ctx, req) +} + // IngesterServiceHandler is an implementation of the ingester.v1.IngesterService service. type IngesterServiceHandler interface { Push(context.Context, *connect.Request[v11.PushRequest]) (*connect.Response[v11.PushResponse], error) @@ -284,6 +301,7 @@ type IngesterServiceHandler interface { BlockMetadata(context.Context, *connect.Request[v1.BlockMetadataRequest]) (*connect.Response[v1.BlockMetadataResponse], error) // GetProfileStats returns profile stats for the current tenant. GetProfileStats(context.Context, *connect.Request[v12.GetProfileStatsRequest]) (*connect.Response[v12.GetProfileStatsResponse], error) + GetBlockStats(context.Context, *connect.Request[v1.GetBlockStatsRequest]) (*connect.Response[v1.GetBlockStatsResponse], error) } // NewIngesterServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -364,6 +382,12 @@ func NewIngesterServiceHandler(svc IngesterServiceHandler, opts ...connect.Handl connect.WithSchema(ingesterServiceGetProfileStatsMethodDescriptor), connect.WithHandlerOptions(opts...), ) + ingesterServiceGetBlockStatsHandler := connect.NewUnaryHandler( + IngesterServiceGetBlockStatsProcedure, + svc.GetBlockStats, + connect.WithSchema(ingesterServiceGetBlockStatsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) return "/ingester.v1.IngesterService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case IngesterServicePushProcedure: @@ -390,6 +414,8 @@ func NewIngesterServiceHandler(svc IngesterServiceHandler, opts ...connect.Handl ingesterServiceBlockMetadataHandler.ServeHTTP(w, r) case IngesterServiceGetProfileStatsProcedure: ingesterServiceGetProfileStatsHandler.ServeHTTP(w, r) + case IngesterServiceGetBlockStatsProcedure: + ingesterServiceGetBlockStatsHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -446,3 +472,7 @@ func (UnimplementedIngesterServiceHandler) BlockMetadata(context.Context, *conne func (UnimplementedIngesterServiceHandler) GetProfileStats(context.Context, *connect.Request[v12.GetProfileStatsRequest]) (*connect.Response[v12.GetProfileStatsResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ingester.v1.IngesterService.GetProfileStats is not implemented")) } + +func (UnimplementedIngesterServiceHandler) GetBlockStats(context.Context, *connect.Request[v1.GetBlockStatsRequest]) (*connect.Response[v1.GetBlockStatsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("ingester.v1.IngesterService.GetBlockStats is not implemented")) +} diff --git a/api/gen/proto/go/ingester/v1/ingesterv1connect/ingester.connect.mux.go b/api/gen/proto/go/ingester/v1/ingesterv1connect/ingester.connect.mux.go index 96ac649a6f..a1c59579ff 100644 --- a/api/gen/proto/go/ingester/v1/ingesterv1connect/ingester.connect.mux.go +++ b/api/gen/proto/go/ingester/v1/ingesterv1connect/ingester.connect.mux.go @@ -79,4 +79,9 @@ func RegisterIngesterServiceHandler(mux *mux.Router, svc IngesterServiceHandler, svc.GetProfileStats, opts..., )) + mux.Handle("/ingester.v1.IngesterService/GetBlockStats", connect.NewUnaryHandler( + "/ingester.v1.IngesterService/GetBlockStats", + svc.GetBlockStats, + opts..., + )) } diff --git a/api/gen/proto/go/querier/v1/querier.pb.go b/api/gen/proto/go/querier/v1/querier.pb.go index f0063a3d58..3dd14c66bb 100644 --- a/api/gen/proto/go/querier/v1/querier.pb.go +++ b/api/gen/proto/go/querier/v1/querier.pb.go @@ -1189,16 +1189,13 @@ type AnalyzeQueryRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type QueryType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryType" json:"type,omitempty"` - ProfileTypesRequest *ProfileTypesRequest `protobuf:"bytes,2,opt,name=profile_types_request,json=profileTypesRequest,proto3" json:"profile_types_request,omitempty"` - LabelNamesRequest *v1.LabelNamesRequest `protobuf:"bytes,3,opt,name=label_names_request,json=labelNamesRequest,proto3" json:"label_names_request,omitempty"` - LabelValuesRequest *v1.LabelValuesRequest `protobuf:"bytes,4,opt,name=label_values_request,json=labelValuesRequest,proto3" json:"label_values_request,omitempty"` - SeriesRequest *SeriesRequest `protobuf:"bytes,5,opt,name=series_request,json=seriesRequest,proto3" json:"series_request,omitempty"` - FlamegraphRequest *SelectMergeStacktracesRequest `protobuf:"bytes,6,opt,name=flamegraph_request,json=flamegraphRequest,proto3" json:"flamegraph_request,omitempty"` - SpanProfileFlamegraphRequest *SelectMergeSpanProfileRequest `protobuf:"bytes,7,opt,name=span_profile_flamegraph_request,json=spanProfileFlamegraphRequest,proto3" json:"span_profile_flamegraph_request,omitempty"` - PprofRequest *SelectMergeProfileRequest `protobuf:"bytes,8,opt,name=pprof_request,json=pprofRequest,proto3" json:"pprof_request,omitempty"` - TimeseriesRequest *SelectSeriesRequest `protobuf:"bytes,9,opt,name=timeseries_request,json=timeseriesRequest,proto3" json:"timeseries_request,omitempty"` - DiffRequest *DiffRequest `protobuf:"bytes,10,opt,name=diff_request,json=diffRequest,proto3" json:"diff_request,omitempty"` + Type QueryType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryType" json:"type,omitempty"` + // Milliseconds since epoch. If missing or zero, only the ingesters will be + // queried. + Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` + // Milliseconds since epoch. If missing or zero, only the ingesters will be + // queried. + End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` } func (x *AnalyzeQueryRequest) Reset() { @@ -1240,67 +1237,18 @@ func (x *AnalyzeQueryRequest) GetType() QueryType { return QueryType_PROFILE_TYPES } -func (x *AnalyzeQueryRequest) GetProfileTypesRequest() *ProfileTypesRequest { - if x != nil { - return x.ProfileTypesRequest - } - return nil -} - -func (x *AnalyzeQueryRequest) GetLabelNamesRequest() *v1.LabelNamesRequest { - if x != nil { - return x.LabelNamesRequest - } - return nil -} - -func (x *AnalyzeQueryRequest) GetLabelValuesRequest() *v1.LabelValuesRequest { +func (x *AnalyzeQueryRequest) GetStart() int64 { if x != nil { - return x.LabelValuesRequest - } - return nil -} - -func (x *AnalyzeQueryRequest) GetSeriesRequest() *SeriesRequest { - if x != nil { - return x.SeriesRequest - } - return nil -} - -func (x *AnalyzeQueryRequest) GetFlamegraphRequest() *SelectMergeStacktracesRequest { - if x != nil { - return x.FlamegraphRequest - } - return nil -} - -func (x *AnalyzeQueryRequest) GetSpanProfileFlamegraphRequest() *SelectMergeSpanProfileRequest { - if x != nil { - return x.SpanProfileFlamegraphRequest - } - return nil -} - -func (x *AnalyzeQueryRequest) GetPprofRequest() *SelectMergeProfileRequest { - if x != nil { - return x.PprofRequest - } - return nil -} - -func (x *AnalyzeQueryRequest) GetTimeseriesRequest() *SelectSeriesRequest { - if x != nil { - return x.TimeseriesRequest + return x.Start } - return nil + return 0 } -func (x *AnalyzeQueryRequest) GetDiffRequest() *DiffRequest { +func (x *AnalyzeQueryRequest) GetEnd() int64 { if x != nil { - return x.DiffRequest + return x.End } - return nil + return 0 } type AnalyzeQueryResponse struct { @@ -1373,13 +1321,13 @@ type QueryScope struct { ComponentType string `protobuf:"bytes,1,opt,name=component_type,json=componentType,proto3" json:"component_type,omitempty"` // high level, e.g., "short term" or "long term" storage ComponentCount int64 `protobuf:"varint,2,opt,name=component_count,json=componentCount,proto3" json:"component_count,omitempty"` // how many components of this type will work on the query - NumBlocks int64 `protobuf:"varint,3,opt,name=num_blocks,json=numBlocks,proto3" json:"num_blocks,omitempty"` - NumSeries int64 `protobuf:"varint,4,opt,name=num_series,json=numSeries,proto3" json:"num_series,omitempty"` - NumProfiles int64 `protobuf:"varint,5,opt,name=num_profiles,json=numProfiles,proto3" json:"num_profiles,omitempty"` - NumSamples int64 `protobuf:"varint,6,opt,name=num_samples,json=numSamples,proto3" json:"num_samples,omitempty"` - IndexBytes int64 `protobuf:"varint,7,opt,name=index_bytes,json=indexBytes,proto3" json:"index_bytes,omitempty"` - ProfileBytes int64 `protobuf:"varint,8,opt,name=profile_bytes,json=profileBytes,proto3" json:"profile_bytes,omitempty"` - SymbolBytes int64 `protobuf:"varint,9,opt,name=symbol_bytes,json=symbolBytes,proto3" json:"symbol_bytes,omitempty"` + NumBlocks uint64 `protobuf:"varint,3,opt,name=num_blocks,json=numBlocks,proto3" json:"num_blocks,omitempty"` + NumSeries uint64 `protobuf:"varint,4,opt,name=num_series,json=numSeries,proto3" json:"num_series,omitempty"` + NumProfiles uint64 `protobuf:"varint,5,opt,name=num_profiles,json=numProfiles,proto3" json:"num_profiles,omitempty"` + NumSamples uint64 `protobuf:"varint,6,opt,name=num_samples,json=numSamples,proto3" json:"num_samples,omitempty"` + IndexBytes uint64 `protobuf:"varint,7,opt,name=index_bytes,json=indexBytes,proto3" json:"index_bytes,omitempty"` + ProfileBytes uint64 `protobuf:"varint,8,opt,name=profile_bytes,json=profileBytes,proto3" json:"profile_bytes,omitempty"` + SymbolBytes uint64 `protobuf:"varint,9,opt,name=symbol_bytes,json=symbolBytes,proto3" json:"symbol_bytes,omitempty"` } func (x *QueryScope) Reset() { @@ -1428,49 +1376,49 @@ func (x *QueryScope) GetComponentCount() int64 { return 0 } -func (x *QueryScope) GetNumBlocks() int64 { +func (x *QueryScope) GetNumBlocks() uint64 { if x != nil { return x.NumBlocks } return 0 } -func (x *QueryScope) GetNumSeries() int64 { +func (x *QueryScope) GetNumSeries() uint64 { if x != nil { return x.NumSeries } return 0 } -func (x *QueryScope) GetNumProfiles() int64 { +func (x *QueryScope) GetNumProfiles() uint64 { if x != nil { return x.NumProfiles } return 0 } -func (x *QueryScope) GetNumSamples() int64 { +func (x *QueryScope) GetNumSamples() uint64 { if x != nil { return x.NumSamples } return 0 } -func (x *QueryScope) GetIndexBytes() int64 { +func (x *QueryScope) GetIndexBytes() uint64 { if x != nil { return x.IndexBytes } return 0 } -func (x *QueryScope) GetProfileBytes() int64 { +func (x *QueryScope) GetProfileBytes() uint64 { if x != nil { return x.ProfileBytes } return 0 } -func (x *QueryScope) GetSymbolBytes() int64 { +func (x *QueryScope) GetSymbolBytes() uint64 { if x != nil { return x.SymbolBytes } @@ -1483,9 +1431,8 @@ type QueryImpact struct { unknownFields protoimpl.UnknownFields Type QueryImpactType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryImpactType" json:"type,omitempty"` - SubQueryCount int64 `protobuf:"varint,2,opt,name=sub_query_count,json=subQueryCount,proto3" json:"sub_query_count,omitempty"` - TotalBytesRead int64 `protobuf:"varint,3,opt,name=total_bytes_read,json=totalBytesRead,proto3" json:"total_bytes_read,omitempty"` - EstimatedTimeNanos int64 `protobuf:"varint,4,opt,name=estimated_time_nanos,json=estimatedTimeNanos,proto3" json:"estimated_time_nanos,omitempty"` // not sure how we can do this yet, but it would be a formula based on the query scopes above + TotalBytesRead uint64 `protobuf:"varint,2,opt,name=total_bytes_read,json=totalBytesRead,proto3" json:"total_bytes_read,omitempty"` + EstimatedTimeNanos int64 `protobuf:"varint,3,opt,name=estimated_time_nanos,json=estimatedTimeNanos,proto3" json:"estimated_time_nanos,omitempty"` } func (x *QueryImpact) Reset() { @@ -1527,14 +1474,7 @@ func (x *QueryImpact) GetType() QueryImpactType { return QueryImpactType_LOW } -func (x *QueryImpact) GetSubQueryCount() int64 { - if x != nil { - return x.SubQueryCount - } - return 0 -} - -func (x *QueryImpact) GetTotalBytesRead() int64 { +func (x *QueryImpact) GetTotalBytesRead() uint64 { if x != nil { return x.TotalBytesRead } @@ -1699,186 +1639,141 @@ var file_querier_v1_querier_proto_rawDesc = []byte{ 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x06, 0x73, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x98, 0x06, 0x0a, 0x13, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, - 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x68, 0x0a, 0x13, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, + 0xc3, 0x01, 0x0a, 0x14, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x71, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x39, + 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0b, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, + 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, + 0x9a, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, + 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, + 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x73, + 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6e, + 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x2a, 0xa2, 0x01, 0x0a, + 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, + 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, 0x12, 0x0f, 0x0a, + 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, + 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, 0x12, 0x1c, 0x0a, + 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4c, + 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x50, + 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, + 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x46, 0x46, 0x10, + 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, + 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, - 0x13, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x14, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x12, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0e, 0x73, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x73, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x12, - 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, - 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x11, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x1f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x70, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x19, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, + 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x1c, 0x73, 0x70, 0x61, 0x6e, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x46, 0x6c, 0x61, 0x6d, 0x65, 0x67, 0x72, 0x61, 0x70, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x0d, 0x70, 0x70, 0x72, 0x6f, - 0x66, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, + 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x00, + 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x0b, 0x64, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0xc3, 0x01, 0x0a, 0x14, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x71, 0x75, 0x65, 0x72, 0x79, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, - 0x39, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0b, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6e, 0x75, 0x6d, - 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, - 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x22, 0xc2, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, - 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x12, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x2a, 0xa2, 0x01, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, - 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, - 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, - 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, - 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, - 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, - 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, - 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, - 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x46, 0x46, 0x10, 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, - 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, - 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, - 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, - 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, - 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, - 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, - 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, - 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, - 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, - 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, - 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, - 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, - 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, - 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x17, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, + 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, + 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1923,8 +1818,8 @@ var file_querier_v1_querier_proto_goTypes = []interface{}{ (*v1.StackTraceSelector)(nil), // 24: types.v1.StackTraceSelector (v1.TimeSeriesAggregationType)(0), // 25: types.v1.TimeSeriesAggregationType (*v1.Series)(nil), // 26: types.v1.Series - (*v1.LabelNamesRequest)(nil), // 27: types.v1.LabelNamesRequest - (*v1.LabelValuesRequest)(nil), // 28: types.v1.LabelValuesRequest + (*v1.LabelValuesRequest)(nil), // 27: types.v1.LabelValuesRequest + (*v1.LabelNamesRequest)(nil), // 28: types.v1.LabelNamesRequest (*v1.GetProfileStatsRequest)(nil), // 29: types.v1.GetProfileStatsRequest (*v1.LabelValuesResponse)(nil), // 30: types.v1.LabelValuesResponse (*v1.LabelNamesResponse)(nil), // 31: types.v1.LabelNamesResponse @@ -1946,45 +1841,36 @@ var file_querier_v1_querier_proto_depIdxs = []int32{ 24, // 11: querier.v1.SelectSeriesRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector 26, // 12: querier.v1.SelectSeriesResponse.series:type_name -> types.v1.Series 0, // 13: querier.v1.AnalyzeQueryRequest.type:type_name -> querier.v1.QueryType - 2, // 14: querier.v1.AnalyzeQueryRequest.profile_types_request:type_name -> querier.v1.ProfileTypesRequest - 27, // 15: querier.v1.AnalyzeQueryRequest.label_names_request:type_name -> types.v1.LabelNamesRequest - 28, // 16: querier.v1.AnalyzeQueryRequest.label_values_request:type_name -> types.v1.LabelValuesRequest - 4, // 17: querier.v1.AnalyzeQueryRequest.series_request:type_name -> querier.v1.SeriesRequest - 6, // 18: querier.v1.AnalyzeQueryRequest.flamegraph_request:type_name -> querier.v1.SelectMergeStacktracesRequest - 8, // 19: querier.v1.AnalyzeQueryRequest.span_profile_flamegraph_request:type_name -> querier.v1.SelectMergeSpanProfileRequest - 15, // 20: querier.v1.AnalyzeQueryRequest.pprof_request:type_name -> querier.v1.SelectMergeProfileRequest - 16, // 21: querier.v1.AnalyzeQueryRequest.timeseries_request:type_name -> querier.v1.SelectSeriesRequest - 10, // 22: querier.v1.AnalyzeQueryRequest.diff_request:type_name -> querier.v1.DiffRequest - 20, // 23: querier.v1.AnalyzeQueryResponse.query_scopes:type_name -> querier.v1.QueryScope - 21, // 24: querier.v1.AnalyzeQueryResponse.query_impact:type_name -> querier.v1.QueryImpact - 1, // 25: querier.v1.QueryImpact.type:type_name -> querier.v1.QueryImpactType - 2, // 26: querier.v1.QuerierService.ProfileTypes:input_type -> querier.v1.ProfileTypesRequest - 28, // 27: querier.v1.QuerierService.LabelValues:input_type -> types.v1.LabelValuesRequest - 27, // 28: querier.v1.QuerierService.LabelNames:input_type -> types.v1.LabelNamesRequest - 4, // 29: querier.v1.QuerierService.Series:input_type -> querier.v1.SeriesRequest - 6, // 30: querier.v1.QuerierService.SelectMergeStacktraces:input_type -> querier.v1.SelectMergeStacktracesRequest - 8, // 31: querier.v1.QuerierService.SelectMergeSpanProfile:input_type -> querier.v1.SelectMergeSpanProfileRequest - 15, // 32: querier.v1.QuerierService.SelectMergeProfile:input_type -> querier.v1.SelectMergeProfileRequest - 16, // 33: querier.v1.QuerierService.SelectSeries:input_type -> querier.v1.SelectSeriesRequest - 10, // 34: querier.v1.QuerierService.Diff:input_type -> querier.v1.DiffRequest - 29, // 35: querier.v1.QuerierService.GetProfileStats:input_type -> types.v1.GetProfileStatsRequest - 18, // 36: querier.v1.QuerierService.AnalyzeQuery:input_type -> querier.v1.AnalyzeQueryRequest - 3, // 37: querier.v1.QuerierService.ProfileTypes:output_type -> querier.v1.ProfileTypesResponse - 30, // 38: querier.v1.QuerierService.LabelValues:output_type -> types.v1.LabelValuesResponse - 31, // 39: querier.v1.QuerierService.LabelNames:output_type -> types.v1.LabelNamesResponse - 5, // 40: querier.v1.QuerierService.Series:output_type -> querier.v1.SeriesResponse - 7, // 41: querier.v1.QuerierService.SelectMergeStacktraces:output_type -> querier.v1.SelectMergeStacktracesResponse - 9, // 42: querier.v1.QuerierService.SelectMergeSpanProfile:output_type -> querier.v1.SelectMergeSpanProfileResponse - 32, // 43: querier.v1.QuerierService.SelectMergeProfile:output_type -> google.v1.Profile - 17, // 44: querier.v1.QuerierService.SelectSeries:output_type -> querier.v1.SelectSeriesResponse - 11, // 45: querier.v1.QuerierService.Diff:output_type -> querier.v1.DiffResponse - 33, // 46: querier.v1.QuerierService.GetProfileStats:output_type -> types.v1.GetProfileStatsResponse - 19, // 47: querier.v1.QuerierService.AnalyzeQuery:output_type -> querier.v1.AnalyzeQueryResponse - 37, // [37:48] is the sub-list for method output_type - 26, // [26:37] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 20, // 14: querier.v1.AnalyzeQueryResponse.query_scopes:type_name -> querier.v1.QueryScope + 21, // 15: querier.v1.AnalyzeQueryResponse.query_impact:type_name -> querier.v1.QueryImpact + 1, // 16: querier.v1.QueryImpact.type:type_name -> querier.v1.QueryImpactType + 2, // 17: querier.v1.QuerierService.ProfileTypes:input_type -> querier.v1.ProfileTypesRequest + 27, // 18: querier.v1.QuerierService.LabelValues:input_type -> types.v1.LabelValuesRequest + 28, // 19: querier.v1.QuerierService.LabelNames:input_type -> types.v1.LabelNamesRequest + 4, // 20: querier.v1.QuerierService.Series:input_type -> querier.v1.SeriesRequest + 6, // 21: querier.v1.QuerierService.SelectMergeStacktraces:input_type -> querier.v1.SelectMergeStacktracesRequest + 8, // 22: querier.v1.QuerierService.SelectMergeSpanProfile:input_type -> querier.v1.SelectMergeSpanProfileRequest + 15, // 23: querier.v1.QuerierService.SelectMergeProfile:input_type -> querier.v1.SelectMergeProfileRequest + 16, // 24: querier.v1.QuerierService.SelectSeries:input_type -> querier.v1.SelectSeriesRequest + 10, // 25: querier.v1.QuerierService.Diff:input_type -> querier.v1.DiffRequest + 29, // 26: querier.v1.QuerierService.GetProfileStats:input_type -> types.v1.GetProfileStatsRequest + 18, // 27: querier.v1.QuerierService.AnalyzeQuery:input_type -> querier.v1.AnalyzeQueryRequest + 3, // 28: querier.v1.QuerierService.ProfileTypes:output_type -> querier.v1.ProfileTypesResponse + 30, // 29: querier.v1.QuerierService.LabelValues:output_type -> types.v1.LabelValuesResponse + 31, // 30: querier.v1.QuerierService.LabelNames:output_type -> types.v1.LabelNamesResponse + 5, // 31: querier.v1.QuerierService.Series:output_type -> querier.v1.SeriesResponse + 7, // 32: querier.v1.QuerierService.SelectMergeStacktraces:output_type -> querier.v1.SelectMergeStacktracesResponse + 9, // 33: querier.v1.QuerierService.SelectMergeSpanProfile:output_type -> querier.v1.SelectMergeSpanProfileResponse + 32, // 34: querier.v1.QuerierService.SelectMergeProfile:output_type -> google.v1.Profile + 17, // 35: querier.v1.QuerierService.SelectSeries:output_type -> querier.v1.SelectSeriesResponse + 11, // 36: querier.v1.QuerierService.Diff:output_type -> querier.v1.DiffResponse + 33, // 37: querier.v1.QuerierService.GetProfileStats:output_type -> types.v1.GetProfileStatsResponse + 19, // 38: querier.v1.QuerierService.AnalyzeQuery:output_type -> querier.v1.AnalyzeQueryResponse + 28, // [28:39] is the sub-list for method output_type + 17, // [17:28] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_querier_v1_querier_proto_init() } diff --git a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go index ed218a35c9..773bb35af1 100644 --- a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go +++ b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go @@ -444,28 +444,9 @@ func (m *AnalyzeQueryRequest) CloneVT() *AnalyzeQueryRequest { return (*AnalyzeQueryRequest)(nil) } r := &AnalyzeQueryRequest{ - Type: m.Type, - ProfileTypesRequest: m.ProfileTypesRequest.CloneVT(), - SeriesRequest: m.SeriesRequest.CloneVT(), - FlamegraphRequest: m.FlamegraphRequest.CloneVT(), - SpanProfileFlamegraphRequest: m.SpanProfileFlamegraphRequest.CloneVT(), - PprofRequest: m.PprofRequest.CloneVT(), - TimeseriesRequest: m.TimeseriesRequest.CloneVT(), - DiffRequest: m.DiffRequest.CloneVT(), - } - if rhs := m.LabelNamesRequest; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.LabelNamesRequest }); ok { - r.LabelNamesRequest = vtpb.CloneVT() - } else { - r.LabelNamesRequest = proto.Clone(rhs).(*v1.LabelNamesRequest) - } - } - if rhs := m.LabelValuesRequest; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *v1.LabelValuesRequest }); ok { - r.LabelValuesRequest = vtpb.CloneVT() - } else { - r.LabelValuesRequest = proto.Clone(rhs).(*v1.LabelValuesRequest) - } + Type: m.Type, + Start: m.Start, + End: m.End, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -540,7 +521,6 @@ func (m *QueryImpact) CloneVT() *QueryImpact { } r := &QueryImpact{ Type: m.Type, - SubQueryCount: m.SubQueryCount, TotalBytesRead: m.TotalBytesRead, EstimatedTimeNanos: m.EstimatedTimeNanos, } @@ -1106,43 +1086,10 @@ func (this *AnalyzeQueryRequest) EqualVT(that *AnalyzeQueryRequest) bool { if this.Type != that.Type { return false } - if !this.ProfileTypesRequest.EqualVT(that.ProfileTypesRequest) { - return false - } - if equal, ok := interface{}(this.LabelNamesRequest).(interface { - EqualVT(*v1.LabelNamesRequest) bool - }); ok { - if !equal.EqualVT(that.LabelNamesRequest) { - return false - } - } else if !proto.Equal(this.LabelNamesRequest, that.LabelNamesRequest) { - return false - } - if equal, ok := interface{}(this.LabelValuesRequest).(interface { - EqualVT(*v1.LabelValuesRequest) bool - }); ok { - if !equal.EqualVT(that.LabelValuesRequest) { - return false - } - } else if !proto.Equal(this.LabelValuesRequest, that.LabelValuesRequest) { - return false - } - if !this.SeriesRequest.EqualVT(that.SeriesRequest) { - return false - } - if !this.FlamegraphRequest.EqualVT(that.FlamegraphRequest) { - return false - } - if !this.SpanProfileFlamegraphRequest.EqualVT(that.SpanProfileFlamegraphRequest) { - return false - } - if !this.PprofRequest.EqualVT(that.PprofRequest) { - return false - } - if !this.TimeseriesRequest.EqualVT(that.TimeseriesRequest) { + if this.Start != that.Start { return false } - if !this.DiffRequest.EqualVT(that.DiffRequest) { + if this.End != that.End { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -1252,9 +1199,6 @@ func (this *QueryImpact) EqualVT(that *QueryImpact) bool { if this.Type != that.Type { return false } - if this.SubQueryCount != that.SubQueryCount { - return false - } if this.TotalBytesRead != that.TotalBytesRead { return false } @@ -2738,119 +2682,15 @@ func (m *AnalyzeQueryRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.DiffRequest != nil { - size, err := m.DiffRequest.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } - if m.TimeseriesRequest != nil { - size, err := m.TimeseriesRequest.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x4a - } - if m.PprofRequest != nil { - size, err := m.PprofRequest.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - if m.SpanProfileFlamegraphRequest != nil { - size, err := m.SpanProfileFlamegraphRequest.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - if m.FlamegraphRequest != nil { - size, err := m.FlamegraphRequest.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - if m.SeriesRequest != nil { - size, err := m.SeriesRequest.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - if m.LabelValuesRequest != nil { - if vtmsg, ok := interface{}(m.LabelValuesRequest).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.LabelValuesRequest) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0x22 - } - if m.LabelNamesRequest != nil { - if vtmsg, ok := interface{}(m.LabelNamesRequest).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.LabelNamesRequest) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) - } + if m.End != 0 { + i = encodeVarint(dAtA, i, uint64(m.End)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x18 } - if m.ProfileTypesRequest != nil { - size, err := m.ProfileTypesRequest.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if m.Start != 0 { + i = encodeVarint(dAtA, i, uint64(m.Start)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } if m.Type != 0 { i = encodeVarint(dAtA, i, uint64(m.Type)) @@ -3037,16 +2877,11 @@ func (m *QueryImpact) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m.EstimatedTimeNanos != 0 { i = encodeVarint(dAtA, i, uint64(m.EstimatedTimeNanos)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x18 } if m.TotalBytesRead != 0 { i = encodeVarint(dAtA, i, uint64(m.TotalBytesRead)) i-- - dAtA[i] = 0x18 - } - if m.SubQueryCount != 0 { - i = encodeVarint(dAtA, i, uint64(m.SubQueryCount)) - i-- dAtA[i] = 0x10 } if m.Type != 0 { @@ -3469,53 +3304,11 @@ func (m *AnalyzeQueryRequest) SizeVT() (n int) { if m.Type != 0 { n += 1 + sov(uint64(m.Type)) } - if m.ProfileTypesRequest != nil { - l = m.ProfileTypesRequest.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.LabelNamesRequest != nil { - if size, ok := interface{}(m.LabelNamesRequest).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.LabelNamesRequest) - } - n += 1 + l + sov(uint64(l)) - } - if m.LabelValuesRequest != nil { - if size, ok := interface{}(m.LabelValuesRequest).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.LabelValuesRequest) - } - n += 1 + l + sov(uint64(l)) - } - if m.SeriesRequest != nil { - l = m.SeriesRequest.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.FlamegraphRequest != nil { - l = m.FlamegraphRequest.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.SpanProfileFlamegraphRequest != nil { - l = m.SpanProfileFlamegraphRequest.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.PprofRequest != nil { - l = m.PprofRequest.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.TimeseriesRequest != nil { - l = m.TimeseriesRequest.SizeVT() - n += 1 + l + sov(uint64(l)) + if m.Start != 0 { + n += 1 + sov(uint64(m.Start)) } - if m.DiffRequest != nil { - l = m.DiffRequest.SizeVT() - n += 1 + l + sov(uint64(l)) + if m.End != 0 { + n += 1 + sov(uint64(m.End)) } n += len(m.unknownFields) return n @@ -3594,9 +3387,6 @@ func (m *QueryImpact) SizeVT() (n int) { if m.Type != 0 { n += 1 + sov(uint64(m.Type)) } - if m.SubQueryCount != 0 { - n += 1 + sov(uint64(m.SubQueryCount)) - } if m.TotalBytesRead != 0 { n += 1 + sov(uint64(m.TotalBytesRead)) } @@ -5897,10 +5687,10 @@ func (m *AnalyzeQueryRequest) UnmarshalVT(dAtA []byte) error { } } case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileTypesRequest", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) } - var msglen int + m.Start = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -5910,301 +5700,16 @@ func (m *AnalyzeQueryRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Start |= int64(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 m.ProfileTypesRequest == nil { - m.ProfileTypesRequest = &ProfileTypesRequest{} - } - if err := m.ProfileTypesRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelNamesRequest", 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 m.LabelNamesRequest == nil { - m.LabelNamesRequest = &v1.LabelNamesRequest{} - } - if unmarshal, ok := interface{}(m.LabelNamesRequest).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.LabelNamesRequest); err != nil { - return err - } - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelValuesRequest", 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 m.LabelValuesRequest == nil { - m.LabelValuesRequest = &v1.LabelValuesRequest{} - } - if unmarshal, ok := interface{}(m.LabelValuesRequest).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.LabelValuesRequest); err != nil { - return err - } - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SeriesRequest", 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 m.SeriesRequest == nil { - m.SeriesRequest = &SeriesRequest{} - } - if err := m.SeriesRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FlamegraphRequest", 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 m.FlamegraphRequest == nil { - m.FlamegraphRequest = &SelectMergeStacktracesRequest{} - } - if err := m.FlamegraphRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanProfileFlamegraphRequest", 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 m.SpanProfileFlamegraphRequest == nil { - m.SpanProfileFlamegraphRequest = &SelectMergeSpanProfileRequest{} - } - if err := m.SpanProfileFlamegraphRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PprofRequest", 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 m.PprofRequest == nil { - m.PprofRequest = &SelectMergeProfileRequest{} - } - if err := m.PprofRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeseriesRequest", 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 m.TimeseriesRequest == nil { - m.TimeseriesRequest = &SelectSeriesRequest{} - } - if err := m.TimeseriesRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DiffRequest", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) } - var msglen int + m.End = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6214,28 +5719,11 @@ func (m *AnalyzeQueryRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.End |= int64(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 m.DiffRequest == nil { - m.DiffRequest = &DiffRequest{} - } - if err := m.DiffRequest.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -6505,7 +5993,7 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumBlocks |= int64(b&0x7F) << shift + m.NumBlocks |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6524,7 +6012,7 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumSeries |= int64(b&0x7F) << shift + m.NumSeries |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6543,7 +6031,7 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumProfiles |= int64(b&0x7F) << shift + m.NumProfiles |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6562,7 +6050,7 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumSamples |= int64(b&0x7F) << shift + m.NumSamples |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6581,7 +6069,7 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.IndexBytes |= int64(b&0x7F) << shift + m.IndexBytes |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6600,7 +6088,7 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ProfileBytes |= int64(b&0x7F) << shift + m.ProfileBytes |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6619,7 +6107,7 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SymbolBytes |= int64(b&0x7F) << shift + m.SymbolBytes |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -6695,25 +6183,6 @@ func (m *QueryImpact) UnmarshalVT(dAtA []byte) error { } } case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SubQueryCount", wireType) - } - m.SubQueryCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SubQueryCount |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TotalBytesRead", wireType) } @@ -6727,12 +6196,12 @@ func (m *QueryImpact) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalBytesRead |= int64(b&0x7F) << shift + m.TotalBytesRead |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field EstimatedTimeNanos", wireType) } diff --git a/api/ingester/v1/ingester.proto b/api/ingester/v1/ingester.proto index b0063fcf76..86f64cc8c4 100644 --- a/api/ingester/v1/ingester.proto +++ b/api/ingester/v1/ingester.proto @@ -22,6 +22,7 @@ service IngesterService { rpc BlockMetadata(BlockMetadataRequest) returns (BlockMetadataResponse) {} // GetProfileStats returns profile stats for the current tenant. rpc GetProfileStats(types.v1.GetProfileStatsRequest) returns (types.v1.GetProfileStatsResponse) {} + rpc GetBlockStats(GetBlockStatsRequest) returns (GetBlockStatsResponse) {} } message ProfileTypesRequest { @@ -228,3 +229,20 @@ message BlockHints { // When all blocks are compacted, there is no effect of the replication factor, hence we do not need to run deduplication. bool deduplication = 2; } + +message GetBlockStatsRequest { + repeated string ulids = 1; +} + +message GetBlockStatsResponse { + repeated BlockStats block_stats = 1; +} + +message BlockStats { + uint64 num_series = 2; + uint64 num_profiles = 3; + uint64 num_samples = 4; + uint64 index_bytes = 5; + uint64 profiles_bytes = 6; + uint64 symbols_bytes = 7; +} diff --git a/api/openapiv2/gen/phlare.swagger.json b/api/openapiv2/gen/phlare.swagger.json index fce7fd1c58..31335afd8e 100644 --- a/api/openapiv2/gen/phlare.swagger.json +++ b/api/openapiv2/gen/phlare.swagger.json @@ -343,21 +343,6 @@ "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, - "querierv1ProfileTypesRequest": { - "type": "object", - "properties": { - "start": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch. If missing or zero, only the ingesters will be\nqueried." - }, - "end": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch. If missing or zero, only the ingesters will be\nqueried." - } - } - }, "querierv1ProfileTypesResponse": { "type": "object", "properties": { @@ -370,33 +355,6 @@ } } }, - "querierv1SeriesRequest": { - "type": "object", - "properties": { - "matchers": { - "type": "array", - "items": { - "type": "string" - } - }, - "labelNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "start": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch. If missing or zero, only the ingesters will be\nqueried." - }, - "end": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch. If missing or zero, only the ingesters will be\nqueried." - } - } - }, "querierv1SeriesResponse": { "type": "object", "properties": { @@ -592,27 +550,45 @@ } } }, - "v1CommitAuthor": { + "v1BlockStats": { "type": "object", "properties": { - "login": { + "numSeries": { "type": "string", - "title": "the author login" + "format": "uint64" }, - "avatarURL": { + "numProfiles": { "type": "string", - "title": "the author avatar URL" + "format": "uint64" + }, + "numSamples": { + "type": "string", + "format": "uint64" + }, + "indexBytes": { + "type": "string", + "format": "uint64" + }, + "profilesBytes": { + "type": "string", + "format": "uint64" + }, + "symbolsBytes": { + "type": "string", + "format": "uint64" } } }, - "v1DiffRequest": { + "v1CommitAuthor": { "type": "object", "properties": { - "left": { - "$ref": "#/definitions/v1SelectMergeStacktracesRequest" + "login": { + "type": "string", + "title": "the author login" }, - "right": { - "$ref": "#/definitions/v1SelectMergeStacktracesRequest" + "avatarURL": { + "type": "string", + "title": "the author avatar URL" } } }, @@ -717,6 +693,18 @@ } } }, + "v1GetBlockStatsResponse": { + "type": "object", + "properties": { + "blockStats": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1BlockStats" + } + } + } + }, "v1GetBuildInfoData": { "type": "object", "properties": { @@ -853,25 +841,6 @@ }, "title": "Hints are used to propagate information about querying" }, - "v1LabelNamesRequest": { - "type": "object", - "properties": { - "matchers": { - "type": "array", - "items": { - "type": "string" - } - }, - "start": { - "type": "string", - "format": "int64" - }, - "end": { - "type": "string", - "format": "int64" - } - } - }, "v1LabelNamesResponse": { "type": "object", "properties": { @@ -894,28 +863,6 @@ } } }, - "v1LabelValuesRequest": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "matchers": { - "type": "array", - "items": { - "type": "string" - } - }, - "start": { - "type": "string", - "format": "int64" - }, - "end": { - "type": "string", - "format": "int64" - } - } - }, "v1LabelValuesResponse": { "type": "object", "properties": { @@ -1173,18 +1120,13 @@ "type": { "$ref": "#/definitions/v1QueryImpactType" }, - "subQueryCount": { - "type": "string", - "format": "int64" - }, "totalBytesRead": { "type": "string", - "format": "int64" + "format": "uint64" }, "estimatedTimeNanos": { "type": "string", - "format": "int64", - "title": "not sure how we can do this yet, but it would be a formula based on the query scopes above" + "format": "int64" } } }, @@ -1211,31 +1153,31 @@ }, "numBlocks": { "type": "string", - "format": "int64" + "format": "uint64" }, "numSeries": { "type": "string", - "format": "int64" + "format": "uint64" }, "numProfiles": { "type": "string", - "format": "int64" + "format": "uint64" }, "numSamples": { "type": "string", - "format": "int64" + "format": "uint64" }, "indexBytes": { "type": "string", - "format": "int64" + "format": "uint64" }, "profileBytes": { "type": "string", - "format": "int64" + "format": "uint64" }, "symbolBytes": { "type": "string", - "format": "int64" + "format": "uint64" } } }, @@ -1321,68 +1263,6 @@ }, "description": "Each Sample records values encountered in some program\ncontext. The program context is typically a stack trace, perhaps\naugmented with auxiliary information like the thread-id, some\nindicator of a higher level request being handled etc." }, - "v1SelectMergeProfileRequest": { - "type": "object", - "properties": { - "profileTypeID": { - "type": "string" - }, - "labelSelector": { - "type": "string" - }, - "start": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch." - }, - "end": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch." - }, - "maxNodes": { - "type": "string", - "format": "int64", - "title": "Limit the nodes returned to only show the node with the max_node's biggest total" - }, - "stackTraceSelector": { - "$ref": "#/definitions/v1StackTraceSelector", - "description": "Select stack traces that match the provided selector." - } - } - }, - "v1SelectMergeSpanProfileRequest": { - "type": "object", - "properties": { - "profileTypeID": { - "type": "string" - }, - "labelSelector": { - "type": "string" - }, - "spanSelector": { - "type": "array", - "items": { - "type": "string" - } - }, - "start": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch." - }, - "end": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch." - }, - "maxNodes": { - "type": "string", - "format": "int64", - "title": "Limit the nodes returned to only show the node with the max_node's biggest total" - } - } - }, "v1SelectMergeSpanProfileResponse": { "type": "object", "properties": { @@ -1454,45 +1334,6 @@ } } }, - "v1SelectSeriesRequest": { - "type": "object", - "properties": { - "profileTypeID": { - "type": "string" - }, - "labelSelector": { - "type": "string" - }, - "start": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch." - }, - "end": { - "type": "string", - "format": "int64", - "description": "Milliseconds since epoch." - }, - "groupBy": { - "type": "array", - "items": { - "type": "string" - } - }, - "step": { - "type": "number", - "format": "double" - }, - "aggregation": { - "$ref": "#/definitions/v1TimeSeriesAggregationType", - "title": "Query resolution step width in seconds" - }, - "stackTraceSelector": { - "$ref": "#/definitions/v1StackTraceSelector", - "description": "Select stack traces that match the provided selector." - } - } - }, "v1SelectSeriesResponse": { "type": "object", "properties": { diff --git a/api/querier/v1/querier.proto b/api/querier/v1/querier.proto index fe1f16bc48..eef33912da 100644 --- a/api/querier/v1/querier.proto +++ b/api/querier/v1/querier.proto @@ -155,15 +155,12 @@ message SelectSeriesResponse { message AnalyzeQueryRequest { QueryType type = 1; - ProfileTypesRequest profile_types_request = 2; - types.v1.LabelNamesRequest label_names_request = 3; - types.v1.LabelValuesRequest label_values_request = 4; - SeriesRequest series_request = 5; - SelectMergeStacktracesRequest flamegraph_request = 6; - SelectMergeSpanProfileRequest span_profile_flamegraph_request = 7; - SelectMergeProfileRequest pprof_request = 8; - SelectSeriesRequest timeseries_request = 9; - DiffRequest diff_request = 10; + // Milliseconds since epoch. If missing or zero, only the ingesters will be + // queried. + int64 start = 2; + // Milliseconds since epoch. If missing or zero, only the ingesters will be + // queried. + int64 end = 3; } enum QueryType { @@ -189,20 +186,19 @@ message QueryScope { string component_type = 1; // high level, e.g., "short term" or "long term" storage int64 component_count = 2; // how many components of this type will work on the query - int64 num_blocks = 3; - int64 num_series = 4; - int64 num_profiles = 5; - int64 num_samples = 6; - int64 index_bytes = 7; - int64 profile_bytes = 8; - int64 symbol_bytes = 9; + uint64 num_blocks = 3; + uint64 num_series = 4; + uint64 num_profiles = 5; + uint64 num_samples = 6; + uint64 index_bytes = 7; + uint64 profile_bytes = 8; + uint64 symbol_bytes = 9; } message QueryImpact { QueryImpactType type = 1; - int64 sub_query_count = 2; - int64 total_bytes_read = 3; - int64 estimated_time_nanos = 4; // not sure how we can do this yet, but it would be a formula based on the query scopes above + uint64 total_bytes_read = 2; + int64 estimated_time_nanos = 3; } enum QueryImpactType { diff --git a/pkg/frontend/frontend_analyze_query.go b/pkg/frontend/frontend_analyze_query.go index e6e6d30374..145ca15397 100644 --- a/pkg/frontend/frontend_analyze_query.go +++ b/pkg/frontend/frontend_analyze_query.go @@ -4,13 +4,20 @@ import ( "context" "connectrpc.com/connect" + "github.com/opentracing/opentracing-go" querierv1 "github.com/grafana/pyroscope/api/gen/proto/go/querier/v1" + "github.com/grafana/pyroscope/api/gen/proto/go/querier/v1/querierv1connect" + "github.com/grafana/pyroscope/pkg/util/connectgrpc" ) func (f *Frontend) AnalyzeQuery(ctx context.Context, c *connect.Request[querierv1.AnalyzeQueryRequest]) ( *connect.Response[querierv1.AnalyzeQueryResponse], error, ) { - return nil, nil + opentracing.SpanFromContext(ctx) + + ctx = connectgrpc.WithProcedure(ctx, querierv1connect.QuerierServiceAnalyzeQueryProcedure) + res, err := connectgrpc.RoundTripUnary[querierv1.AnalyzeQueryRequest, querierv1.AnalyzeQueryResponse](ctx, f, c) + return res, err } diff --git a/pkg/ingester/query.go b/pkg/ingester/query.go index cb03e1c6e1..df188cfe91 100644 --- a/pkg/ingester/query.go +++ b/pkg/ingester/query.go @@ -68,9 +68,14 @@ func (i *Ingester) MergeSpanProfile(ctx context.Context, stream *connect.BidiStr }) } -// GetProfileStats returns func (i *Ingester) GetProfileStats(ctx context.Context, req *connect.Request[typesv1.GetProfileStatsRequest]) (*connect.Response[typesv1.GetProfileStatsResponse], error) { return forInstanceUnary(ctx, i, func(instance *instance) (*connect.Response[typesv1.GetProfileStatsResponse], error) { return instance.GetProfileStats(ctx, req) }) } + +func (i *Ingester) GetBlockStats(ctx context.Context, req *connect.Request[ingestv1.GetBlockStatsRequest]) (*connect.Response[ingestv1.GetBlockStatsResponse], error) { + return forInstanceUnary(ctx, i, func(instance *instance) (*connect.Response[ingestv1.GetBlockStatsResponse], error) { + return instance.GetBlockStats(ctx, req) + }) +} diff --git a/pkg/og/build/build.go b/pkg/og/build/build.go index c2c33e74b0..1f7938bf5d 100644 --- a/pkg/og/build/build.go +++ b/pkg/og/build/build.go @@ -34,7 +34,7 @@ GENERAL Build ID: %s Build Time: %s Git SHA: %s - Git Dirty Files: %d + Git Dirty FileStats: %d Embedded Assets: %t ` diff --git a/pkg/phlaredb/block/metadata.go b/pkg/phlaredb/block/metadata.go index 32c404edb3..0ed6c9066d 100644 --- a/pkg/phlaredb/block/metadata.go +++ b/pkg/phlaredb/block/metadata.go @@ -8,6 +8,7 @@ import ( "math" "os" "path/filepath" + "strings" "time" "github.com/go-kit/log" @@ -20,6 +21,7 @@ import ( "github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb/fileutil" + ingestv1 "github.com/grafana/pyroscope/api/gen/proto/go/ingester/v1" typesv1 "github.com/grafana/pyroscope/api/gen/proto/go/types/v1" ) @@ -107,6 +109,17 @@ type BlockDesc struct { MaxTime model.Time `json:"maxTime"` } +type MetaStats struct { + BlockStats + FileStats []FileStats + TotalSizeBytes uint64 +} + +type FileStats struct { + RelPath string + SizeBytes uint64 +} + // BlockMetaCompaction holds information about compactions a block went through. type BlockMetaCompaction struct { // Maximum number of compaction cycles any source block has @@ -328,6 +341,48 @@ func (meta *Meta) TSDBBlockMeta() tsdb.BlockMeta { } } +func (meta *Meta) GetStats() MetaStats { + fileStats := make([]FileStats, 0, len(meta.Files)) + totalSizeBytes := uint64(0) + for _, file := range meta.Files { + fileStats = append(fileStats, FileStats{ + RelPath: file.RelPath, + SizeBytes: file.SizeBytes, + }) + totalSizeBytes += file.SizeBytes + } + + return MetaStats{ + BlockStats: meta.Stats, + FileStats: fileStats, + TotalSizeBytes: totalSizeBytes, + } +} + +func (stats MetaStats) Convert() *ingestv1.BlockStats { + indexBytes := uint64(0) + profilesBytes := uint64(0) + symbolsBytes := uint64(0) + for _, f := range stats.FileStats { + if f.RelPath == IndexFilename { + indexBytes = f.SizeBytes + } else if f.RelPath == "profiles.parquet" { + profilesBytes += f.SizeBytes + } else if strings.HasPrefix(f.RelPath, "symbols") { + symbolsBytes += f.SizeBytes + } + } + blockStats := &ingestv1.BlockStats{ + NumSeries: stats.NumSeries, + NumProfiles: stats.NumProfiles, + NumSamples: stats.NumSamples, + IndexBytes: indexBytes, + ProfilesBytes: profilesBytes, + SymbolsBytes: symbolsBytes, + } + return blockStats +} + // ReadMetaFromDir reads the given meta from /meta.json. func ReadMetaFromDir(dir string) (*Meta, error) { f, err := os.Open(filepath.Join(dir, filepath.Clean(MetaFilename))) diff --git a/pkg/phlaredb/block_querier.go b/pkg/phlaredb/block_querier.go index b333054066..33afa3cf36 100644 --- a/pkg/phlaredb/block_querier.go +++ b/pkg/phlaredb/block_querier.go @@ -547,6 +547,10 @@ func (b *singleBlockQuerier) Bounds() (model.Time, model.Time) { return b.meta.MinTime, b.meta.MaxTime } +func (b *singleBlockQuerier) GetMetaStats() block.MetaStats { + return b.meta.GetStats() +} + type Profile interface { RowNumber() int64 StacktracePartition() uint64 diff --git a/pkg/phlaredb/head.go b/pkg/phlaredb/head.go index 74ecf28d92..849793ab89 100644 --- a/pkg/phlaredb/head.go +++ b/pkg/phlaredb/head.go @@ -562,7 +562,7 @@ func (h *Head) flush(ctx context.Context) error { return errors.Wrap(err, "flushing symdb") } for _, file := range h.symdb.Files() { - // Files' path is relative to the symdb dir. + // FileStats' path is relative to the symdb dir. file.RelPath = filepath.Join(symdb.DefaultDirName, file.RelPath) files = append(files, file) blockSize += file.SizeBytes @@ -638,3 +638,9 @@ func (h *Head) updateSymbolsMemUsage(memStats *symdb.MemoryStats) { m.WithLabelValues("mappings").Set(float64(memStats.MappingsSize)) m.WithLabelValues("strings").Set(float64(memStats.StringsSize)) } + +func (h *Head) GetMetaStats() block.MetaStats { + h.metaLock.RLock() + defer h.metaLock.RUnlock() + return h.meta.GetStats() +} diff --git a/pkg/phlaredb/phlaredb.go b/pkg/phlaredb/phlaredb.go index a6d4f81103..a205ee1055 100644 --- a/pkg/phlaredb/phlaredb.go +++ b/pkg/phlaredb/phlaredb.go @@ -8,6 +8,7 @@ import ( "math" "os" "path/filepath" + "slices" "sync" "time" @@ -580,3 +581,32 @@ func getProfileStatsFromBounds(minTimes, maxTimes []model.Time) (*typesv1.GetPro } return response, nil } + +func (f *PhlareDB) GetBlockStats(ctx context.Context, req *connect.Request[ingestv1.GetBlockStatsRequest]) (*connect.Response[ingestv1.GetBlockStatsResponse], error) { + sp, _ := opentracing.StartSpanFromContext(ctx, "PhlareDB GetBlockStats") + defer sp.Finish() + + res := &ingestv1.GetBlockStatsResponse{} + f.headLock.RLock() + for _, h := range f.heads { + if slices.Contains(req.Msg.GetUlids(), h.meta.ULID.String()) { + res.BlockStats = append(res.BlockStats, h.GetMetaStats().Convert()) + } + } + for _, h := range f.flushing { + if slices.Contains(req.Msg.GetUlids(), h.meta.ULID.String()) { + res.BlockStats = append(res.BlockStats, h.GetMetaStats().Convert()) + } + } + f.headLock.RUnlock() + + f.blockQuerier.queriersLock.RLock() + for _, q := range f.blockQuerier.queriers { + if slices.Contains(req.Msg.GetUlids(), q.meta.ULID.String()) { + res.BlockStats = append(res.BlockStats, q.GetMetaStats().Convert()) + } + } + f.blockQuerier.queriersLock.RUnlock() + + return connect.NewResponse(res), nil +} diff --git a/pkg/querier/ingester_querier.go b/pkg/querier/ingester_querier.go index aa35bbb3de..759ba729e9 100644 --- a/pkg/querier/ingester_querier.go +++ b/pkg/querier/ingester_querier.go @@ -33,6 +33,7 @@ type IngesterQueryClient interface { MergeSpanProfile(ctx context.Context) clientpool.BidiClientMergeSpanProfile BlockMetadata(ctx context.Context, req *connect.Request[ingestv1.BlockMetadataRequest]) (*connect.Response[ingestv1.BlockMetadataResponse], error) GetProfileStats(ctx context.Context, req *connect.Request[typesv1.GetProfileStatsRequest]) (*connect.Response[typesv1.GetProfileStatsResponse], error) + GetBlockStats(ctx context.Context, req *connect.Request[ingestv1.GetBlockStatsRequest]) (*connect.Response[ingestv1.GetBlockStatsResponse], error) } // IngesterQuerier helps with querying the ingesters. diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index d4e3c160eb..2a583f4916 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -354,7 +354,7 @@ func (q *Querier) blockSelect(ctx context.Context, start, end model.Time) (block results := newReplicasPerBlockID(q.logger) - // get first all blocks from store gateways, as they should be querier with a priority and also aret the only ones containing duplicated blocks because of replication + // get first all blocks from store gateways, as they should be querier with a priority and also are the only ones containing duplicated blocks because of replication if q.storeGatewayQuerier != nil { res, err := q.blockSelectFromStoreGateway(ctx, ingesterReq) if err != nil { @@ -575,7 +575,92 @@ func (q *Querier) GetProfileStats(ctx context.Context, req *connect.Request[type func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querierv1.AnalyzeQueryRequest]) (*connect.Response[querierv1.AnalyzeQueryResponse], error) { sp, ctx := opentracing.StartSpanFromContext(ctx, "AnalyzeQuery") defer sp.Finish() - return nil, nil + + plan, err := q.blockSelect(ctx, model.Time(req.Msg.Start), model.Time(req.Msg.End)) + if err != nil { + return nil, err + } + + storeGatewayReplicationSet, err := q.storeGatewayQuerier.ring.GetReplicationSetForOperation(readNoExtend) + if err != nil { + return nil, err + } + ingesterReplicationSet, err := q.ingesterQuerier.ring.GetReplicationSetForOperation(readNoExtend) + if err != nil { + return nil, err + } + storeGatewayQueryScope := &querierv1.QueryScope{ + ComponentType: "long-term-storage", + } + ingesterQueryScope := &querierv1.QueryScope{ + ComponentType: "short-term-storage", + } + ingesterBlockUlids := make([]string, 0) + storeGatewayBlockUlids := make([]string, 0) + for replica, blockHints := range plan { + if storeGatewayReplicationSet.Includes(replica) { + storeGatewayQueryScope.ComponentCount += 1 + storeGatewayQueryScope.NumBlocks += uint64(len(blockHints.Ulids)) + storeGatewayBlockUlids = append(storeGatewayBlockUlids, blockHints.Ulids...) + } else if ingesterReplicationSet.Includes(replica) { + ingesterQueryScope.ComponentCount += 1 + ingesterQueryScope.NumBlocks += uint64(len(blockHints.Ulids)) + ingesterBlockUlids = append(ingesterBlockUlids, blockHints.Ulids...) + } + } + + var responses []ResponseFromReplica[*ingestv1.GetBlockStatsResponse] + responses, err = forAllPlannedIngesters(ctx, q.ingesterQuerier, plan, func(ctx context.Context, iq IngesterQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { + stats, err := iq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: ingesterBlockUlids})) + return stats.Msg, err + }) + for _, r := range responses { + for _, stats := range r.response.BlockStats { + ingesterQueryScope.NumSeries += stats.NumSeries + ingesterQueryScope.NumProfiles += stats.NumProfiles + ingesterQueryScope.NumSamples += stats.NumSamples + ingesterQueryScope.IndexBytes += stats.IndexBytes + ingesterQueryScope.ProfileBytes += stats.ProfilesBytes + ingesterQueryScope.SymbolBytes += stats.SymbolsBytes + } + } + + tenantId, err := tenant.TenantID(ctx) + if err != nil { + return nil, err + } + responses, err = forAllPlannedStoreGateways(ctx, tenantId, q.storeGatewayQuerier, plan, func(ctx context.Context, sq StoreGatewayQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { + stats, err := sq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: ingesterBlockUlids})) + return stats.Msg, err + }) + for _, r := range responses { + for _, stats := range r.response.BlockStats { + storeGatewayQueryScope.NumSeries += stats.NumSeries + storeGatewayQueryScope.NumProfiles += stats.NumProfiles + storeGatewayQueryScope.NumSamples += stats.NumSamples + storeGatewayQueryScope.IndexBytes += stats.IndexBytes + storeGatewayQueryScope.ProfileBytes += stats.ProfilesBytes + storeGatewayQueryScope.SymbolBytes += stats.SymbolsBytes + } + } + totalBytes := ingesterQueryScope.IndexBytes + + ingesterQueryScope.ProfileBytes + + ingesterQueryScope.SymbolBytes + + storeGatewayQueryScope.IndexBytes + + storeGatewayQueryScope.ProfileBytes + + storeGatewayQueryScope.SymbolBytes + + res := &querierv1.AnalyzeQueryResponse{ + QueryValidationErrors: nil, + QueryScopes: []*querierv1.QueryScope{storeGatewayQueryScope, ingesterQueryScope}, + QueryImpact: &querierv1.QueryImpact{ + Type: querierv1.QueryImpactType_MEDIUM, // TODO + TotalBytesRead: totalBytes, + EstimatedTimeNanos: 0, // TODO + }, + } + + return connect.NewResponse(res), nil } func (q *Querier) SelectMergeStacktraces(ctx context.Context, req *connect.Request[querierv1.SelectMergeStacktracesRequest]) (*connect.Response[querierv1.SelectMergeStacktracesResponse], error) { diff --git a/pkg/querier/store_gateway_querier.go b/pkg/querier/store_gateway_querier.go index 1e7f4cb1fc..cf28c30dcc 100644 --- a/pkg/querier/store_gateway_querier.go +++ b/pkg/querier/store_gateway_querier.go @@ -39,6 +39,7 @@ type StoreGatewayQueryClient interface { LabelNames(context.Context, *connect.Request[typesv1.LabelNamesRequest]) (*connect.Response[typesv1.LabelNamesResponse], error) Series(context.Context, *connect.Request[ingestv1.SeriesRequest]) (*connect.Response[ingestv1.SeriesResponse], error) BlockMetadata(ctx context.Context, req *connect.Request[ingestv1.BlockMetadataRequest]) (*connect.Response[ingestv1.BlockMetadataResponse], error) + GetBlockStats(ctx context.Context, req *connect.Request[ingestv1.GetBlockStatsRequest]) (*connect.Response[ingestv1.GetBlockStatsResponse], error) } type StoreGatewayLimits interface { diff --git a/pkg/storegateway/query.go b/pkg/storegateway/query.go index aa166f7145..6f9c6589d1 100644 --- a/pkg/storegateway/query.go +++ b/pkg/storegateway/query.go @@ -3,6 +3,7 @@ package storegateway import ( "context" "io" + "slices" "connectrpc.com/connect" "github.com/pkg/errors" @@ -140,6 +141,25 @@ func (s *StoreGateway) BlockMetadata(ctx context.Context, req *connect.Request[i return connect.NewResponse(res), nil } +func (s *StoreGateway) GetBlockStats(ctx context.Context, req *connect.Request[ingestv1.GetBlockStatsRequest]) (*connect.Response[ingestv1.GetBlockStatsResponse], error) { + res := &ingestv1.GetBlockStatsResponse{} + _, err := s.forBucketStore(ctx, func(bs *BucketStore) error { + bs.blocksMx.RLock() + defer bs.blocksMx.RUnlock() + + for ulid, block := range bs.blocks { + if slices.Contains(req.Msg.Ulids, ulid.String()) { + res.BlockStats = append(res.BlockStats, block.meta.GetStats().Convert()) + } + } + return nil + }) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + return connect.NewResponse(res), nil +} + func terminateStream[Req, Resp any](stream *connect.BidiStream[Req, Resp]) (err error) { if _, err = stream.Receive(); err != nil { if errors.Is(err, io.EOF) { From 33169dc0024f08094a6b58e06be0222673961338 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 19 Apr 2024 07:45:03 -0300 Subject: [PATCH 03/27] Implement AnalyzeQuery, part 2 (wip) --- .../go/storegateway/v1/storegateway.pb.go | 82 +++++++++++-------- .../v1/storegateway_vtproto.pb.go | 36 ++++++++ .../storegateway.connect.go | 30 +++++++ .../storegateway.connect.mux.go | 5 ++ api/storegateway/v1/storegateway.proto | 1 + pkg/querier/querier.go | 44 +++++++++- pkg/querier/replication.go | 7 ++ 7 files changed, 165 insertions(+), 40 deletions(-) diff --git a/api/gen/proto/go/storegateway/v1/storegateway.pb.go b/api/gen/proto/go/storegateway/v1/storegateway.pb.go index 264d40e32e..a71ded2c3e 100644 --- a/api/gen/proto/go/storegateway/v1/storegateway.pb.go +++ b/api/gen/proto/go/storegateway/v1/storegateway.pb.go @@ -35,7 +35,7 @@ var file_storegateway_v1_storegateway_proto_rawDesc = []byte{ 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x70, 0x75, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xe7, 0x06, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x47, 0x61, + 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xc1, 0x07, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x18, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, @@ -89,21 +89,27 @@ var file_storegateway_v1_storegateway_proto_rawDesc = []byte{ 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xd3, - 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, - 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, - 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, - 0x02, 0x0f, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0f, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, + 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x21, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xd3, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x76, 0x31, + 0x42, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, + 0x53, 0x74, 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_storegateway_v1_storegateway_proto_goTypes = []interface{}{ @@ -116,15 +122,17 @@ var file_storegateway_v1_storegateway_proto_goTypes = []interface{}{ (*v11.LabelNamesRequest)(nil), // 6: types.v1.LabelNamesRequest (*v1.SeriesRequest)(nil), // 7: ingester.v1.SeriesRequest (*v1.BlockMetadataRequest)(nil), // 8: ingester.v1.BlockMetadataRequest - (*v1.MergeProfilesStacktracesResponse)(nil), // 9: ingester.v1.MergeProfilesStacktracesResponse - (*v1.MergeProfilesLabelsResponse)(nil), // 10: ingester.v1.MergeProfilesLabelsResponse - (*v1.MergeProfilesPprofResponse)(nil), // 11: ingester.v1.MergeProfilesPprofResponse - (*v1.MergeSpanProfileResponse)(nil), // 12: ingester.v1.MergeSpanProfileResponse - (*v1.ProfileTypesResponse)(nil), // 13: ingester.v1.ProfileTypesResponse - (*v11.LabelValuesResponse)(nil), // 14: types.v1.LabelValuesResponse - (*v11.LabelNamesResponse)(nil), // 15: types.v1.LabelNamesResponse - (*v1.SeriesResponse)(nil), // 16: ingester.v1.SeriesResponse - (*v1.BlockMetadataResponse)(nil), // 17: ingester.v1.BlockMetadataResponse + (*v1.GetBlockStatsRequest)(nil), // 9: ingester.v1.GetBlockStatsRequest + (*v1.MergeProfilesStacktracesResponse)(nil), // 10: ingester.v1.MergeProfilesStacktracesResponse + (*v1.MergeProfilesLabelsResponse)(nil), // 11: ingester.v1.MergeProfilesLabelsResponse + (*v1.MergeProfilesPprofResponse)(nil), // 12: ingester.v1.MergeProfilesPprofResponse + (*v1.MergeSpanProfileResponse)(nil), // 13: ingester.v1.MergeSpanProfileResponse + (*v1.ProfileTypesResponse)(nil), // 14: ingester.v1.ProfileTypesResponse + (*v11.LabelValuesResponse)(nil), // 15: types.v1.LabelValuesResponse + (*v11.LabelNamesResponse)(nil), // 16: types.v1.LabelNamesResponse + (*v1.SeriesResponse)(nil), // 17: ingester.v1.SeriesResponse + (*v1.BlockMetadataResponse)(nil), // 18: ingester.v1.BlockMetadataResponse + (*v1.GetBlockStatsResponse)(nil), // 19: ingester.v1.GetBlockStatsResponse } var file_storegateway_v1_storegateway_proto_depIdxs = []int32{ 0, // 0: storegateway.v1.StoreGatewayService.MergeProfilesStacktraces:input_type -> ingester.v1.MergeProfilesStacktracesRequest @@ -136,17 +144,19 @@ var file_storegateway_v1_storegateway_proto_depIdxs = []int32{ 6, // 6: storegateway.v1.StoreGatewayService.LabelNames:input_type -> types.v1.LabelNamesRequest 7, // 7: storegateway.v1.StoreGatewayService.Series:input_type -> ingester.v1.SeriesRequest 8, // 8: storegateway.v1.StoreGatewayService.BlockMetadata:input_type -> ingester.v1.BlockMetadataRequest - 9, // 9: storegateway.v1.StoreGatewayService.MergeProfilesStacktraces:output_type -> ingester.v1.MergeProfilesStacktracesResponse - 10, // 10: storegateway.v1.StoreGatewayService.MergeProfilesLabels:output_type -> ingester.v1.MergeProfilesLabelsResponse - 11, // 11: storegateway.v1.StoreGatewayService.MergeProfilesPprof:output_type -> ingester.v1.MergeProfilesPprofResponse - 12, // 12: storegateway.v1.StoreGatewayService.MergeSpanProfile:output_type -> ingester.v1.MergeSpanProfileResponse - 13, // 13: storegateway.v1.StoreGatewayService.ProfileTypes:output_type -> ingester.v1.ProfileTypesResponse - 14, // 14: storegateway.v1.StoreGatewayService.LabelValues:output_type -> types.v1.LabelValuesResponse - 15, // 15: storegateway.v1.StoreGatewayService.LabelNames:output_type -> types.v1.LabelNamesResponse - 16, // 16: storegateway.v1.StoreGatewayService.Series:output_type -> ingester.v1.SeriesResponse - 17, // 17: storegateway.v1.StoreGatewayService.BlockMetadata:output_type -> ingester.v1.BlockMetadataResponse - 9, // [9:18] is the sub-list for method output_type - 0, // [0:9] is the sub-list for method input_type + 9, // 9: storegateway.v1.StoreGatewayService.GetBlockStats:input_type -> ingester.v1.GetBlockStatsRequest + 10, // 10: storegateway.v1.StoreGatewayService.MergeProfilesStacktraces:output_type -> ingester.v1.MergeProfilesStacktracesResponse + 11, // 11: storegateway.v1.StoreGatewayService.MergeProfilesLabels:output_type -> ingester.v1.MergeProfilesLabelsResponse + 12, // 12: storegateway.v1.StoreGatewayService.MergeProfilesPprof:output_type -> ingester.v1.MergeProfilesPprofResponse + 13, // 13: storegateway.v1.StoreGatewayService.MergeSpanProfile:output_type -> ingester.v1.MergeSpanProfileResponse + 14, // 14: storegateway.v1.StoreGatewayService.ProfileTypes:output_type -> ingester.v1.ProfileTypesResponse + 15, // 15: storegateway.v1.StoreGatewayService.LabelValues:output_type -> types.v1.LabelValuesResponse + 16, // 16: storegateway.v1.StoreGatewayService.LabelNames:output_type -> types.v1.LabelNamesResponse + 17, // 17: storegateway.v1.StoreGatewayService.Series:output_type -> ingester.v1.SeriesResponse + 18, // 18: storegateway.v1.StoreGatewayService.BlockMetadata:output_type -> ingester.v1.BlockMetadataResponse + 19, // 19: storegateway.v1.StoreGatewayService.GetBlockStats:output_type -> ingester.v1.GetBlockStatsResponse + 10, // [10:20] is the sub-list for method output_type + 0, // [0:10] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name diff --git a/api/gen/proto/go/storegateway/v1/storegateway_vtproto.pb.go b/api/gen/proto/go/storegateway/v1/storegateway_vtproto.pb.go index bd467178b2..d17dbbb283 100644 --- a/api/gen/proto/go/storegateway/v1/storegateway_vtproto.pb.go +++ b/api/gen/proto/go/storegateway/v1/storegateway_vtproto.pb.go @@ -41,6 +41,7 @@ type StoreGatewayServiceClient interface { LabelNames(ctx context.Context, in *v11.LabelNamesRequest, opts ...grpc.CallOption) (*v11.LabelNamesResponse, error) Series(ctx context.Context, in *v1.SeriesRequest, opts ...grpc.CallOption) (*v1.SeriesResponse, error) BlockMetadata(ctx context.Context, in *v1.BlockMetadataRequest, opts ...grpc.CallOption) (*v1.BlockMetadataResponse, error) + GetBlockStats(ctx context.Context, in *v1.GetBlockStatsRequest, opts ...grpc.CallOption) (*v1.GetBlockStatsResponse, error) } type storeGatewayServiceClient struct { @@ -220,6 +221,15 @@ func (c *storeGatewayServiceClient) BlockMetadata(ctx context.Context, in *v1.Bl return out, nil } +func (c *storeGatewayServiceClient) GetBlockStats(ctx context.Context, in *v1.GetBlockStatsRequest, opts ...grpc.CallOption) (*v1.GetBlockStatsResponse, error) { + out := new(v1.GetBlockStatsResponse) + err := c.cc.Invoke(ctx, "/storegateway.v1.StoreGatewayService/GetBlockStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // StoreGatewayServiceServer is the server API for StoreGatewayService service. // All implementations must embed UnimplementedStoreGatewayServiceServer // for forward compatibility @@ -235,6 +245,7 @@ type StoreGatewayServiceServer interface { LabelNames(context.Context, *v11.LabelNamesRequest) (*v11.LabelNamesResponse, error) Series(context.Context, *v1.SeriesRequest) (*v1.SeriesResponse, error) BlockMetadata(context.Context, *v1.BlockMetadataRequest) (*v1.BlockMetadataResponse, error) + GetBlockStats(context.Context, *v1.GetBlockStatsRequest) (*v1.GetBlockStatsResponse, error) mustEmbedUnimplementedStoreGatewayServiceServer() } @@ -269,6 +280,9 @@ func (UnimplementedStoreGatewayServiceServer) Series(context.Context, *v1.Series func (UnimplementedStoreGatewayServiceServer) BlockMetadata(context.Context, *v1.BlockMetadataRequest) (*v1.BlockMetadataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BlockMetadata not implemented") } +func (UnimplementedStoreGatewayServiceServer) GetBlockStats(context.Context, *v1.GetBlockStatsRequest) (*v1.GetBlockStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockStats not implemented") +} func (UnimplementedStoreGatewayServiceServer) mustEmbedUnimplementedStoreGatewayServiceServer() {} // UnsafeStoreGatewayServiceServer may be embedded to opt out of forward compatibility for this service. @@ -476,6 +490,24 @@ func _StoreGatewayService_BlockMetadata_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } +func _StoreGatewayService_GetBlockStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetBlockStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoreGatewayServiceServer).GetBlockStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/storegateway.v1.StoreGatewayService/GetBlockStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoreGatewayServiceServer).GetBlockStats(ctx, req.(*v1.GetBlockStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // StoreGatewayService_ServiceDesc is the grpc.ServiceDesc for StoreGatewayService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -503,6 +535,10 @@ var StoreGatewayService_ServiceDesc = grpc.ServiceDesc{ MethodName: "BlockMetadata", Handler: _StoreGatewayService_BlockMetadata_Handler, }, + { + MethodName: "GetBlockStats", + Handler: _StoreGatewayService_GetBlockStats_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/gen/proto/go/storegateway/v1/storegatewayv1connect/storegateway.connect.go b/api/gen/proto/go/storegateway/v1/storegatewayv1connect/storegateway.connect.go index 835ac5de0d..c92896ddb6 100644 --- a/api/gen/proto/go/storegateway/v1/storegatewayv1connect/storegateway.connect.go +++ b/api/gen/proto/go/storegateway/v1/storegatewayv1connect/storegateway.connect.go @@ -62,6 +62,9 @@ const ( // StoreGatewayServiceBlockMetadataProcedure is the fully-qualified name of the // StoreGatewayService's BlockMetadata RPC. StoreGatewayServiceBlockMetadataProcedure = "/storegateway.v1.StoreGatewayService/BlockMetadata" + // StoreGatewayServiceGetBlockStatsProcedure is the fully-qualified name of the + // StoreGatewayService's GetBlockStats RPC. + StoreGatewayServiceGetBlockStatsProcedure = "/storegateway.v1.StoreGatewayService/GetBlockStats" ) // These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. @@ -76,6 +79,7 @@ var ( storeGatewayServiceLabelNamesMethodDescriptor = storeGatewayServiceServiceDescriptor.Methods().ByName("LabelNames") storeGatewayServiceSeriesMethodDescriptor = storeGatewayServiceServiceDescriptor.Methods().ByName("Series") storeGatewayServiceBlockMetadataMethodDescriptor = storeGatewayServiceServiceDescriptor.Methods().ByName("BlockMetadata") + storeGatewayServiceGetBlockStatsMethodDescriptor = storeGatewayServiceServiceDescriptor.Methods().ByName("GetBlockStats") ) // StoreGatewayServiceClient is a client for the storegateway.v1.StoreGatewayService service. @@ -91,6 +95,7 @@ type StoreGatewayServiceClient interface { LabelNames(context.Context, *connect.Request[v12.LabelNamesRequest]) (*connect.Response[v12.LabelNamesResponse], error) Series(context.Context, *connect.Request[v11.SeriesRequest]) (*connect.Response[v11.SeriesResponse], error) BlockMetadata(context.Context, *connect.Request[v11.BlockMetadataRequest]) (*connect.Response[v11.BlockMetadataResponse], error) + GetBlockStats(context.Context, *connect.Request[v11.GetBlockStatsRequest]) (*connect.Response[v11.GetBlockStatsResponse], error) } // NewStoreGatewayServiceClient constructs a client for the storegateway.v1.StoreGatewayService @@ -157,6 +162,12 @@ func NewStoreGatewayServiceClient(httpClient connect.HTTPClient, baseURL string, connect.WithSchema(storeGatewayServiceBlockMetadataMethodDescriptor), connect.WithClientOptions(opts...), ), + getBlockStats: connect.NewClient[v11.GetBlockStatsRequest, v11.GetBlockStatsResponse]( + httpClient, + baseURL+StoreGatewayServiceGetBlockStatsProcedure, + connect.WithSchema(storeGatewayServiceGetBlockStatsMethodDescriptor), + connect.WithClientOptions(opts...), + ), } } @@ -171,6 +182,7 @@ type storeGatewayServiceClient struct { labelNames *connect.Client[v12.LabelNamesRequest, v12.LabelNamesResponse] series *connect.Client[v11.SeriesRequest, v11.SeriesResponse] blockMetadata *connect.Client[v11.BlockMetadataRequest, v11.BlockMetadataResponse] + getBlockStats *connect.Client[v11.GetBlockStatsRequest, v11.GetBlockStatsResponse] } // MergeProfilesStacktraces calls storegateway.v1.StoreGatewayService.MergeProfilesStacktraces. @@ -218,6 +230,11 @@ func (c *storeGatewayServiceClient) BlockMetadata(ctx context.Context, req *conn return c.blockMetadata.CallUnary(ctx, req) } +// GetBlockStats calls storegateway.v1.StoreGatewayService.GetBlockStats. +func (c *storeGatewayServiceClient) GetBlockStats(ctx context.Context, req *connect.Request[v11.GetBlockStatsRequest]) (*connect.Response[v11.GetBlockStatsResponse], error) { + return c.getBlockStats.CallUnary(ctx, req) +} + // StoreGatewayServiceHandler is an implementation of the storegateway.v1.StoreGatewayService // service. type StoreGatewayServiceHandler interface { @@ -232,6 +249,7 @@ type StoreGatewayServiceHandler interface { LabelNames(context.Context, *connect.Request[v12.LabelNamesRequest]) (*connect.Response[v12.LabelNamesResponse], error) Series(context.Context, *connect.Request[v11.SeriesRequest]) (*connect.Response[v11.SeriesResponse], error) BlockMetadata(context.Context, *connect.Request[v11.BlockMetadataRequest]) (*connect.Response[v11.BlockMetadataResponse], error) + GetBlockStats(context.Context, *connect.Request[v11.GetBlockStatsRequest]) (*connect.Response[v11.GetBlockStatsResponse], error) } // NewStoreGatewayServiceHandler builds an HTTP handler from the service implementation. It returns @@ -294,6 +312,12 @@ func NewStoreGatewayServiceHandler(svc StoreGatewayServiceHandler, opts ...conne connect.WithSchema(storeGatewayServiceBlockMetadataMethodDescriptor), connect.WithHandlerOptions(opts...), ) + storeGatewayServiceGetBlockStatsHandler := connect.NewUnaryHandler( + StoreGatewayServiceGetBlockStatsProcedure, + svc.GetBlockStats, + connect.WithSchema(storeGatewayServiceGetBlockStatsMethodDescriptor), + connect.WithHandlerOptions(opts...), + ) return "/storegateway.v1.StoreGatewayService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case StoreGatewayServiceMergeProfilesStacktracesProcedure: @@ -314,6 +338,8 @@ func NewStoreGatewayServiceHandler(svc StoreGatewayServiceHandler, opts ...conne storeGatewayServiceSeriesHandler.ServeHTTP(w, r) case StoreGatewayServiceBlockMetadataProcedure: storeGatewayServiceBlockMetadataHandler.ServeHTTP(w, r) + case StoreGatewayServiceGetBlockStatsProcedure: + storeGatewayServiceGetBlockStatsHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -358,3 +384,7 @@ func (UnimplementedStoreGatewayServiceHandler) Series(context.Context, *connect. func (UnimplementedStoreGatewayServiceHandler) BlockMetadata(context.Context, *connect.Request[v11.BlockMetadataRequest]) (*connect.Response[v11.BlockMetadataResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("storegateway.v1.StoreGatewayService.BlockMetadata is not implemented")) } + +func (UnimplementedStoreGatewayServiceHandler) GetBlockStats(context.Context, *connect.Request[v11.GetBlockStatsRequest]) (*connect.Response[v11.GetBlockStatsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("storegateway.v1.StoreGatewayService.GetBlockStats is not implemented")) +} diff --git a/api/gen/proto/go/storegateway/v1/storegatewayv1connect/storegateway.connect.mux.go b/api/gen/proto/go/storegateway/v1/storegatewayv1connect/storegateway.connect.mux.go index 1c941439cc..0bce6821b9 100644 --- a/api/gen/proto/go/storegateway/v1/storegatewayv1connect/storegateway.connect.mux.go +++ b/api/gen/proto/go/storegateway/v1/storegatewayv1connect/storegateway.connect.mux.go @@ -64,4 +64,9 @@ func RegisterStoreGatewayServiceHandler(mux *mux.Router, svc StoreGatewayService svc.BlockMetadata, opts..., )) + mux.Handle("/storegateway.v1.StoreGatewayService/GetBlockStats", connect.NewUnaryHandler( + "/storegateway.v1.StoreGatewayService/GetBlockStats", + svc.GetBlockStats, + opts..., + )) } diff --git a/api/storegateway/v1/storegateway.proto b/api/storegateway/v1/storegateway.proto index 102abf9423..c81436659c 100644 --- a/api/storegateway/v1/storegateway.proto +++ b/api/storegateway/v1/storegateway.proto @@ -19,4 +19,5 @@ service StoreGatewayService { rpc LabelNames(types.v1.LabelNamesRequest) returns (types.v1.LabelNamesResponse) {} rpc Series(ingester.v1.SeriesRequest) returns (ingester.v1.SeriesResponse) {} rpc BlockMetadata(ingester.v1.BlockMetadataRequest) returns (ingester.v1.BlockMetadataResponse) {} + rpc GetBlockStats(ingester.v1.GetBlockStatsRequest) returns (ingester.v1.GetBlockStatsResponse) {} } diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 2a583f4916..15df2e03cc 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -576,10 +576,29 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier sp, ctx := opentracing.StartSpanFromContext(ctx, "AnalyzeQuery") defer sp.Finish() - plan, err := q.blockSelect(ctx, model.Time(req.Msg.Start), model.Time(req.Msg.End)) + ingesterReq := &ingestv1.BlockMetadataRequest{ + Start: req.Msg.Start, + End: req.Msg.End, + } + + resultsIngesters := newReplicasPerBlockID(q.logger) + blockSelectIngesters, err := q.blockSelectFromIngesters(ctx, ingesterReq) + if err != nil { + return nil, err + } + resultsIngesters.add(blockSelectIngesters, ingesterInstance) + + resultsStoreGateways := newReplicasPerBlockID(q.logger) + blockSelectStoreGateways, err := q.blockSelectFromStoreGateway(ctx, ingesterReq) if err != nil { return nil, err } + resultsStoreGateways.add(blockSelectStoreGateways, storeGatewayInstance) + + joinedResults := newReplicasPerBlockID(q.logger) + joinedResults.add(blockSelectStoreGateways, storeGatewayInstance) + joinedResults.add(blockSelectStoreGateways, ingesterInstance) + plan := joinedResults.blockPlan(ctx) storeGatewayReplicationSet, err := q.storeGatewayQuerier.ring.GetReplicationSetForOperation(readNoExtend) if err != nil { @@ -590,15 +609,32 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier return nil, err } storeGatewayQueryScope := &querierv1.QueryScope{ - ComponentType: "long-term-storage", + ComponentType: "long-term-storage", + ComponentCount: 0, } ingesterQueryScope := &querierv1.QueryScope{ - ComponentType: "short-term-storage", + ComponentType: "short-term-storage", + ComponentCount: 0, } ingesterBlockUlids := make([]string, 0) storeGatewayBlockUlids := make([]string, 0) for replica, blockHints := range plan { - if storeGatewayReplicationSet.Includes(replica) { + if len(blockHints.Ulids) == 0 { + continue + } + if storeGatewayReplicationSet.Includes(replica) && ingesterReplicationSet.Includes(replica) { // -target=all + for _, ulid := range blockHints.Ulids { + if resultsIngesters.contains(ulid) { + ingesterQueryScope.ComponentCount += 1 + ingesterQueryScope.NumBlocks += 1 + ingesterBlockUlids = append(ingesterBlockUlids, ulid) + } else if resultsStoreGateways.contains(ulid) { + storeGatewayQueryScope.ComponentCount += 1 + storeGatewayQueryScope.NumBlocks += 1 + storeGatewayBlockUlids = append(storeGatewayBlockUlids, ulid) + } + } + } else if storeGatewayReplicationSet.Includes(replica) { storeGatewayQueryScope.ComponentCount += 1 storeGatewayQueryScope.NumBlocks += uint64(len(blockHints.Ulids)) storeGatewayBlockUlids = append(storeGatewayBlockUlids, blockHints.Ulids...) diff --git a/pkg/querier/replication.go b/pkg/querier/replication.go index 2969c9ee0e..c5013c9701 100644 --- a/pkg/querier/replication.go +++ b/pkg/querier/replication.go @@ -454,3 +454,10 @@ func (r *replicasPerBlockID) blockPlan(ctx context.Context) map[string]*ingestv1 return plan } + +func (r *replicasPerBlockID) contains(ulid string) bool { + if replicas, ok := r.m[ulid]; ok { + return len(replicas) > 0 + } + return false +} From 160083cf7045b11292afc696106ea22b7eb01421 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 19 Apr 2024 09:53:46 -0300 Subject: [PATCH 04/27] Fix bug --- pkg/querier/querier.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 15df2e03cc..f51561ec9f 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -597,7 +597,7 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier joinedResults := newReplicasPerBlockID(q.logger) joinedResults.add(blockSelectStoreGateways, storeGatewayInstance) - joinedResults.add(blockSelectStoreGateways, ingesterInstance) + joinedResults.add(blockSelectIngesters, ingesterInstance) plan := joinedResults.blockPlan(ctx) storeGatewayReplicationSet, err := q.storeGatewayQuerier.ring.GetReplicationSetForOperation(readNoExtend) @@ -648,6 +648,9 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier var responses []ResponseFromReplica[*ingestv1.GetBlockStatsResponse] responses, err = forAllPlannedIngesters(ctx, q.ingesterQuerier, plan, func(ctx context.Context, iq IngesterQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { stats, err := iq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: ingesterBlockUlids})) + if err != nil { + return nil, err + } return stats.Msg, err }) for _, r := range responses { From 6238b1469f6d658805a56f73d1922ce1c308bb94 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:24:27 -0300 Subject: [PATCH 05/27] Fix bug --- pkg/querier/querier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index f51561ec9f..75627da9c9 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -669,7 +669,7 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier return nil, err } responses, err = forAllPlannedStoreGateways(ctx, tenantId, q.storeGatewayQuerier, plan, func(ctx context.Context, sq StoreGatewayQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { - stats, err := sq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: ingesterBlockUlids})) + stats, err := sq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: storeGatewayBlockUlids})) return stats.Msg, err }) for _, r := range responses { From 832e79e114ef8883fef57cf86357180d07c9e736 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:32:30 -0300 Subject: [PATCH 06/27] Reorder query scopes --- pkg/querier/querier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 75627da9c9..2ea319100d 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -691,7 +691,7 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier res := &querierv1.AnalyzeQueryResponse{ QueryValidationErrors: nil, - QueryScopes: []*querierv1.QueryScope{storeGatewayQueryScope, ingesterQueryScope}, + QueryScopes: []*querierv1.QueryScope{ingesterQueryScope, storeGatewayQueryScope}, QueryImpact: &querierv1.QueryImpact{ Type: querierv1.QueryImpactType_MEDIUM, // TODO TotalBytesRead: totalBytes, From 8dd77e26ca1ea52ab76d3adb05225e4e4bcd3035 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 19 Apr 2024 16:26:59 -0300 Subject: [PATCH 07/27] Add queries series stat --- api/gen/proto/go/querier/v1/querier.pb.go | 293 +++++++++--------- .../proto/go/querier/v1/querier_vtproto.pb.go | 136 ++++---- api/openapiv2/gen/phlare.swagger.json | 10 +- api/querier/v1/querier.proto | 10 +- pkg/querier/querier.go | 23 +- 5 files changed, 232 insertions(+), 240 deletions(-) diff --git a/api/gen/proto/go/querier/v1/querier.pb.go b/api/gen/proto/go/querier/v1/querier.pb.go index 3dd14c66bb..4820582052 100644 --- a/api/gen/proto/go/querier/v1/querier.pb.go +++ b/api/gen/proto/go/querier/v1/querier.pb.go @@ -1195,7 +1195,8 @@ type AnalyzeQueryRequest struct { Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` // Milliseconds since epoch. If missing or zero, only the ingesters will be // queried. - End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` + End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` + LabelSelector string `protobuf:"bytes,4,opt,name=label_selector,json=labelSelector,proto3" json:"label_selector,omitempty"` } func (x *AnalyzeQueryRequest) Reset() { @@ -1251,14 +1252,20 @@ func (x *AnalyzeQueryRequest) GetEnd() int64 { return 0 } +func (x *AnalyzeQueryRequest) GetLabelSelector() string { + if x != nil { + return x.LabelSelector + } + return "" +} + type AnalyzeQueryResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryValidationErrors []string `protobuf:"bytes,1,rep,name=queryValidationErrors,proto3" json:"queryValidationErrors,omitempty"` - QueryScopes []*QueryScope `protobuf:"bytes,2,rep,name=query_scopes,json=queryScopes,proto3" json:"query_scopes,omitempty"` // detailed view of what the query will require - QueryImpact *QueryImpact `protobuf:"bytes,3,opt,name=query_impact,json=queryImpact,proto3" json:"query_impact,omitempty"` // summary of the query impact / performance + QueryScopes []*QueryScope `protobuf:"bytes,1,rep,name=query_scopes,json=queryScopes,proto3" json:"query_scopes,omitempty"` // detailed view of what the query will require + QueryImpact *QueryImpact `protobuf:"bytes,2,opt,name=query_impact,json=queryImpact,proto3" json:"query_impact,omitempty"` // summary of the query impact / performance } func (x *AnalyzeQueryResponse) Reset() { @@ -1293,13 +1300,6 @@ func (*AnalyzeQueryResponse) Descriptor() ([]byte, []int) { return file_querier_v1_querier_proto_rawDescGZIP(), []int{17} } -func (x *AnalyzeQueryResponse) GetQueryValidationErrors() []string { - if x != nil { - return x.QueryValidationErrors - } - return nil -} - func (x *AnalyzeQueryResponse) GetQueryScopes() []*QueryScope { if x != nil { return x.QueryScopes @@ -1432,7 +1432,7 @@ type QueryImpact struct { Type QueryImpactType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryImpactType" json:"type,omitempty"` TotalBytesRead uint64 `protobuf:"varint,2,opt,name=total_bytes_read,json=totalBytesRead,proto3" json:"total_bytes_read,omitempty"` - EstimatedTimeNanos int64 `protobuf:"varint,3,opt,name=estimated_time_nanos,json=estimatedTimeNanos,proto3" json:"estimated_time_nanos,omitempty"` + TotalQueriedSeries uint64 `protobuf:"varint,3,opt,name=total_queried_series,json=totalQueriedSeries,proto3" json:"total_queried_series,omitempty"` } func (x *QueryImpact) Reset() { @@ -1481,9 +1481,9 @@ func (x *QueryImpact) GetTotalBytesRead() uint64 { return 0 } -func (x *QueryImpact) GetEstimatedTimeNanos() int64 { +func (x *QueryImpact) GetTotalQueriedSeries() uint64 { if x != nil { - return x.EstimatedTimeNanos + return x.TotalQueriedSeries } return 0 } @@ -1639,141 +1639,140 @@ var file_querier_v1_querier_proto_rawDesc = []byte{ 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x06, 0x73, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x68, 0x0a, 0x13, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, - 0xc3, 0x01, 0x0a, 0x14, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x71, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x39, - 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0b, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, - 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x53, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, - 0x9a, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, - 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, - 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x73, - 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6e, - 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, - 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x2a, 0xa2, 0x01, 0x0a, - 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, - 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, 0x12, 0x0f, 0x0a, - 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x01, 0x12, 0x10, - 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, - 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, 0x12, 0x1c, 0x0a, - 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4c, - 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x50, - 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, - 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x46, 0x46, 0x10, - 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, - 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, + 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x8d, 0x01, 0x0a, 0x14, 0x41, 0x6e, 0x61, 0x6c, + 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x39, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0b, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, + 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x73, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, + 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, + 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2a, 0xa2, + 0x01, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, + 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, 0x12, + 0x0f, 0x0a, 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x01, + 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0f, + 0x0a, 0x0b, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, 0x12, + 0x1c, 0x0a, 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, + 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, 0x0a, + 0x05, 0x50, 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, + 0x5f, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x46, + 0x46, 0x10, 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, + 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, + 0x49, 0x47, 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, + 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x19, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, - 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, - 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x00, - 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x17, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, + 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, + 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x51, 0x0a, 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, + 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, + 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, - 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, - 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, - 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, + 0x0a, 0x0c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, + 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, + 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, + 0x3b, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, + 0xaa, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, + 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go index 773bb35af1..637d075f5e 100644 --- a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go +++ b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go @@ -444,9 +444,10 @@ func (m *AnalyzeQueryRequest) CloneVT() *AnalyzeQueryRequest { return (*AnalyzeQueryRequest)(nil) } r := &AnalyzeQueryRequest{ - Type: m.Type, - Start: m.Start, - End: m.End, + Type: m.Type, + Start: m.Start, + End: m.End, + LabelSelector: m.LabelSelector, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -466,11 +467,6 @@ func (m *AnalyzeQueryResponse) CloneVT() *AnalyzeQueryResponse { r := &AnalyzeQueryResponse{ QueryImpact: m.QueryImpact.CloneVT(), } - if rhs := m.QueryValidationErrors; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.QueryValidationErrors = tmpContainer - } if rhs := m.QueryScopes; rhs != nil { tmpContainer := make([]*QueryScope, len(rhs)) for k, v := range rhs { @@ -522,7 +518,7 @@ func (m *QueryImpact) CloneVT() *QueryImpact { r := &QueryImpact{ Type: m.Type, TotalBytesRead: m.TotalBytesRead, - EstimatedTimeNanos: m.EstimatedTimeNanos, + TotalQueriedSeries: m.TotalQueriedSeries, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -1092,6 +1088,9 @@ func (this *AnalyzeQueryRequest) EqualVT(that *AnalyzeQueryRequest) bool { if this.End != that.End { return false } + if this.LabelSelector != that.LabelSelector { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -1108,15 +1107,6 @@ func (this *AnalyzeQueryResponse) EqualVT(that *AnalyzeQueryResponse) bool { } else if this == nil || that == nil { return false } - if len(this.QueryValidationErrors) != len(that.QueryValidationErrors) { - return false - } - for i, vx := range this.QueryValidationErrors { - vy := that.QueryValidationErrors[i] - if vx != vy { - return false - } - } if len(this.QueryScopes) != len(that.QueryScopes) { return false } @@ -1202,7 +1192,7 @@ func (this *QueryImpact) EqualVT(that *QueryImpact) bool { if this.TotalBytesRead != that.TotalBytesRead { return false } - if this.EstimatedTimeNanos != that.EstimatedTimeNanos { + if this.TotalQueriedSeries != that.TotalQueriedSeries { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -2682,6 +2672,13 @@ func (m *AnalyzeQueryRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.LabelSelector) > 0 { + i -= len(m.LabelSelector) + copy(dAtA[i:], m.LabelSelector) + i = encodeVarint(dAtA, i, uint64(len(m.LabelSelector))) + i-- + dAtA[i] = 0x22 + } if m.End != 0 { i = encodeVarint(dAtA, i, uint64(m.End)) i-- @@ -2738,7 +2735,7 @@ func (m *AnalyzeQueryResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.QueryScopes) > 0 { for iNdEx := len(m.QueryScopes) - 1; iNdEx >= 0; iNdEx-- { @@ -2749,15 +2746,6 @@ func (m *AnalyzeQueryResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x12 - } - } - if len(m.QueryValidationErrors) > 0 { - for iNdEx := len(m.QueryValidationErrors) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.QueryValidationErrors[iNdEx]) - copy(dAtA[i:], m.QueryValidationErrors[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.QueryValidationErrors[iNdEx]))) - i-- dAtA[i] = 0xa } } @@ -2874,8 +2862,8 @@ func (m *QueryImpact) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.EstimatedTimeNanos != 0 { - i = encodeVarint(dAtA, i, uint64(m.EstimatedTimeNanos)) + if m.TotalQueriedSeries != 0 { + i = encodeVarint(dAtA, i, uint64(m.TotalQueriedSeries)) i-- dAtA[i] = 0x18 } @@ -3310,6 +3298,10 @@ func (m *AnalyzeQueryRequest) SizeVT() (n int) { if m.End != 0 { n += 1 + sov(uint64(m.End)) } + l = len(m.LabelSelector) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } n += len(m.unknownFields) return n } @@ -3320,12 +3312,6 @@ func (m *AnalyzeQueryResponse) SizeVT() (n int) { } var l int _ = l - if len(m.QueryValidationErrors) > 0 { - for _, s := range m.QueryValidationErrors { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } if len(m.QueryScopes) > 0 { for _, e := range m.QueryScopes { l = e.SizeVT() @@ -3390,8 +3376,8 @@ func (m *QueryImpact) SizeVT() (n int) { if m.TotalBytesRead != 0 { n += 1 + sov(uint64(m.TotalBytesRead)) } - if m.EstimatedTimeNanos != 0 { - n += 1 + sov(uint64(m.EstimatedTimeNanos)) + if m.TotalQueriedSeries != 0 { + n += 1 + sov(uint64(m.TotalQueriedSeries)) } n += len(m.unknownFields) return n @@ -5724,6 +5710,38 @@ func (m *AnalyzeQueryRequest) UnmarshalVT(dAtA []byte) error { break } } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", 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.LabelSelector = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -5776,38 +5794,6 @@ func (m *AnalyzeQueryResponse) UnmarshalVT(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryValidationErrors", 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.QueryValidationErrors = append(m.QueryValidationErrors, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryScopes", wireType) } @@ -5841,7 +5827,7 @@ func (m *AnalyzeQueryResponse) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryImpact", wireType) } @@ -6203,9 +6189,9 @@ func (m *QueryImpact) UnmarshalVT(dAtA []byte) error { } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EstimatedTimeNanos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalQueriedSeries", wireType) } - m.EstimatedTimeNanos = 0 + m.TotalQueriedSeries = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6215,7 +6201,7 @@ func (m *QueryImpact) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EstimatedTimeNanos |= int64(b&0x7F) << shift + m.TotalQueriedSeries |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/api/openapiv2/gen/phlare.swagger.json b/api/openapiv2/gen/phlare.swagger.json index 31335afd8e..d4e8d01545 100644 --- a/api/openapiv2/gen/phlare.swagger.json +++ b/api/openapiv2/gen/phlare.swagger.json @@ -454,12 +454,6 @@ "v1AnalyzeQueryResponse": { "type": "object", "properties": { - "queryValidationErrors": { - "type": "array", - "items": { - "type": "string" - } - }, "queryScopes": { "type": "array", "items": { @@ -1124,9 +1118,9 @@ "type": "string", "format": "uint64" }, - "estimatedTimeNanos": { + "totalQueriedSeries": { "type": "string", - "format": "int64" + "format": "uint64" } } }, diff --git a/api/querier/v1/querier.proto b/api/querier/v1/querier.proto index eef33912da..edb3d109b2 100644 --- a/api/querier/v1/querier.proto +++ b/api/querier/v1/querier.proto @@ -161,6 +161,8 @@ message AnalyzeQueryRequest { // Milliseconds since epoch. If missing or zero, only the ingesters will be // queried. int64 end = 3; + + string label_selector = 4; } enum QueryType { @@ -176,10 +178,8 @@ enum QueryType { } message AnalyzeQueryResponse { - repeated string queryValidationErrors = 1; - - repeated QueryScope query_scopes = 2; // detailed view of what the query will require - QueryImpact query_impact = 3; // summary of the query impact / performance + repeated QueryScope query_scopes = 1; // detailed view of what the query will require + QueryImpact query_impact = 2; // summary of the query impact / performance } message QueryScope { @@ -198,7 +198,7 @@ message QueryScope { message QueryImpact { QueryImpactType type = 1; uint64 total_bytes_read = 2; - int64 estimated_time_nanos = 3; + uint64 total_queried_series = 3; } enum QueryImpactType { diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 2ea319100d..753ed88591 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -670,6 +670,9 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier } responses, err = forAllPlannedStoreGateways(ctx, tenantId, q.storeGatewayQuerier, plan, func(ctx context.Context, sq StoreGatewayQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { stats, err := sq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: storeGatewayBlockUlids})) + if err != nil { + return nil, err + } return stats.Msg, err }) for _, r := range responses { @@ -690,15 +693,25 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier storeGatewayQueryScope.SymbolBytes res := &querierv1.AnalyzeQueryResponse{ - QueryValidationErrors: nil, - QueryScopes: []*querierv1.QueryScope{ingesterQueryScope, storeGatewayQueryScope}, + QueryScopes: []*querierv1.QueryScope{ingesterQueryScope, storeGatewayQueryScope}, QueryImpact: &querierv1.QueryImpact{ - Type: querierv1.QueryImpactType_MEDIUM, // TODO - TotalBytesRead: totalBytes, - EstimatedTimeNanos: 0, // TODO + Type: querierv1.QueryImpactType_MEDIUM, // TODO + TotalBytesRead: totalBytes, }, } + if req.Msg.LabelSelector != "" { + resSeries, err := q.Series(ctx, connect.NewRequest(&querierv1.SeriesRequest{ + Matchers: []string{req.Msg.LabelSelector}, + Start: req.Msg.Start, + End: req.Msg.End, + })) + if err != nil { + return nil, err + } + res.QueryImpact.TotalQueriedSeries = uint64(len(resSeries.Msg.LabelsSet)) + } + return connect.NewResponse(res), nil } From 67d406222c1872d936d9c8be3630baa2be49696e Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Mon, 22 Apr 2024 10:07:19 -0300 Subject: [PATCH 08/27] Add queried series stat (take 2) --- api/gen/proto/go/querier/v1/querier.pb.go | 271 +++++++++--------- .../proto/go/querier/v1/querier_vtproto.pb.go | 24 +- api/querier/v1/querier.proto | 2 +- pkg/querier/querier.go | 17 +- 4 files changed, 163 insertions(+), 151 deletions(-) diff --git a/api/gen/proto/go/querier/v1/querier.pb.go b/api/gen/proto/go/querier/v1/querier.pb.go index 4820582052..41e95deb89 100644 --- a/api/gen/proto/go/querier/v1/querier.pb.go +++ b/api/gen/proto/go/querier/v1/querier.pb.go @@ -1195,8 +1195,8 @@ type AnalyzeQueryRequest struct { Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` // Milliseconds since epoch. If missing or zero, only the ingesters will be // queried. - End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` - LabelSelector string `protobuf:"bytes,4,opt,name=label_selector,json=labelSelector,proto3" json:"label_selector,omitempty"` + End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` + Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` } func (x *AnalyzeQueryRequest) Reset() { @@ -1252,9 +1252,9 @@ func (x *AnalyzeQueryRequest) GetEnd() int64 { return 0 } -func (x *AnalyzeQueryRequest) GetLabelSelector() string { +func (x *AnalyzeQueryRequest) GetQuery() string { if x != nil { - return x.LabelSelector + return x.Query } return "" } @@ -1639,140 +1639,139 @@ var file_querier_v1_querier_proto_rawDesc = []byte{ 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x06, 0x73, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x13, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, - 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, - 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x8d, 0x01, 0x0a, 0x14, 0x41, 0x6e, 0x61, 0x6c, - 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x39, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0b, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, - 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x73, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, - 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, - 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2a, 0xa2, - 0x01, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, - 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, 0x12, - 0x0f, 0x0a, 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x01, - 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0f, - 0x0a, 0x0b, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, 0x12, - 0x1c, 0x0a, 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, - 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, 0x0a, - 0x05, 0x50, 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, - 0x5f, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x46, - 0x46, 0x10, 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, - 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, - 0x49, 0x47, 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, - 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x13, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x8d, 0x01, 0x0a, 0x14, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, + 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0b, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, + 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, + 0x9a, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, + 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, + 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x51, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2a, 0xa2, 0x01, 0x0a, + 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, + 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, 0x12, 0x0f, 0x0a, + 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, + 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, 0x12, 0x1c, 0x0a, + 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4c, + 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x50, + 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, + 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x46, 0x46, 0x10, + 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, + 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, - 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, - 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x51, 0x0a, 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, - 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, - 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x19, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, + 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, + 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x00, + 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x17, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, - 0x0a, 0x0c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, - 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, - 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, - 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, - 0x3b, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, - 0xaa, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, + 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, + 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go index 637d075f5e..d475b2203c 100644 --- a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go +++ b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go @@ -444,10 +444,10 @@ func (m *AnalyzeQueryRequest) CloneVT() *AnalyzeQueryRequest { return (*AnalyzeQueryRequest)(nil) } r := &AnalyzeQueryRequest{ - Type: m.Type, - Start: m.Start, - End: m.End, - LabelSelector: m.LabelSelector, + Type: m.Type, + Start: m.Start, + End: m.End, + Query: m.Query, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -1088,7 +1088,7 @@ func (this *AnalyzeQueryRequest) EqualVT(that *AnalyzeQueryRequest) bool { if this.End != that.End { return false } - if this.LabelSelector != that.LabelSelector { + if this.Query != that.Query { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -2672,10 +2672,10 @@ func (m *AnalyzeQueryRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.LabelSelector) > 0 { - i -= len(m.LabelSelector) - copy(dAtA[i:], m.LabelSelector) - i = encodeVarint(dAtA, i, uint64(len(m.LabelSelector))) + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = encodeVarint(dAtA, i, uint64(len(m.Query))) i-- dAtA[i] = 0x22 } @@ -3298,7 +3298,7 @@ func (m *AnalyzeQueryRequest) SizeVT() (n int) { if m.End != 0 { n += 1 + sov(uint64(m.End)) } - l = len(m.LabelSelector) + l = len(m.Query) if l > 0 { n += 1 + l + sov(uint64(l)) } @@ -5712,7 +5712,7 @@ func (m *AnalyzeQueryRequest) UnmarshalVT(dAtA []byte) error { } case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5740,7 +5740,7 @@ func (m *AnalyzeQueryRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LabelSelector = string(dAtA[iNdEx:postIndex]) + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/api/querier/v1/querier.proto b/api/querier/v1/querier.proto index edb3d109b2..2e29a0f73f 100644 --- a/api/querier/v1/querier.proto +++ b/api/querier/v1/querier.proto @@ -162,7 +162,7 @@ message AnalyzeQueryRequest { // queried. int64 end = 3; - string label_selector = 4; + string query = 4; } enum QueryType { diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 753ed88591..bf6426d17b 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -23,6 +23,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql/parser" "github.com/samber/lo" "golang.org/x/sync/errgroup" @@ -700,9 +701,21 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier }, } - if req.Msg.LabelSelector != "" { + if req.Msg.Query != "" { + parsedSelector, err := parser.ParseMetricSelector(req.Msg.Query) + if err != nil { + return nil, err + } + newSelector := make([]*labels.Matcher, 0, len(parsedSelector)) + for _, selector := range parsedSelector { + if selector.Name == labels.MetricName { + newSelector = append(newSelector, &labels.Matcher{Type: labels.MatchEqual, Name: phlaremodel.LabelNameProfileType, Value: selector.Value}) + } else { + newSelector = append(newSelector, selector) + } + } resSeries, err := q.Series(ctx, connect.NewRequest(&querierv1.SeriesRequest{ - Matchers: []string{req.Msg.LabelSelector}, + Matchers: []string{convertMatchersToString(newSelector)}, Start: req.Msg.Start, End: req.Msg.End, })) From ffa18829dfb87c7a75fb1df95ee675b78c65b64b Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Thu, 25 Apr 2024 08:04:31 -0300 Subject: [PATCH 09/27] Improve naming, query matchers handling --- pkg/querier/querier.go | 91 ++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 47 deletions(-) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index bf6426d17b..9ff7d769fe 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -577,84 +577,84 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier sp, ctx := opentracing.StartSpanFromContext(ctx, "AnalyzeQuery") defer sp.Finish() - ingesterReq := &ingestv1.BlockMetadataRequest{ + blockMetadataReq := &ingestv1.BlockMetadataRequest{ Start: req.Msg.Start, End: req.Msg.End, } - resultsIngesters := newReplicasPerBlockID(q.logger) - blockSelectIngesters, err := q.blockSelectFromIngesters(ctx, ingesterReq) + ingesterBlockMetadata := newReplicasPerBlockID(q.logger) + blockSelectIngesters, err := q.blockSelectFromIngesters(ctx, blockMetadataReq) if err != nil { return nil, err } - resultsIngesters.add(blockSelectIngesters, ingesterInstance) + ingesterBlockMetadata.add(blockSelectIngesters, ingesterInstance) - resultsStoreGateways := newReplicasPerBlockID(q.logger) - blockSelectStoreGateways, err := q.blockSelectFromStoreGateway(ctx, ingesterReq) + storeGatewayBlockMetadata := newReplicasPerBlockID(q.logger) + blockSelectStoreGateways, err := q.blockSelectFromStoreGateway(ctx, blockMetadataReq) if err != nil { return nil, err } - resultsStoreGateways.add(blockSelectStoreGateways, storeGatewayInstance) + storeGatewayBlockMetadata.add(blockSelectStoreGateways, storeGatewayInstance) - joinedResults := newReplicasPerBlockID(q.logger) - joinedResults.add(blockSelectStoreGateways, storeGatewayInstance) - joinedResults.add(blockSelectIngesters, ingesterInstance) - plan := joinedResults.blockPlan(ctx) + blockMetadata := newReplicasPerBlockID(q.logger) + blockMetadata.add(blockSelectStoreGateways, storeGatewayInstance) + blockMetadata.add(blockSelectIngesters, ingesterInstance) + plan := blockMetadata.blockPlan(ctx) - storeGatewayReplicationSet, err := q.storeGatewayQuerier.ring.GetReplicationSetForOperation(readNoExtend) + ingesterReplicationSet, err := q.ingesterQuerier.ring.GetReplicationSetForOperation(readNoExtend) if err != nil { return nil, err } - ingesterReplicationSet, err := q.ingesterQuerier.ring.GetReplicationSetForOperation(readNoExtend) + storeGatewayReplicationSet, err := q.storeGatewayQuerier.ring.GetReplicationSetForOperation(readNoExtend) if err != nil { return nil, err } - storeGatewayQueryScope := &querierv1.QueryScope{ - ComponentType: "long-term-storage", - ComponentCount: 0, - } + ingesterQueryScope := &querierv1.QueryScope{ - ComponentType: "short-term-storage", - ComponentCount: 0, + ComponentType: "short-term-storage", + } + storeGatewayQueryScope := &querierv1.QueryScope{ + ComponentType: "long-term-storage", } - ingesterBlockUlids := make([]string, 0) - storeGatewayBlockUlids := make([]string, 0) + ingesterBlockIds := make([]string, 0) + storeGatewayBlockIds := make([]string, 0) for replica, blockHints := range plan { if len(blockHints.Ulids) == 0 { continue } - if storeGatewayReplicationSet.Includes(replica) && ingesterReplicationSet.Includes(replica) { // -target=all - for _, ulid := range blockHints.Ulids { - if resultsIngesters.contains(ulid) { + // running locally or with -target=all + if ingesterReplicationSet.Includes(replica) && storeGatewayReplicationSet.Includes(replica) { + for _, blockId := range blockHints.Ulids { + if ingesterBlockMetadata.contains(blockId) { ingesterQueryScope.ComponentCount += 1 ingesterQueryScope.NumBlocks += 1 - ingesterBlockUlids = append(ingesterBlockUlids, ulid) - } else if resultsStoreGateways.contains(ulid) { + ingesterBlockIds = append(ingesterBlockIds, blockId) + } else if storeGatewayBlockMetadata.contains(blockId) { storeGatewayQueryScope.ComponentCount += 1 storeGatewayQueryScope.NumBlocks += 1 - storeGatewayBlockUlids = append(storeGatewayBlockUlids, ulid) + storeGatewayBlockIds = append(storeGatewayBlockIds, blockId) } } - } else if storeGatewayReplicationSet.Includes(replica) { - storeGatewayQueryScope.ComponentCount += 1 - storeGatewayQueryScope.NumBlocks += uint64(len(blockHints.Ulids)) - storeGatewayBlockUlids = append(storeGatewayBlockUlids, blockHints.Ulids...) } else if ingesterReplicationSet.Includes(replica) { ingesterQueryScope.ComponentCount += 1 ingesterQueryScope.NumBlocks += uint64(len(blockHints.Ulids)) - ingesterBlockUlids = append(ingesterBlockUlids, blockHints.Ulids...) + ingesterBlockIds = append(ingesterBlockIds, blockHints.Ulids...) + } else if storeGatewayReplicationSet.Includes(replica) { + storeGatewayQueryScope.ComponentCount += 1 + storeGatewayQueryScope.NumBlocks += uint64(len(blockHints.Ulids)) + storeGatewayBlockIds = append(storeGatewayBlockIds, blockHints.Ulids...) } } - var responses []ResponseFromReplica[*ingestv1.GetBlockStatsResponse] - responses, err = forAllPlannedIngesters(ctx, q.ingesterQuerier, plan, func(ctx context.Context, iq IngesterQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { - stats, err := iq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: ingesterBlockUlids})) + var blockStatsFromReplicas []ResponseFromReplica[*ingestv1.GetBlockStatsResponse] + blockStatsFromReplicas, err = forAllPlannedIngesters(ctx, q.ingesterQuerier, plan, func(ctx context.Context, iq IngesterQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { + stats, err := iq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: ingesterBlockIds})) if err != nil { return nil, err } return stats.Msg, err }) - for _, r := range responses { + for _, r := range blockStatsFromReplicas { for _, stats := range r.response.BlockStats { ingesterQueryScope.NumSeries += stats.NumSeries ingesterQueryScope.NumProfiles += stats.NumProfiles @@ -669,14 +669,14 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier if err != nil { return nil, err } - responses, err = forAllPlannedStoreGateways(ctx, tenantId, q.storeGatewayQuerier, plan, func(ctx context.Context, sq StoreGatewayQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { - stats, err := sq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: storeGatewayBlockUlids})) + blockStatsFromReplicas, err = forAllPlannedStoreGateways(ctx, tenantId, q.storeGatewayQuerier, plan, func(ctx context.Context, sq StoreGatewayQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { + stats, err := sq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: storeGatewayBlockIds})) if err != nil { return nil, err } return stats.Msg, err }) - for _, r := range responses { + for _, r := range blockStatsFromReplicas { for _, stats := range r.response.BlockStats { storeGatewayQueryScope.NumSeries += stats.NumSeries storeGatewayQueryScope.NumProfiles += stats.NumProfiles @@ -702,20 +702,17 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier } if req.Msg.Query != "" { - parsedSelector, err := parser.ParseMetricSelector(req.Msg.Query) + matchers, err := parser.ParseMetricSelector(req.Msg.Query) if err != nil { return nil, err } - newSelector := make([]*labels.Matcher, 0, len(parsedSelector)) - for _, selector := range parsedSelector { - if selector.Name == labels.MetricName { - newSelector = append(newSelector, &labels.Matcher{Type: labels.MatchEqual, Name: phlaremodel.LabelNameProfileType, Value: selector.Value}) - } else { - newSelector = append(newSelector, selector) + for _, matcher := range matchers { + if matcher.Name == labels.MetricName { + matcher.Name = phlaremodel.LabelNameProfileType } } resSeries, err := q.Series(ctx, connect.NewRequest(&querierv1.SeriesRequest{ - Matchers: []string{convertMatchersToString(newSelector)}, + Matchers: []string{convertMatchersToString(matchers)}, Start: req.Msg.Start, End: req.Msg.End, })) From 8e6016e43512654e568de3dd23426ecca98fde60 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:47:26 -0300 Subject: [PATCH 10/27] Simplify querier logic, add deduplication flag --- api/gen/proto/go/querier/v1/querier.pb.go | 187 +++++++++--------- .../proto/go/querier/v1/querier_vtproto.pb.go | 43 +++- api/openapiv2/gen/phlare.swagger.json | 3 + api/querier/v1/querier.proto | 1 + pkg/querier/ingester_querier.go | 20 +- pkg/querier/querier.go | 75 ++----- pkg/querier/replication.go | 28 ++- pkg/querier/store_gateway_querier.go | 26 +-- 8 files changed, 201 insertions(+), 182 deletions(-) diff --git a/api/gen/proto/go/querier/v1/querier.pb.go b/api/gen/proto/go/querier/v1/querier.pb.go index 41e95deb89..7e4b5d6d7d 100644 --- a/api/gen/proto/go/querier/v1/querier.pb.go +++ b/api/gen/proto/go/querier/v1/querier.pb.go @@ -1430,9 +1430,10 @@ type QueryImpact struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type QueryImpactType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryImpactType" json:"type,omitempty"` - TotalBytesRead uint64 `protobuf:"varint,2,opt,name=total_bytes_read,json=totalBytesRead,proto3" json:"total_bytes_read,omitempty"` - TotalQueriedSeries uint64 `protobuf:"varint,3,opt,name=total_queried_series,json=totalQueriedSeries,proto3" json:"total_queried_series,omitempty"` + Type QueryImpactType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryImpactType" json:"type,omitempty"` + TotalBytesRead uint64 `protobuf:"varint,2,opt,name=total_bytes_read,json=totalBytesRead,proto3" json:"total_bytes_read,omitempty"` + TotalQueriedSeries uint64 `protobuf:"varint,3,opt,name=total_queried_series,json=totalQueriedSeries,proto3" json:"total_queried_series,omitempty"` + DeduplicationNeeded bool `protobuf:"varint,4,opt,name=deduplication_needed,json=deduplicationNeeded,proto3" json:"deduplication_needed,omitempty"` } func (x *QueryImpact) Reset() { @@ -1488,6 +1489,13 @@ func (x *QueryImpact) GetTotalQueriedSeries() uint64 { return 0 } +func (x *QueryImpact) GetDeduplicationNeeded() bool { + if x != nil { + return x.DeduplicationNeeded + } + return false +} + var File_querier_v1_querier_proto protoreflect.FileDescriptor var file_querier_v1_querier_proto_rawDesc = []byte{ @@ -1677,7 +1685,7 @@ var file_querier_v1_querier_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, - 0x9a, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, + 0xcd, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, @@ -1686,92 +1694,95 @@ var file_querier_v1_querier_proto_rawDesc = []byte{ 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x51, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2a, 0xa2, 0x01, 0x0a, - 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, - 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, 0x12, 0x0f, 0x0a, - 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x01, 0x12, 0x10, - 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, 0x02, - 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, - 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, 0x12, 0x1c, 0x0a, - 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x46, 0x4c, - 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x50, - 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, - 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, 0x46, 0x46, 0x10, - 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, - 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x19, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x14, + 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x65, + 0x65, 0x64, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x65, 0x64, 0x75, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x2a, + 0xa2, 0x01, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, + 0x0d, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, + 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, + 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, + 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, + 0x0f, 0x0a, 0x0b, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, + 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, + 0x5f, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, + 0x0a, 0x05, 0x50, 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, + 0x45, 0x5f, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, + 0x46, 0x46, 0x10, 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, + 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, + 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, + 0x48, 0x49, 0x47, 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, + 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, - 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, + 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, - 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x00, - 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x17, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, - 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, - 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, - 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, + 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, + 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x51, 0x0a, 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, + 0x69, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, + 0x12, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x53, 0x0a, 0x0c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, + 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, + 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, + 0x31, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, + 0x58, 0xaa, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go index d475b2203c..2c7c498e38 100644 --- a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go +++ b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go @@ -516,9 +516,10 @@ func (m *QueryImpact) CloneVT() *QueryImpact { return (*QueryImpact)(nil) } r := &QueryImpact{ - Type: m.Type, - TotalBytesRead: m.TotalBytesRead, - TotalQueriedSeries: m.TotalQueriedSeries, + Type: m.Type, + TotalBytesRead: m.TotalBytesRead, + TotalQueriedSeries: m.TotalQueriedSeries, + DeduplicationNeeded: m.DeduplicationNeeded, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -1195,6 +1196,9 @@ func (this *QueryImpact) EqualVT(that *QueryImpact) bool { if this.TotalQueriedSeries != that.TotalQueriedSeries { return false } + if this.DeduplicationNeeded != that.DeduplicationNeeded { + return false + } return string(this.unknownFields) == string(that.unknownFields) } @@ -2862,6 +2866,16 @@ func (m *QueryImpact) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.DeduplicationNeeded { + i-- + if m.DeduplicationNeeded { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if m.TotalQueriedSeries != 0 { i = encodeVarint(dAtA, i, uint64(m.TotalQueriedSeries)) i-- @@ -3379,6 +3393,9 @@ func (m *QueryImpact) SizeVT() (n int) { if m.TotalQueriedSeries != 0 { n += 1 + sov(uint64(m.TotalQueriedSeries)) } + if m.DeduplicationNeeded { + n += 2 + } n += len(m.unknownFields) return n } @@ -6206,6 +6223,26 @@ func (m *QueryImpact) UnmarshalVT(dAtA []byte) error { break } } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeduplicationNeeded", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DeduplicationNeeded = bool(v != 0) default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/api/openapiv2/gen/phlare.swagger.json b/api/openapiv2/gen/phlare.swagger.json index d4e8d01545..bf7b2335bc 100644 --- a/api/openapiv2/gen/phlare.swagger.json +++ b/api/openapiv2/gen/phlare.swagger.json @@ -1121,6 +1121,9 @@ "totalQueriedSeries": { "type": "string", "format": "uint64" + }, + "deduplicationNeeded": { + "type": "boolean" } } }, diff --git a/api/querier/v1/querier.proto b/api/querier/v1/querier.proto index 2e29a0f73f..25b526eee8 100644 --- a/api/querier/v1/querier.proto +++ b/api/querier/v1/querier.proto @@ -199,6 +199,7 @@ message QueryImpact { QueryImpactType type = 1; uint64 total_bytes_read = 2; uint64 total_queried_series = 3; + bool deduplication_needed = 4; } enum QueryImpactType { diff --git a/pkg/querier/ingester_querier.go b/pkg/querier/ingester_querier.go index 759ba729e9..d8c0a9a374 100644 --- a/pkg/querier/ingester_querier.go +++ b/pkg/querier/ingester_querier.go @@ -115,7 +115,7 @@ func (q *Querier) selectTreeFromIngesters(ctx context.Context, req *querierv1.Se g, gCtx := errgroup.WithContext(ctx) for idx := range responses { r := responses[idx] - hints, ok := plan[r.addr] + planEntry, ok := plan[r.addr] if !ok && plan != nil { return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) } @@ -127,7 +127,7 @@ func (q *Querier) selectTreeFromIngesters(ctx context.Context, req *querierv1.Se Start: req.Start, End: req.End, Type: profileType, - Hints: &ingestv1.Hints{Block: hints}, + Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, }, MaxNodes: req.MaxNodes, }) @@ -172,7 +172,7 @@ func (q *Querier) selectProfileFromIngesters(ctx context.Context, req *querierv1 g, gCtx := errgroup.WithContext(ctx) for idx := range responses { r := responses[idx] - hints, ok := plan[r.addr] + planEntry, ok := plan[r.addr] if !ok && plan != nil { return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) } @@ -184,7 +184,7 @@ func (q *Querier) selectProfileFromIngesters(ctx context.Context, req *querierv1 Start: req.Start, End: req.End, Type: profileType, - Hints: &ingestv1.Hints{Block: hints}, + Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, }, MaxNodes: req.MaxNodes, StackTraceSelector: req.StackTraceSelector, @@ -200,7 +200,7 @@ func (q *Querier) selectProfileFromIngesters(ctx context.Context, req *querierv1 return selectMergePprofProfile(gCtx, profileType, responses) } -func (q *Querier) selectSeriesFromIngesters(ctx context.Context, req *ingesterv1.MergeProfilesLabelsRequest, plan map[string]*ingestv1.BlockHints) ([]ResponseFromReplica[clientpool.BidiClientMergeProfilesLabels], error) { +func (q *Querier) selectSeriesFromIngesters(ctx context.Context, req *ingesterv1.MergeProfilesLabelsRequest, plan map[string]*blockPlanEntry) ([]ResponseFromReplica[clientpool.BidiClientMergeProfilesLabels], error) { sp, ctx := opentracing.StartSpanFromContext(ctx, "SelectSeries Ingesters") defer sp.Finish() var responses []ResponseFromReplica[clientpool.BidiClientMergeProfilesLabels] @@ -222,13 +222,13 @@ func (q *Querier) selectSeriesFromIngesters(ctx context.Context, req *ingesterv1 g, _ := errgroup.WithContext(ctx) for _, r := range responses { r := r - hints, ok := plan[r.addr] + planEntry, ok := plan[r.addr] if !ok && plan != nil { return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) } g.Go(util.RecoverPanic(func() error { req := req.CloneVT() - req.Request.Hints = &ingestv1.Hints{Block: hints} + req.Request.Hints = &ingestv1.Hints{Block: planEntry.BlockHints} return r.response.Send(req) })) } @@ -294,7 +294,7 @@ func (q *Querier) seriesFromIngesters(ctx context.Context, req *ingesterv1.Serie return responses, nil } -func (q *Querier) selectSpanProfileFromIngesters(ctx context.Context, req *querierv1.SelectMergeSpanProfileRequest, plan map[string]*ingestv1.BlockHints) (*phlaremodel.Tree, error) { +func (q *Querier) selectSpanProfileFromIngesters(ctx context.Context, req *querierv1.SelectMergeSpanProfileRequest, plan map[string]*blockPlanEntry) (*phlaremodel.Tree, error) { sp, ctx := opentracing.StartSpanFromContext(ctx, "SelectMergeSpanProfile Ingesters") defer sp.Finish() profileType, err := phlaremodel.ParseProfileTypeSelector(req.ProfileTypeID) @@ -325,7 +325,7 @@ func (q *Querier) selectSpanProfileFromIngesters(ctx context.Context, req *queri g, gCtx := errgroup.WithContext(ctx) for idx := range responses { r := responses[idx] - hints, ok := plan[r.addr] + planEntry, ok := plan[r.addr] if !ok && plan != nil { return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) } @@ -338,7 +338,7 @@ func (q *Querier) selectSpanProfileFromIngesters(ctx context.Context, req *queri End: req.End, Type: profileType, SpanSelector: req.SpanSelector, - Hints: &ingestv1.Hints{Block: hints}, + Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, }, MaxNodes: req.MaxNodes, }) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 9ff7d769fe..61bbb3fbf2 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -577,72 +577,30 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier sp, ctx := opentracing.StartSpanFromContext(ctx, "AnalyzeQuery") defer sp.Finish() - blockMetadataReq := &ingestv1.BlockMetadataRequest{ - Start: req.Msg.Start, - End: req.Msg.End, - } - - ingesterBlockMetadata := newReplicasPerBlockID(q.logger) - blockSelectIngesters, err := q.blockSelectFromIngesters(ctx, blockMetadataReq) - if err != nil { - return nil, err - } - ingesterBlockMetadata.add(blockSelectIngesters, ingesterInstance) - - storeGatewayBlockMetadata := newReplicasPerBlockID(q.logger) - blockSelectStoreGateways, err := q.blockSelectFromStoreGateway(ctx, blockMetadataReq) - if err != nil { - return nil, err - } - storeGatewayBlockMetadata.add(blockSelectStoreGateways, storeGatewayInstance) - - blockMetadata := newReplicasPerBlockID(q.logger) - blockMetadata.add(blockSelectStoreGateways, storeGatewayInstance) - blockMetadata.add(blockSelectIngesters, ingesterInstance) - plan := blockMetadata.blockPlan(ctx) - - ingesterReplicationSet, err := q.ingesterQuerier.ring.GetReplicationSetForOperation(readNoExtend) - if err != nil { - return nil, err - } - storeGatewayReplicationSet, err := q.storeGatewayQuerier.ring.GetReplicationSetForOperation(readNoExtend) - if err != nil { - return nil, err - } + plan, err := q.blockSelect(ctx, model.Time(req.Msg.Start), model.Time(req.Msg.End)) ingesterQueryScope := &querierv1.QueryScope{ - ComponentType: "short-term-storage", + ComponentType: "Short term storage", } storeGatewayQueryScope := &querierv1.QueryScope{ - ComponentType: "long-term-storage", + ComponentType: "Long term storage", } ingesterBlockIds := make([]string, 0) storeGatewayBlockIds := make([]string, 0) - for replica, blockHints := range plan { - if len(blockHints.Ulids) == 0 { + deduplicationNeeded := false + for _, planEntry := range plan { + if len(planEntry.Ulids) == 0 { continue } - // running locally or with -target=all - if ingesterReplicationSet.Includes(replica) && storeGatewayReplicationSet.Includes(replica) { - for _, blockId := range blockHints.Ulids { - if ingesterBlockMetadata.contains(blockId) { - ingesterQueryScope.ComponentCount += 1 - ingesterQueryScope.NumBlocks += 1 - ingesterBlockIds = append(ingesterBlockIds, blockId) - } else if storeGatewayBlockMetadata.contains(blockId) { - storeGatewayQueryScope.ComponentCount += 1 - storeGatewayQueryScope.NumBlocks += 1 - storeGatewayBlockIds = append(storeGatewayBlockIds, blockId) - } - } - } else if ingesterReplicationSet.Includes(replica) { + deduplicationNeeded = deduplicationNeeded || planEntry.Deduplication + if planEntry.InstanceType == ingesterInstance { ingesterQueryScope.ComponentCount += 1 - ingesterQueryScope.NumBlocks += uint64(len(blockHints.Ulids)) - ingesterBlockIds = append(ingesterBlockIds, blockHints.Ulids...) - } else if storeGatewayReplicationSet.Includes(replica) { + ingesterQueryScope.NumBlocks += uint64(len(planEntry.Ulids)) + ingesterBlockIds = append(ingesterBlockIds, planEntry.Ulids...) + } else { storeGatewayQueryScope.ComponentCount += 1 - storeGatewayQueryScope.NumBlocks += uint64(len(blockHints.Ulids)) - storeGatewayBlockIds = append(storeGatewayBlockIds, blockHints.Ulids...) + storeGatewayQueryScope.NumBlocks += uint64(len(planEntry.Ulids)) + storeGatewayBlockIds = append(storeGatewayBlockIds, planEntry.Ulids...) } } @@ -696,8 +654,9 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier res := &querierv1.AnalyzeQueryResponse{ QueryScopes: []*querierv1.QueryScope{ingesterQueryScope, storeGatewayQueryScope}, QueryImpact: &querierv1.QueryImpact{ - Type: querierv1.QueryImpactType_MEDIUM, // TODO - TotalBytesRead: totalBytes, + Type: querierv1.QueryImpactType_MEDIUM, // TODO + TotalBytesRead: totalBytes, + DeduplicationNeeded: deduplicationNeeded, }, } @@ -1116,7 +1075,7 @@ func (q *Querier) SelectSeries(ctx context.Context, req *connect.Request[querier }), nil } -func (q *Querier) selectSeries(ctx context.Context, req *connect.Request[querierv1.SelectSeriesRequest], plan map[string]*ingestv1.BlockHints) ([]ResponseFromReplica[clientpool.BidiClientMergeProfilesLabels], error) { +func (q *Querier) selectSeries(ctx context.Context, req *connect.Request[querierv1.SelectSeriesRequest], plan map[string]*blockPlanEntry) ([]ResponseFromReplica[clientpool.BidiClientMergeProfilesLabels], error) { stepMs := time.Duration(req.Msg.Step * float64(time.Second)).Milliseconds() sort.Strings(req.Msg.GroupBy) diff --git a/pkg/querier/replication.go b/pkg/querier/replication.go index c5013c9701..a2f87dfaaa 100644 --- a/pkg/querier/replication.go +++ b/pkg/querier/replication.go @@ -89,7 +89,7 @@ func forGivenReplicationSet[Result any, Querier any](ctx context.Context, client } // forGivenPlan runs f, in parallel, for given plan. -func forGivenPlan[Result any, Querier any](ctx context.Context, plan map[string]*ingestv1.BlockHints, clientFactory func(string) (Querier, error), replicationSet ring.ReplicationSet, f QueryReplicaWithHintsFn[Result, Querier]) ([]ResponseFromReplica[Result], error) { +func forGivenPlan[Result any, Querier any](ctx context.Context, plan map[string]*blockPlanEntry, clientFactory func(string) (Querier, error), replicationSet ring.ReplicationSet, f QueryReplicaWithHintsFn[Result, Querier]) ([]ResponseFromReplica[Result], error) { g, _ := errgroup.WithContext(ctx) var ( @@ -113,7 +113,7 @@ func forGivenPlan[Result any, Querier any](ctx context.Context, plan map[string] return err } - resp, err := f(ctx, client, &ingestv1.Hints{Block: h}) + resp, err := f(ctx, client, &ingestv1.Hints{Block: h.BlockHints}) if err != nil { return err } @@ -320,21 +320,26 @@ func (r *replicasPerBlockID) pruneSupersededBlocks(sharded bool) error { return nil } -type blockPlan map[string]*ingestv1.BlockHints +type blockPlanEntry struct { + *ingestv1.BlockHints + InstanceType instanceType +} + +type blockPlan map[string]*blockPlanEntry func (p blockPlan) String() string { data, _ := json.Marshal(p) return string(data) } -func (r *replicasPerBlockID) blockPlan(ctx context.Context) map[string]*ingestv1.BlockHints { +func (r *replicasPerBlockID) blockPlan(ctx context.Context) map[string]*blockPlanEntry { sp, _ := opentracing.StartSpanFromContext(ctx, "blockPlan") defer sp.Finish() var ( deduplicate = false hash = xxhash.New() - plan = make(map[string]*ingestv1.BlockHints) + plan = make(map[string]*blockPlanEntry) smallestCompactionLevel = int32(0) ) @@ -406,7 +411,10 @@ func (r *replicasPerBlockID) blockPlan(ctx context.Context) map[string]*ingestv1 // add block to plan p, exists := plan[selectedReplica] if !exists { - p = &ingestv1.BlockHints{} + p = &blockPlanEntry{ + BlockHints: &ingestv1.BlockHints{}, + InstanceType: r.instanceType[selectedReplica], + } plan[selectedReplica] = p } p.Ulids = append(p.Ulids, blockID) @@ -422,14 +430,14 @@ func (r *replicasPerBlockID) blockPlan(ctx context.Context) map[string]*ingestv1 } } - var plannedIngesterBlocks, plannedStoreGatwayBlocks int + var plannedIngesterBlocks, plannedStoreGatewayBlocks int for replica, blocks := range plan { t, ok := r.instanceType[replica] if !ok { continue } if t == storeGatewayInstance { - plannedStoreGatwayBlocks += len(blocks.Ulids) + plannedStoreGatewayBlocks += len(blocks.Ulids) } if t == ingesterInstance { plannedIngesterBlocks += len(blocks.Ulids) @@ -440,7 +448,7 @@ func (r *replicasPerBlockID) blockPlan(ctx context.Context) map[string]*ingestv1 otlog.Bool("deduplicate", deduplicate), otlog.Int32("smallest_compaction_level", smallestCompactionLevel), otlog.Int("planned_blocks_ingesters", plannedIngesterBlocks), - otlog.Int("planned_blocks_store_gateways", plannedStoreGatwayBlocks), + otlog.Int("planned_blocks_store_gateways", plannedStoreGatewayBlocks), ) level.Debug(spanlogger.FromContext(ctx, r.logger)).Log( @@ -448,7 +456,7 @@ func (r *replicasPerBlockID) blockPlan(ctx context.Context) map[string]*ingestv1 "deduplicate", deduplicate, "smallest_compaction_level", smallestCompactionLevel, "planned_blocks_ingesters", plannedIngesterBlocks, - "planned_blocks_store_gateways", plannedStoreGatwayBlocks, + "planned_blocks_store_gateways", plannedStoreGatewayBlocks, "plan", blockPlan(plan), ) diff --git a/pkg/querier/store_gateway_querier.go b/pkg/querier/store_gateway_querier.go index cf28c30dcc..59ac3c8223 100644 --- a/pkg/querier/store_gateway_querier.go +++ b/pkg/querier/store_gateway_querier.go @@ -146,7 +146,7 @@ func forAllStoreGateways[T any](ctx context.Context, tenantID string, storegatew } // forAllPlannedStoreGatway runs f, in parallel, for all store-gateways part of the plan -func forAllPlannedStoreGateways[T any](ctx context.Context, _ string, storegatewayQuerier *StoreGatewayQuerier, plan map[string]*ingestv1.BlockHints, f QueryReplicaWithHintsFn[T, StoreGatewayQueryClient]) ([]ResponseFromReplica[T], error) { +func forAllPlannedStoreGateways[T any](ctx context.Context, _ string, storegatewayQuerier *StoreGatewayQuerier, plan map[string]*blockPlanEntry, f QueryReplicaWithHintsFn[T, StoreGatewayQueryClient]) ([]ResponseFromReplica[T], error) { replicationSet, err := storegatewayQuerier.ring.GetReplicationSetForOperation(readNoExtend) if err != nil { return nil, err @@ -175,7 +175,7 @@ func GetShuffleShardingSubring(ring ring.ReadRing, userID string, limits StoreGa return ring.ShuffleShard(userID, shardSize) } -func (q *Querier) selectTreeFromStoreGateway(ctx context.Context, req *querierv1.SelectMergeStacktracesRequest, plan map[string]*ingestv1.BlockHints) (*phlaremodel.Tree, error) { +func (q *Querier) selectTreeFromStoreGateway(ctx context.Context, req *querierv1.SelectMergeStacktracesRequest, plan map[string]*blockPlanEntry) (*phlaremodel.Tree, error) { sp, ctx := opentracing.StartSpanFromContext(ctx, "SelectTree StoreGateway") defer sp.Finish() profileType, err := phlaremodel.ParseProfileTypeSelector(req.ProfileTypeID) @@ -210,7 +210,7 @@ func (q *Querier) selectTreeFromStoreGateway(ctx context.Context, req *querierv1 g, gCtx := errgroup.WithContext(ctx) for _, r := range responses { r := r - hints, ok := plan[r.addr] + planEntry, ok := plan[r.addr] if !ok && plan != nil { return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) } @@ -221,7 +221,7 @@ func (q *Querier) selectTreeFromStoreGateway(ctx context.Context, req *querierv1 Start: req.Start, End: req.End, Type: profileType, - Hints: &ingestv1.Hints{Block: hints}, + Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, }, MaxNodes: req.MaxNodes, }) @@ -235,7 +235,7 @@ func (q *Querier) selectTreeFromStoreGateway(ctx context.Context, req *querierv1 return selectMergeTree(gCtx, responses) } -func (q *Querier) selectProfileFromStoreGateway(ctx context.Context, req *querierv1.SelectMergeProfileRequest, plan map[string]*ingestv1.BlockHints) (*googlev1.Profile, error) { +func (q *Querier) selectProfileFromStoreGateway(ctx context.Context, req *querierv1.SelectMergeProfileRequest, plan map[string]*blockPlanEntry) (*googlev1.Profile, error) { sp, ctx := opentracing.StartSpanFromContext(ctx, "SelectProfile StoreGateway") defer sp.Finish() profileType, err := phlaremodel.ParseProfileTypeSelector(req.ProfileTypeID) @@ -270,7 +270,7 @@ func (q *Querier) selectProfileFromStoreGateway(ctx context.Context, req *querie g, gCtx := errgroup.WithContext(ctx) for _, r := range responses { r := r - hints, ok := plan[r.addr] + planEntry, ok := plan[r.addr] if !ok && plan != nil { return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) } @@ -281,7 +281,7 @@ func (q *Querier) selectProfileFromStoreGateway(ctx context.Context, req *querie Start: req.Start, End: req.End, Type: profileType, - Hints: &ingestv1.Hints{Block: hints}, + Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, }, MaxNodes: req.MaxNodes, StackTraceSelector: req.StackTraceSelector, @@ -296,7 +296,7 @@ func (q *Querier) selectProfileFromStoreGateway(ctx context.Context, req *querie return selectMergePprofProfile(gCtx, profileType, responses) } -func (q *Querier) selectSeriesFromStoreGateway(ctx context.Context, req *ingesterv1.MergeProfilesLabelsRequest, plan map[string]*ingestv1.BlockHints) ([]ResponseFromReplica[clientpool.BidiClientMergeProfilesLabels], error) { +func (q *Querier) selectSeriesFromStoreGateway(ctx context.Context, req *ingesterv1.MergeProfilesLabelsRequest, plan map[string]*blockPlanEntry) ([]ResponseFromReplica[clientpool.BidiClientMergeProfilesLabels], error) { sp, ctx := opentracing.StartSpanFromContext(ctx, "SelectSeries StoreGateway") defer sp.Finish() tenantID, err := tenant.ExtractTenantIDFromContext(ctx) @@ -321,13 +321,13 @@ func (q *Querier) selectSeriesFromStoreGateway(ctx context.Context, req *ingeste g, _ := errgroup.WithContext(ctx) for _, r := range responses { r := r - hints, ok := plan[r.addr] + planEntry, ok := plan[r.addr] if !ok && plan != nil { return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) } g.Go(util.RecoverPanic(func() error { req := req.CloneVT() - req.Request.Hints = &ingestv1.Hints{Block: hints} + req.Request.Hints = &ingestv1.Hints{Block: planEntry.BlockHints} return r.response.Send(req) })) } @@ -403,7 +403,7 @@ func (q *Querier) seriesFromStoreGateway(ctx context.Context, req *ingestv1.Seri return responses, nil } -func (q *Querier) selectSpanProfileFromStoreGateway(ctx context.Context, req *querierv1.SelectMergeSpanProfileRequest, plan map[string]*ingestv1.BlockHints) (*phlaremodel.Tree, error) { +func (q *Querier) selectSpanProfileFromStoreGateway(ctx context.Context, req *querierv1.SelectMergeSpanProfileRequest, plan map[string]*blockPlanEntry) (*phlaremodel.Tree, error) { sp, ctx := opentracing.StartSpanFromContext(ctx, "SelectSpanProfile StoreGateway") defer sp.Finish() profileType, err := phlaremodel.ParseProfileTypeSelector(req.ProfileTypeID) @@ -438,7 +438,7 @@ func (q *Querier) selectSpanProfileFromStoreGateway(ctx context.Context, req *qu g, gCtx := errgroup.WithContext(ctx) for _, r := range responses { r := r - hints, ok := plan[r.addr] + planEntry, ok := plan[r.addr] if !ok && plan != nil { return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) } @@ -450,7 +450,7 @@ func (q *Querier) selectSpanProfileFromStoreGateway(ctx context.Context, req *qu End: req.End, Type: profileType, SpanSelector: req.SpanSelector, - Hints: &ingestv1.Hints{Block: hints}, + Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, }, MaxNodes: req.MaxNodes, }) From 7efe5871cd523c4bc72ce855383ebf660f0e371b Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Thu, 2 May 2024 12:43:38 -0300 Subject: [PATCH 11/27] Add basic validation --- pkg/frontend/frontend_analyze_query.go | 27 +++++++- pkg/querier/querier.go | 85 +++++++++++++------------- 2 files changed, 68 insertions(+), 44 deletions(-) diff --git a/pkg/frontend/frontend_analyze_query.go b/pkg/frontend/frontend_analyze_query.go index 145ca15397..3a1bac2797 100644 --- a/pkg/frontend/frontend_analyze_query.go +++ b/pkg/frontend/frontend_analyze_query.go @@ -4,11 +4,15 @@ import ( "context" "connectrpc.com/connect" + "github.com/grafana/dskit/tenant" "github.com/opentracing/opentracing-go" + "github.com/prometheus/common/model" querierv1 "github.com/grafana/pyroscope/api/gen/proto/go/querier/v1" "github.com/grafana/pyroscope/api/gen/proto/go/querier/v1/querierv1connect" + phlaremodel "github.com/grafana/pyroscope/pkg/model" "github.com/grafana/pyroscope/pkg/util/connectgrpc" + "github.com/grafana/pyroscope/pkg/validation" ) func (f *Frontend) AnalyzeQuery(ctx context.Context, @@ -17,7 +21,26 @@ func (f *Frontend) AnalyzeQuery(ctx context.Context, ) { opentracing.SpanFromContext(ctx) + tenantIDs, err := tenant.TenantIDs(ctx) + if err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, err) + } + + interval, ok := phlaremodel.GetTimeRange(c.Msg) + if ok { + validated, err := validation.ValidateRangeRequest(f.limits, tenantIDs, interval, model.Now()) + if err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, err) + } + if validated.IsEmpty { + return connect.NewResponse(&querierv1.AnalyzeQueryResponse{}), nil + } + c.Msg.Start = int64(validated.Start) + c.Msg.End = int64(validated.End) + } else { + return connect.NewResponse(&querierv1.AnalyzeQueryResponse{}), nil + } + ctx = connectgrpc.WithProcedure(ctx, querierv1connect.QuerierServiceAnalyzeQueryProcedure) - res, err := connectgrpc.RoundTripUnary[querierv1.AnalyzeQueryRequest, querierv1.AnalyzeQueryResponse](ctx, f, c) - return res, err + return connectgrpc.RoundTripUnary[querierv1.AnalyzeQueryRequest, querierv1.AnalyzeQueryResponse](ctx, f, c) } diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 61bbb3fbf2..648ab53a27 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -589,9 +589,6 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier storeGatewayBlockIds := make([]string, 0) deduplicationNeeded := false for _, planEntry := range plan { - if len(planEntry.Ulids) == 0 { - continue - } deduplicationNeeded = deduplicationNeeded || planEntry.Deduplication if planEntry.InstanceType == ingesterInstance { ingesterQueryScope.ComponentCount += 1 @@ -612,16 +609,7 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier } return stats.Msg, err }) - for _, r := range blockStatsFromReplicas { - for _, stats := range r.response.BlockStats { - ingesterQueryScope.NumSeries += stats.NumSeries - ingesterQueryScope.NumProfiles += stats.NumProfiles - ingesterQueryScope.NumSamples += stats.NumSamples - ingesterQueryScope.IndexBytes += stats.IndexBytes - ingesterQueryScope.ProfileBytes += stats.ProfilesBytes - ingesterQueryScope.SymbolBytes += stats.SymbolsBytes - } - } + addBlockStatsToQueryScope(blockStatsFromReplicas, ingesterQueryScope) tenantId, err := tenant.TenantID(ctx) if err != nil { @@ -634,16 +622,7 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier } return stats.Msg, err }) - for _, r := range blockStatsFromReplicas { - for _, stats := range r.response.BlockStats { - storeGatewayQueryScope.NumSeries += stats.NumSeries - storeGatewayQueryScope.NumProfiles += stats.NumProfiles - storeGatewayQueryScope.NumSamples += stats.NumSamples - storeGatewayQueryScope.IndexBytes += stats.IndexBytes - storeGatewayQueryScope.ProfileBytes += stats.ProfilesBytes - storeGatewayQueryScope.SymbolBytes += stats.SymbolsBytes - } - } + addBlockStatsToQueryScope(blockStatsFromReplicas, storeGatewayQueryScope) totalBytes := ingesterQueryScope.IndexBytes + ingesterQueryScope.ProfileBytes + ingesterQueryScope.SymbolBytes + @@ -654,34 +633,56 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier res := &querierv1.AnalyzeQueryResponse{ QueryScopes: []*querierv1.QueryScope{ingesterQueryScope, storeGatewayQueryScope}, QueryImpact: &querierv1.QueryImpact{ - Type: querierv1.QueryImpactType_MEDIUM, // TODO TotalBytesRead: totalBytes, DeduplicationNeeded: deduplicationNeeded, }, } - if req.Msg.Query != "" { - matchers, err := parser.ParseMetricSelector(req.Msg.Query) - if err != nil { - return nil, err - } - for _, matcher := range matchers { - if matcher.Name == labels.MetricName { - matcher.Name = phlaremodel.LabelNameProfileType - } + queriedSeries, err := q.getQueriedSeriesCount(ctx, req.Msg) + if err != nil { + return nil, err + } + res.QueryImpact.TotalQueriedSeries = queriedSeries + + return connect.NewResponse(res), nil +} + +func addBlockStatsToQueryScope(blockStatsFromReplicas []ResponseFromReplica[*ingestv1.GetBlockStatsResponse], ingesterQueryScope *querierv1.QueryScope) { + for _, r := range blockStatsFromReplicas { + for _, stats := range r.response.BlockStats { + ingesterQueryScope.NumSeries += stats.NumSeries + ingesterQueryScope.NumProfiles += stats.NumProfiles + ingesterQueryScope.NumSamples += stats.NumSamples + ingesterQueryScope.IndexBytes += stats.IndexBytes + ingesterQueryScope.ProfileBytes += stats.ProfilesBytes + ingesterQueryScope.SymbolBytes += stats.SymbolsBytes } - resSeries, err := q.Series(ctx, connect.NewRequest(&querierv1.SeriesRequest{ - Matchers: []string{convertMatchersToString(matchers)}, - Start: req.Msg.Start, - End: req.Msg.End, - })) + } +} + +func (q *Querier) getQueriedSeriesCount(ctx context.Context, req *querierv1.AnalyzeQueryRequest) (uint64, error) { + var matchers []*labels.Matcher + var err error + if req.Query != "" { + matchers, err = parser.ParseMetricSelector(query) if err != nil { - return nil, err + return 0, err } - res.QueryImpact.TotalQueriedSeries = uint64(len(resSeries.Msg.LabelsSet)) } - - return connect.NewResponse(res), nil + for _, matcher := range matchers { + if matcher.Name == labels.MetricName { + matcher.Name = phlaremodel.LabelNameProfileType + } + } + resSeries, err := q.Series(ctx, connect.NewRequest(&querierv1.SeriesRequest{ + Matchers: []string{convertMatchersToString(matchers)}, + Start: req.Start, + End: req.End, + })) + if err != nil { + return 0, err + } + return uint64(len(resSeries.Msg.LabelsSet)), nil } func (q *Querier) SelectMergeStacktraces(ctx context.Context, req *connect.Request[querierv1.SelectMergeStacktracesRequest]) (*connect.Response[querierv1.SelectMergeStacktracesResponse], error) { From 275c3402336904397fac55660fc86d3bd5b29d93 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Thu, 2 May 2024 12:50:01 -0300 Subject: [PATCH 12/27] Add basic validation (fix compile error) --- pkg/querier/querier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 648ab53a27..003ef16c33 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -664,7 +664,7 @@ func (q *Querier) getQueriedSeriesCount(ctx context.Context, req *querierv1.Anal var matchers []*labels.Matcher var err error if req.Query != "" { - matchers, err = parser.ParseMetricSelector(query) + matchers, err = parser.ParseMetricSelector(req.Query) if err != nil { return 0, err } From 9b629f996dfab15c9dad0762a7231173066b479b Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 3 May 2024 12:25:10 -0300 Subject: [PATCH 13/27] Only return query scopes that are in use --- pkg/querier/querier.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 003ef16c33..206b4cd4b9 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -630,8 +630,15 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier storeGatewayQueryScope.ProfileBytes + storeGatewayQueryScope.SymbolBytes + filteredQueryScopes := make([]*querierv1.QueryScope, 0) + if ingesterQueryScope.ComponentCount > 0 { + filteredQueryScopes = append(filteredQueryScopes, ingesterQueryScope) + } + if storeGatewayQueryScope.ComponentCount > 0 { + filteredQueryScopes = append(filteredQueryScopes, storeGatewayQueryScope) + } res := &querierv1.AnalyzeQueryResponse{ - QueryScopes: []*querierv1.QueryScope{ingesterQueryScope, storeGatewayQueryScope}, + QueryScopes: filteredQueryScopes, QueryImpact: &querierv1.QueryImpact{ TotalBytesRead: totalBytes, DeduplicationNeeded: deduplicationNeeded, From 862c67e18b47ab4f002ce87d140c9e4ef9705b86 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 3 May 2024 12:29:56 -0300 Subject: [PATCH 14/27] Revert "Only return query scopes that are in use" This reverts commit 649c2cce206e95d01ab0a80b6f15450d96b38d97. --- pkg/querier/querier.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 206b4cd4b9..003ef16c33 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -630,15 +630,8 @@ func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querier storeGatewayQueryScope.ProfileBytes + storeGatewayQueryScope.SymbolBytes - filteredQueryScopes := make([]*querierv1.QueryScope, 0) - if ingesterQueryScope.ComponentCount > 0 { - filteredQueryScopes = append(filteredQueryScopes, ingesterQueryScope) - } - if storeGatewayQueryScope.ComponentCount > 0 { - filteredQueryScopes = append(filteredQueryScopes, storeGatewayQueryScope) - } res := &querierv1.AnalyzeQueryResponse{ - QueryScopes: filteredQueryScopes, + QueryScopes: []*querierv1.QueryScope{ingesterQueryScope, storeGatewayQueryScope}, QueryImpact: &querierv1.QueryImpact{ TotalBytesRead: totalBytes, DeduplicationNeeded: deduplicationNeeded, From ad8f968d13aeb631d27c5aa1344e140215a304ae Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 3 May 2024 17:07:37 -0300 Subject: [PATCH 15/27] Improve readability, add unit tests, fix broken unit tests --- api/gen/proto/go/querier/v1/querier.pb.go | 21 +- .../proto/go/querier/v1/querier_vtproto.pb.go | 24 +- api/openapiv2/gen/phlare.swagger.json | 2 +- api/querier/v1/querier.proto | 2 +- pkg/phlaredb/phlaredb_test.go | 4 + pkg/querier/analyze_query.go | 169 +++++++++++ pkg/querier/analyze_query_test.go | 285 ++++++++++++++++++ pkg/querier/ingester_querier.go | 33 +- pkg/querier/querier.go | 113 ------- pkg/querier/querier_test.go | 18 +- pkg/querier/replication.go | 11 + pkg/querier/replication_test.go | 15 +- pkg/querier/store_gateway_querier.go | 33 +- 13 files changed, 550 insertions(+), 180 deletions(-) create mode 100644 pkg/querier/analyze_query.go create mode 100644 pkg/querier/analyze_query_test.go diff --git a/api/gen/proto/go/querier/v1/querier.pb.go b/api/gen/proto/go/querier/v1/querier.pb.go index 7e4b5d6d7d..1e206a1ec4 100644 --- a/api/gen/proto/go/querier/v1/querier.pb.go +++ b/api/gen/proto/go/querier/v1/querier.pb.go @@ -1430,10 +1430,10 @@ type QueryImpact struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type QueryImpactType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryImpactType" json:"type,omitempty"` - TotalBytesRead uint64 `protobuf:"varint,2,opt,name=total_bytes_read,json=totalBytesRead,proto3" json:"total_bytes_read,omitempty"` - TotalQueriedSeries uint64 `protobuf:"varint,3,opt,name=total_queried_series,json=totalQueriedSeries,proto3" json:"total_queried_series,omitempty"` - DeduplicationNeeded bool `protobuf:"varint,4,opt,name=deduplication_needed,json=deduplicationNeeded,proto3" json:"deduplication_needed,omitempty"` + Type QueryImpactType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryImpactType" json:"type,omitempty"` + TotalBytesInTimeRange uint64 `protobuf:"varint,2,opt,name=total_bytes_in_time_range,json=totalBytesInTimeRange,proto3" json:"total_bytes_in_time_range,omitempty"` + TotalQueriedSeries uint64 `protobuf:"varint,3,opt,name=total_queried_series,json=totalQueriedSeries,proto3" json:"total_queried_series,omitempty"` + DeduplicationNeeded bool `protobuf:"varint,4,opt,name=deduplication_needed,json=deduplicationNeeded,proto3" json:"deduplication_needed,omitempty"` } func (x *QueryImpact) Reset() { @@ -1475,9 +1475,9 @@ func (x *QueryImpact) GetType() QueryImpactType { return QueryImpactType_LOW } -func (x *QueryImpact) GetTotalBytesRead() uint64 { +func (x *QueryImpact) GetTotalBytesInTimeRange() uint64 { if x != nil { - return x.TotalBytesRead + return x.TotalBytesInTimeRange } return 0 } @@ -1685,13 +1685,14 @@ var file_querier_v1_querier_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, - 0xcd, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, + 0xdd, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, - 0x72, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, + 0x12, 0x38, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, + 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x49, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x14, diff --git a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go index 2c7c498e38..520801c590 100644 --- a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go +++ b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go @@ -516,10 +516,10 @@ func (m *QueryImpact) CloneVT() *QueryImpact { return (*QueryImpact)(nil) } r := &QueryImpact{ - Type: m.Type, - TotalBytesRead: m.TotalBytesRead, - TotalQueriedSeries: m.TotalQueriedSeries, - DeduplicationNeeded: m.DeduplicationNeeded, + Type: m.Type, + TotalBytesInTimeRange: m.TotalBytesInTimeRange, + TotalQueriedSeries: m.TotalQueriedSeries, + DeduplicationNeeded: m.DeduplicationNeeded, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -1190,7 +1190,7 @@ func (this *QueryImpact) EqualVT(that *QueryImpact) bool { if this.Type != that.Type { return false } - if this.TotalBytesRead != that.TotalBytesRead { + if this.TotalBytesInTimeRange != that.TotalBytesInTimeRange { return false } if this.TotalQueriedSeries != that.TotalQueriedSeries { @@ -2881,8 +2881,8 @@ func (m *QueryImpact) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - if m.TotalBytesRead != 0 { - i = encodeVarint(dAtA, i, uint64(m.TotalBytesRead)) + if m.TotalBytesInTimeRange != 0 { + i = encodeVarint(dAtA, i, uint64(m.TotalBytesInTimeRange)) i-- dAtA[i] = 0x10 } @@ -3387,8 +3387,8 @@ func (m *QueryImpact) SizeVT() (n int) { if m.Type != 0 { n += 1 + sov(uint64(m.Type)) } - if m.TotalBytesRead != 0 { - n += 1 + sov(uint64(m.TotalBytesRead)) + if m.TotalBytesInTimeRange != 0 { + n += 1 + sov(uint64(m.TotalBytesInTimeRange)) } if m.TotalQueriedSeries != 0 { n += 1 + sov(uint64(m.TotalQueriedSeries)) @@ -6187,9 +6187,9 @@ func (m *QueryImpact) UnmarshalVT(dAtA []byte) error { } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBytesRead", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalBytesInTimeRange", wireType) } - m.TotalBytesRead = 0 + m.TotalBytesInTimeRange = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6199,7 +6199,7 @@ func (m *QueryImpact) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TotalBytesRead |= uint64(b&0x7F) << shift + m.TotalBytesInTimeRange |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/api/openapiv2/gen/phlare.swagger.json b/api/openapiv2/gen/phlare.swagger.json index bf7b2335bc..d84c2198af 100644 --- a/api/openapiv2/gen/phlare.swagger.json +++ b/api/openapiv2/gen/phlare.swagger.json @@ -1114,7 +1114,7 @@ "type": { "$ref": "#/definitions/v1QueryImpactType" }, - "totalBytesRead": { + "totalBytesInTimeRange": { "type": "string", "format": "uint64" }, diff --git a/api/querier/v1/querier.proto b/api/querier/v1/querier.proto index 25b526eee8..1f2ef4f107 100644 --- a/api/querier/v1/querier.proto +++ b/api/querier/v1/querier.proto @@ -197,7 +197,7 @@ message QueryScope { message QueryImpact { QueryImpactType type = 1; - uint64 total_bytes_read = 2; + uint64 total_bytes_in_time_range = 2; uint64 total_queried_series = 3; bool deduplication_needed = 4; } diff --git a/pkg/phlaredb/phlaredb_test.go b/pkg/phlaredb/phlaredb_test.go index 3615b85ffa..b60cb3542b 100644 --- a/pkg/phlaredb/phlaredb_test.go +++ b/pkg/phlaredb/phlaredb_test.go @@ -145,6 +145,10 @@ func (i *ingesterHandlerPhlareDB) GetProfileStats(context.Context, *connect.Requ return nil, errors.New("not implemented") } +func (i *ingesterHandlerPhlareDB) GetBlockStats(context.Context, *connect.Request[ingestv1.GetBlockStatsRequest]) (*connect.Response[ingestv1.GetBlockStatsResponse], error) { + return nil, errors.New("not implemented") +} + func TestMergeProfilesStacktraces(t *testing.T) { defer goleak.VerifyNone(t, goleak.IgnoreCurrent()) diff --git a/pkg/querier/analyze_query.go b/pkg/querier/analyze_query.go new file mode 100644 index 0000000000..6cf263d654 --- /dev/null +++ b/pkg/querier/analyze_query.go @@ -0,0 +1,169 @@ +package querier + +import ( + "context" + + "connectrpc.com/connect" + "github.com/grafana/dskit/tenant" + "github.com/opentracing/opentracing-go" + "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/promql/parser" + + ingestv1 "github.com/grafana/pyroscope/api/gen/proto/go/ingester/v1" + querierv1 "github.com/grafana/pyroscope/api/gen/proto/go/querier/v1" + phlaremodel "github.com/grafana/pyroscope/pkg/model" +) + +type queryScope struct { + *querierv1.QueryScope + + blockIds []string +} + +func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querierv1.AnalyzeQueryRequest]) (*connect.Response[querierv1.AnalyzeQueryResponse], error) { + sp, ctx := opentracing.StartSpanFromContext(ctx, "AnalyzeQuery") + defer sp.Finish() + + plan, err := q.blockSelect(ctx, model.Time(req.Msg.Start), model.Time(req.Msg.End)) + ingesterQueryScope, storeGatewayQueryScope, deduplicationNeeded := getDataFromPlan(plan) + + blockStatsFromReplicas, err := q.getBlockStatsFromIngesters(ctx, plan, ingesterQueryScope.blockIds) + if err != nil { + return nil, err + } + addBlockStatsToQueryScope(blockStatsFromReplicas, ingesterQueryScope) + + blockStatsFromReplicas, err = q.getBlockStatsFromStoreGateways(ctx, plan, storeGatewayQueryScope.blockIds) + if err != nil { + return nil, err + } + addBlockStatsToQueryScope(blockStatsFromReplicas, storeGatewayQueryScope) + + queriedSeries, err := q.getQueriedSeriesCount(ctx, req.Msg) + if err != nil { + return nil, err + } + + res := createResponse(ingesterQueryScope, storeGatewayQueryScope) + res.QueryImpact.DeduplicationNeeded = deduplicationNeeded + res.QueryImpact.TotalQueriedSeries = queriedSeries + + return connect.NewResponse(res), nil +} + +func getDataFromPlan(plan blockPlan) (ingesterQueryScope *queryScope, storeGatewayQueryScope *queryScope, deduplicationNeeded bool) { + ingesterQueryScope = &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Short term storage", + }, + } + storeGatewayQueryScope = &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Long term storage", + }, + } + deduplicationNeeded = false + for _, planEntry := range plan { + deduplicationNeeded = deduplicationNeeded || planEntry.Deduplication + if planEntry.InstanceType == ingesterInstance { + ingesterQueryScope.ComponentCount += 1 + ingesterQueryScope.NumBlocks += uint64(len(planEntry.Ulids)) + ingesterQueryScope.blockIds = append(ingesterQueryScope.blockIds, planEntry.Ulids...) + } else { + storeGatewayQueryScope.ComponentCount += 1 + storeGatewayQueryScope.NumBlocks += uint64(len(planEntry.Ulids)) + storeGatewayQueryScope.blockIds = append(storeGatewayQueryScope.blockIds, planEntry.Ulids...) + } + } + return ingesterQueryScope, storeGatewayQueryScope, deduplicationNeeded +} + +func (q *Querier) getBlockStatsFromIngesters(ctx context.Context, plan blockPlan, ingesterBlockIds []string) ([]ResponseFromReplica[*ingestv1.GetBlockStatsResponse], error) { + var blockStatsFromReplicas []ResponseFromReplica[*ingestv1.GetBlockStatsResponse] + blockStatsFromReplicas, err := forAllPlannedIngesters(ctx, q.ingesterQuerier, plan, func(ctx context.Context, iq IngesterQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { + stats, err := iq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: ingesterBlockIds})) + if err != nil { + return nil, err + } + return stats.Msg, err + }) + return blockStatsFromReplicas, err +} + +func (q *Querier) getBlockStatsFromStoreGateways(ctx context.Context, plan blockPlan, storeGatewayBlockIds []string) ([]ResponseFromReplica[*ingestv1.GetBlockStatsResponse], error) { + tenantId, err := tenant.TenantID(ctx) + if err != nil { + return nil, err + } + blockStatsFromReplicas, err := forAllPlannedStoreGateways(ctx, tenantId, q.storeGatewayQuerier, plan, func(ctx context.Context, sq StoreGatewayQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { + stats, err := sq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: storeGatewayBlockIds})) + if err != nil { + return nil, err + } + return stats.Msg, err + }) + return blockStatsFromReplicas, nil +} + +func addBlockStatsToQueryScope(blockStatsFromReplicas []ResponseFromReplica[*ingestv1.GetBlockStatsResponse], queryScope *queryScope) { + for _, r := range blockStatsFromReplicas { + for _, stats := range r.response.BlockStats { + queryScope.NumSeries += stats.NumSeries + queryScope.NumProfiles += stats.NumProfiles + queryScope.NumSamples += stats.NumSamples + queryScope.IndexBytes += stats.IndexBytes + queryScope.ProfileBytes += stats.ProfilesBytes + queryScope.SymbolBytes += stats.SymbolsBytes + } + } +} + +func (q *Querier) getQueriedSeriesCount(ctx context.Context, req *querierv1.AnalyzeQueryRequest) (uint64, error) { + matchers, err := createMatchersFromQuery(req.Query) + if err != nil { + return 0, err + } + resSeries, err := q.Series(ctx, connect.NewRequest(&querierv1.SeriesRequest{ + Matchers: matchers, + Start: req.Start, + End: req.End, + })) + if err != nil { + return 0, err + } + return uint64(len(resSeries.Msg.LabelsSet)), nil +} + +func createMatchersFromQuery(query string) ([]string, error) { + var matchers []*labels.Matcher + var err error + if query != "" { + matchers, err = parser.ParseMetricSelector(query) + if err != nil { + return nil, err + } + } + for _, matcher := range matchers { + if matcher.Name == labels.MetricName { + matcher.Name = phlaremodel.LabelNameProfileType + } + } + return []string{convertMatchersToString(matchers)}, nil +} + +func createResponse(ingesterQueryScope *queryScope, storeGatewayQueryScope *queryScope) *querierv1.AnalyzeQueryResponse { + totalBytes := ingesterQueryScope.IndexBytes + + ingesterQueryScope.ProfileBytes + + ingesterQueryScope.SymbolBytes + + storeGatewayQueryScope.IndexBytes + + storeGatewayQueryScope.ProfileBytes + + storeGatewayQueryScope.SymbolBytes + + return &querierv1.AnalyzeQueryResponse{ + QueryScopes: []*querierv1.QueryScope{ingesterQueryScope.QueryScope, storeGatewayQueryScope.QueryScope}, + QueryImpact: &querierv1.QueryImpact{ + TotalBytesInTimeRange: totalBytes, + }, + } +} diff --git a/pkg/querier/analyze_query_test.go b/pkg/querier/analyze_query_test.go new file mode 100644 index 0000000000..141c4bab3c --- /dev/null +++ b/pkg/querier/analyze_query_test.go @@ -0,0 +1,285 @@ +package querier + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + ingestv1 "github.com/grafana/pyroscope/api/gen/proto/go/ingester/v1" + querierv1 "github.com/grafana/pyroscope/api/gen/proto/go/querier/v1" +) + +func Test_getDataFromPlan(t *testing.T) { + tests := []struct { + name string + plan blockPlan + wantIngesterQueryScope *queryScope + wantStoreGatewayQueryScope *queryScope + wantDeduplicationNeeded bool + }{ + { + name: "empty plan", + plan: blockPlan{}, + wantIngesterQueryScope: &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Short term storage", + }, + }, + wantStoreGatewayQueryScope: &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Long term storage", + }, + }, + wantDeduplicationNeeded: false, + }, + { + name: "plan with ingesters only", + plan: blockPlan{ + "replica 1": &blockPlanEntry{ + BlockHints: &ingestv1.BlockHints{Ulids: []string{"block A", "block B"}, Deduplication: true}, + InstanceType: ingesterInstance, + }, + "replica 2": &blockPlanEntry{ + BlockHints: &ingestv1.BlockHints{Ulids: []string{"block C", "block D"}, Deduplication: true}, + InstanceType: ingesterInstance, + }, + }, + wantIngesterQueryScope: &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Short term storage", + ComponentCount: 2, + NumBlocks: 4, + }, + blockIds: []string{"block A", "block B", "block C", "block D"}, + }, + wantStoreGatewayQueryScope: &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Long term storage", + }, + }, + wantDeduplicationNeeded: true, + }, + { + name: "plan with ingesters and store gateways", + plan: blockPlan{ + "replica 1": &blockPlanEntry{ + BlockHints: &ingestv1.BlockHints{Ulids: []string{"block A", "block B"}, Deduplication: true}, + InstanceType: ingesterInstance, + }, + "replica 2": &blockPlanEntry{ + BlockHints: &ingestv1.BlockHints{Ulids: []string{"block C", "block D"}, Deduplication: true}, + InstanceType: ingesterInstance, + }, + "replica 3": &blockPlanEntry{ + BlockHints: &ingestv1.BlockHints{Ulids: []string{"block E", "block F"}, Deduplication: true}, + InstanceType: storeGatewayInstance, + }, + }, + wantIngesterQueryScope: &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Short term storage", + ComponentCount: 2, + NumBlocks: 4, + }, + blockIds: []string{"block A", "block B", "block C", "block D"}, + }, + wantStoreGatewayQueryScope: &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Long term storage", + ComponentCount: 1, + NumBlocks: 2, + }, + blockIds: []string{"block E", "block F"}, + }, + wantDeduplicationNeeded: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + gotIngesterQueryScope, gotStoreGatewayQueryScope, gotDeduplicationNeeded := getDataFromPlan(tt.plan) + assert.Equalf(t, tt.wantIngesterQueryScope, gotIngesterQueryScope, "getDataFromPlan(%v)", tt.plan) + assert.Equalf(t, tt.wantStoreGatewayQueryScope, gotStoreGatewayQueryScope, "getDataFromPlan(%v)", tt.plan) + assert.Equalf(t, tt.wantDeduplicationNeeded, gotDeduplicationNeeded, "getDataFromPlan(%v)", tt.plan) + }) + } +} + +func Test_addBlockStatsToQueryScope(t *testing.T) { + type args struct { + blockStatsFromReplicas []ResponseFromReplica[*ingestv1.GetBlockStatsResponse] + queryScope *queryScope + } + tests := []struct { + name string + args args + verifyExpectations func(t *testing.T, s *queryScope) + }{ + { + name: "with empty block stats", + args: args{ + blockStatsFromReplicas: []ResponseFromReplica[*ingestv1.GetBlockStatsResponse]{}, + queryScope: &queryScope{QueryScope: &querierv1.QueryScope{}}, + }, + verifyExpectations: func(t *testing.T, s *queryScope) { + assert.Equalf(t, uint64(0), s.NumSeries, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(0), s.NumProfiles, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(0), s.NumSamples, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(0), s.IndexBytes, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(0), s.ProfileBytes, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(0), s.SymbolBytes, "addBlockStatsToQueryScope(%v)", s) + }, + }, + { + name: "with valid block stats", + args: args{ + blockStatsFromReplicas: []ResponseFromReplica[*ingestv1.GetBlockStatsResponse]{ + { + addr: "replica 1", + response: &ingestv1.GetBlockStatsResponse{ + BlockStats: []*ingestv1.BlockStats{ + { + NumSeries: 50, + NumProfiles: 100, + NumSamples: 2000, + IndexBytes: 1024, + ProfilesBytes: 4096, + SymbolsBytes: 65536, + }, + { + NumSeries: 100, + NumProfiles: 200, + NumSamples: 4000, + IndexBytes: 2048, + ProfilesBytes: 8192, + SymbolsBytes: 131072, + }, + }, + }, + }, + { + addr: "replica 2", + response: &ingestv1.GetBlockStatsResponse{ + BlockStats: []*ingestv1.BlockStats{ + { + NumSeries: 50, + NumProfiles: 100, + NumSamples: 2000, + IndexBytes: 1024, + ProfilesBytes: 4096, + SymbolsBytes: 65536, + }, + }, + }, + }, + }, + queryScope: &queryScope{QueryScope: &querierv1.QueryScope{}}, + }, + verifyExpectations: func(t *testing.T, s *queryScope) { + assert.Equalf(t, uint64(200), s.NumSeries, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(400), s.NumProfiles, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(8000), s.NumSamples, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(4096), s.IndexBytes, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(16384), s.ProfileBytes, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(262144), s.SymbolBytes, "addBlockStatsToQueryScope(%v)", s) + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + addBlockStatsToQueryScope(tt.args.blockStatsFromReplicas, tt.args.queryScope) + tt.verifyExpectations(t, tt.args.queryScope) + }) + } +} + +func Test_createResponse(t *testing.T) { + type args struct { + ingesterQueryScope *queryScope + storeGatewayQueryScope *queryScope + } + tests := []struct { + name string + args args + want *querierv1.AnalyzeQueryResponse + }{ + { + name: "happy path", + args: args{ + ingesterQueryScope: &queryScope{ + QueryScope: &querierv1.QueryScope{ + IndexBytes: 1024, + ProfileBytes: 2048, + SymbolBytes: 4096, + }, + }, + storeGatewayQueryScope: &queryScope{ + QueryScope: &querierv1.QueryScope{ + IndexBytes: 256, + ProfileBytes: 512, + SymbolBytes: 1024, + }, + }, + }, + want: &querierv1.AnalyzeQueryResponse{ + QueryScopes: []*querierv1.QueryScope{ + { + IndexBytes: 1024, + ProfileBytes: 2048, + SymbolBytes: 4096, + }, + { + IndexBytes: 256, + ProfileBytes: 512, + SymbolBytes: 1024, + }, + }, + QueryImpact: &querierv1.QueryImpact{ + TotalBytesInTimeRange: 8960, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equalf(t, tt.want, createResponse(tt.args.ingesterQueryScope, tt.args.storeGatewayQueryScope), "createResponse(%v, %v)", tt.args.ingesterQueryScope, tt.args.storeGatewayQueryScope) + }) + } +} + +func Test_createMatchersFromQuery(t *testing.T) { + tests := []struct { + name string + query string + want []string + wantErr bool + }{ + { + name: "empty query", + query: "", + want: []string{"{}"}, + wantErr: false, + }, + { + name: "query with a profile type", + query: "process_cpu:cpu:nanoseconds:cpu:nanoseconds{}", + want: []string{"{__profile_type__=\"process_cpu:cpu:nanoseconds:cpu:nanoseconds\"}"}, + wantErr: false, + }, + { + name: "query with labels", + query: "process_cpu:cpu:nanoseconds:cpu:nanoseconds{namespace=\"dev\"}", + want: []string{"{namespace=\"dev\",__profile_type__=\"process_cpu:cpu:nanoseconds:cpu:nanoseconds\"}"}, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := createMatchersFromQuery(tt.query) + if (err != nil) != tt.wantErr { + t.Errorf("Get() error = %v, wantErr %v", err, tt.wantErr) + return + } + assert.Equalf(t, tt.want, got, "createMatchersFromQuery(%v)", tt.query) + }) + } +} diff --git a/pkg/querier/ingester_querier.go b/pkg/querier/ingester_querier.go index d8c0a9a374..ab2a78fc43 100644 --- a/pkg/querier/ingester_querier.go +++ b/pkg/querier/ingester_querier.go @@ -2,7 +2,6 @@ package querier import ( "context" - "fmt" "connectrpc.com/connect" "github.com/grafana/dskit/ring" @@ -115,9 +114,9 @@ func (q *Querier) selectTreeFromIngesters(ctx context.Context, req *querierv1.Se g, gCtx := errgroup.WithContext(ctx) for idx := range responses { r := responses[idx] - planEntry, ok := plan[r.addr] - if !ok && plan != nil { - return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) + blockHints, err := BlockHints(plan, r.addr) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) } g.Go(util.RecoverPanic(func() error { @@ -127,7 +126,7 @@ func (q *Querier) selectTreeFromIngesters(ctx context.Context, req *querierv1.Se Start: req.Start, End: req.End, Type: profileType, - Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, + Hints: &ingestv1.Hints{Block: blockHints}, }, MaxNodes: req.MaxNodes, }) @@ -172,9 +171,9 @@ func (q *Querier) selectProfileFromIngesters(ctx context.Context, req *querierv1 g, gCtx := errgroup.WithContext(ctx) for idx := range responses { r := responses[idx] - planEntry, ok := plan[r.addr] - if !ok && plan != nil { - return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) + blockHints, err := BlockHints(plan, r.addr) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) } g.Go(util.RecoverPanic(func() error { @@ -184,7 +183,7 @@ func (q *Querier) selectProfileFromIngesters(ctx context.Context, req *querierv1 Start: req.Start, End: req.End, Type: profileType, - Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, + Hints: &ingestv1.Hints{Block: blockHints}, }, MaxNodes: req.MaxNodes, StackTraceSelector: req.StackTraceSelector, @@ -222,13 +221,13 @@ func (q *Querier) selectSeriesFromIngesters(ctx context.Context, req *ingesterv1 g, _ := errgroup.WithContext(ctx) for _, r := range responses { r := r - planEntry, ok := plan[r.addr] - if !ok && plan != nil { - return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) + blockHints, err := BlockHints(plan, r.addr) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) } g.Go(util.RecoverPanic(func() error { req := req.CloneVT() - req.Request.Hints = &ingestv1.Hints{Block: planEntry.BlockHints} + req.Request.Hints = &ingestv1.Hints{Block: blockHints} return r.response.Send(req) })) } @@ -325,9 +324,9 @@ func (q *Querier) selectSpanProfileFromIngesters(ctx context.Context, req *queri g, gCtx := errgroup.WithContext(ctx) for idx := range responses { r := responses[idx] - planEntry, ok := plan[r.addr] - if !ok && plan != nil { - return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) + blockHints, err := BlockHints(plan, r.addr) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) } g.Go(util.RecoverPanic(func() error { @@ -338,7 +337,7 @@ func (q *Querier) selectSpanProfileFromIngesters(ctx context.Context, req *queri End: req.End, Type: profileType, SpanSelector: req.SpanSelector, - Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, + Hints: &ingestv1.Hints{Block: blockHints}, }, MaxNodes: req.MaxNodes, }) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 003ef16c33..4a5ee032c0 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -23,7 +23,6 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql/parser" "github.com/samber/lo" "golang.org/x/sync/errgroup" @@ -573,118 +572,6 @@ func (q *Querier) GetProfileStats(ctx context.Context, req *connect.Request[type return connect.NewResponse(response), nil } -func (q *Querier) AnalyzeQuery(ctx context.Context, req *connect.Request[querierv1.AnalyzeQueryRequest]) (*connect.Response[querierv1.AnalyzeQueryResponse], error) { - sp, ctx := opentracing.StartSpanFromContext(ctx, "AnalyzeQuery") - defer sp.Finish() - - plan, err := q.blockSelect(ctx, model.Time(req.Msg.Start), model.Time(req.Msg.End)) - - ingesterQueryScope := &querierv1.QueryScope{ - ComponentType: "Short term storage", - } - storeGatewayQueryScope := &querierv1.QueryScope{ - ComponentType: "Long term storage", - } - ingesterBlockIds := make([]string, 0) - storeGatewayBlockIds := make([]string, 0) - deduplicationNeeded := false - for _, planEntry := range plan { - deduplicationNeeded = deduplicationNeeded || planEntry.Deduplication - if planEntry.InstanceType == ingesterInstance { - ingesterQueryScope.ComponentCount += 1 - ingesterQueryScope.NumBlocks += uint64(len(planEntry.Ulids)) - ingesterBlockIds = append(ingesterBlockIds, planEntry.Ulids...) - } else { - storeGatewayQueryScope.ComponentCount += 1 - storeGatewayQueryScope.NumBlocks += uint64(len(planEntry.Ulids)) - storeGatewayBlockIds = append(storeGatewayBlockIds, planEntry.Ulids...) - } - } - - var blockStatsFromReplicas []ResponseFromReplica[*ingestv1.GetBlockStatsResponse] - blockStatsFromReplicas, err = forAllPlannedIngesters(ctx, q.ingesterQuerier, plan, func(ctx context.Context, iq IngesterQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { - stats, err := iq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: ingesterBlockIds})) - if err != nil { - return nil, err - } - return stats.Msg, err - }) - addBlockStatsToQueryScope(blockStatsFromReplicas, ingesterQueryScope) - - tenantId, err := tenant.TenantID(ctx) - if err != nil { - return nil, err - } - blockStatsFromReplicas, err = forAllPlannedStoreGateways(ctx, tenantId, q.storeGatewayQuerier, plan, func(ctx context.Context, sq StoreGatewayQueryClient, hint *ingestv1.Hints) (*ingestv1.GetBlockStatsResponse, error) { - stats, err := sq.GetBlockStats(ctx, connect.NewRequest(&ingestv1.GetBlockStatsRequest{Ulids: storeGatewayBlockIds})) - if err != nil { - return nil, err - } - return stats.Msg, err - }) - addBlockStatsToQueryScope(blockStatsFromReplicas, storeGatewayQueryScope) - totalBytes := ingesterQueryScope.IndexBytes + - ingesterQueryScope.ProfileBytes + - ingesterQueryScope.SymbolBytes + - storeGatewayQueryScope.IndexBytes + - storeGatewayQueryScope.ProfileBytes + - storeGatewayQueryScope.SymbolBytes - - res := &querierv1.AnalyzeQueryResponse{ - QueryScopes: []*querierv1.QueryScope{ingesterQueryScope, storeGatewayQueryScope}, - QueryImpact: &querierv1.QueryImpact{ - TotalBytesRead: totalBytes, - DeduplicationNeeded: deduplicationNeeded, - }, - } - - queriedSeries, err := q.getQueriedSeriesCount(ctx, req.Msg) - if err != nil { - return nil, err - } - res.QueryImpact.TotalQueriedSeries = queriedSeries - - return connect.NewResponse(res), nil -} - -func addBlockStatsToQueryScope(blockStatsFromReplicas []ResponseFromReplica[*ingestv1.GetBlockStatsResponse], ingesterQueryScope *querierv1.QueryScope) { - for _, r := range blockStatsFromReplicas { - for _, stats := range r.response.BlockStats { - ingesterQueryScope.NumSeries += stats.NumSeries - ingesterQueryScope.NumProfiles += stats.NumProfiles - ingesterQueryScope.NumSamples += stats.NumSamples - ingesterQueryScope.IndexBytes += stats.IndexBytes - ingesterQueryScope.ProfileBytes += stats.ProfilesBytes - ingesterQueryScope.SymbolBytes += stats.SymbolsBytes - } - } -} - -func (q *Querier) getQueriedSeriesCount(ctx context.Context, req *querierv1.AnalyzeQueryRequest) (uint64, error) { - var matchers []*labels.Matcher - var err error - if req.Query != "" { - matchers, err = parser.ParseMetricSelector(req.Query) - if err != nil { - return 0, err - } - } - for _, matcher := range matchers { - if matcher.Name == labels.MetricName { - matcher.Name = phlaremodel.LabelNameProfileType - } - } - resSeries, err := q.Series(ctx, connect.NewRequest(&querierv1.SeriesRequest{ - Matchers: []string{convertMatchersToString(matchers)}, - Start: req.Start, - End: req.End, - })) - if err != nil { - return 0, err - } - return uint64(len(resSeries.Msg.LabelsSet)), nil -} - func (q *Querier) SelectMergeStacktraces(ctx context.Context, req *connect.Request[querierv1.SelectMergeStacktracesRequest]) (*connect.Response[querierv1.SelectMergeStacktracesResponse], error) { sp, ctx := opentracing.StartSpanFromContext(ctx, "SelectMergeStacktraces") level.Info(spanlogger.FromContext(ctx, q.logger)).Log( diff --git a/pkg/querier/querier_test.go b/pkg/querier/querier_test.go index 5aed2e56e3..bc71906b80 100644 --- a/pkg/querier/querier_test.go +++ b/pkg/querier/querier_test.go @@ -748,6 +748,22 @@ func (f *fakeQuerierIngester) GetProfileStats(ctx context.Context, req *connect. return res, err } +func (f *fakeQuerierIngester) GetBlockStats(ctx context.Context, req *connect.Request[ingestv1.GetBlockStatsRequest]) (*connect.Response[ingestv1.GetBlockStatsResponse], error) { + var ( + args = f.Called(ctx, req) + res *connect.Response[ingestv1.GetBlockStatsResponse] + err error + ) + if args[0] != nil { + res = args[0].(*connect.Response[ingestv1.GetBlockStatsResponse]) + } + if args[1] != nil { + err = args.Get(1).(error) + } + + return res, err +} + type testProfile struct { Ts int64 Labels *typesv1.Labels @@ -1334,7 +1350,7 @@ func Test_splitQueryToStores(t *testing.T) { start: model.TimeFromUnixNano(int64(30 * time.Minute)), end: model.TimeFromUnixNano(int64(45*time.Minute) + int64(3*time.Hour)), queryStoreAfter: 30 * time.Minute, - plan: blockPlan{"replica-a": &ingestv1.BlockHints{Ulids: []string{"block-a", "block-b"}}}, + plan: blockPlan{"replica-a": &blockPlanEntry{InstanceType: ingesterInstance, BlockHints: &ingestv1.BlockHints{Ulids: []string{"block-a", "block-b"}}}}, expected: storeQueries{ queryStoreAfter: 0, diff --git a/pkg/querier/replication.go b/pkg/querier/replication.go index a2f87dfaaa..a0c92ee740 100644 --- a/pkg/querier/replication.go +++ b/pkg/querier/replication.go @@ -327,6 +327,17 @@ type blockPlanEntry struct { type blockPlan map[string]*blockPlanEntry +func BlockHints(p blockPlan, replica string) (*ingestv1.BlockHints, error) { + entry, ok := p[replica] + if !ok && p != nil { + return nil, fmt.Errorf("no hints found for replica %s", replica) + } + if entry == nil { + return nil, nil + } + return entry.BlockHints, nil +} + func (p blockPlan) String() string { data, _ := json.Marshal(p) return string(data) diff --git a/pkg/querier/replication_test.go b/pkg/querier/replication_test.go index 79abd2b2d1..ea452181ca 100644 --- a/pkg/querier/replication_test.go +++ b/pkg/querier/replication_test.go @@ -11,7 +11,6 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - ingestv1 "github.com/grafana/pyroscope/api/gen/proto/go/ingester/v1" typesv1 "github.com/grafana/pyroscope/api/gen/proto/go/types/v1" "github.com/grafana/pyroscope/pkg/phlaredb/sharding" ) @@ -71,13 +70,13 @@ func (b *blockInfo) info() *typesv1.BlockInfo { return &b.i } -type validatorFunc func(t *testing.T, plan map[string]*ingestv1.BlockHints) +type validatorFunc func(t *testing.T, plan map[string]*blockPlanEntry) func validatePlanBlockIDs(expBlockIDs ...string) validatorFunc { - return func(t *testing.T, plan map[string]*ingestv1.BlockHints) { + return func(t *testing.T, plan map[string]*blockPlanEntry) { var blockIDs []string - for _, hints := range plan { - blockIDs = append(blockIDs, hints.Ulids...) + for _, planEntry := range plan { + blockIDs = append(blockIDs, planEntry.Ulids...) } sort.Strings(blockIDs) require.Equal(t, expBlockIDs, blockIDs) @@ -85,11 +84,11 @@ func validatePlanBlockIDs(expBlockIDs ...string) validatorFunc { } func validatePlanBlocksOnReplica(replica string, blocks ...string) validatorFunc { - return func(t *testing.T, plan map[string]*ingestv1.BlockHints) { - blockHints, ok := plan[replica] + return func(t *testing.T, plan map[string]*blockPlanEntry) { + planEntry, ok := plan[replica] require.True(t, ok, fmt.Sprintf("replica %s not found in plan", replica)) for _, block := range blocks { - require.Contains(t, blockHints.Ulids, block, "block %s not found in replica's %s plan", block, replica) + require.Contains(t, planEntry.Ulids, block, "block %s not found in replica's %s plan", block, replica) } } } diff --git a/pkg/querier/store_gateway_querier.go b/pkg/querier/store_gateway_querier.go index 59ac3c8223..6a53350980 100644 --- a/pkg/querier/store_gateway_querier.go +++ b/pkg/querier/store_gateway_querier.go @@ -2,7 +2,6 @@ package querier import ( "context" - "fmt" "connectrpc.com/connect" "github.com/go-kit/log" @@ -210,9 +209,9 @@ func (q *Querier) selectTreeFromStoreGateway(ctx context.Context, req *querierv1 g, gCtx := errgroup.WithContext(ctx) for _, r := range responses { r := r - planEntry, ok := plan[r.addr] - if !ok && plan != nil { - return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) + blockHints, err := BlockHints(plan, r.addr) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) } g.Go(util.RecoverPanic(func() error { return r.response.Send(&ingestv1.MergeProfilesStacktracesRequest{ @@ -221,7 +220,7 @@ func (q *Querier) selectTreeFromStoreGateway(ctx context.Context, req *querierv1 Start: req.Start, End: req.End, Type: profileType, - Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, + Hints: &ingestv1.Hints{Block: blockHints}, }, MaxNodes: req.MaxNodes, }) @@ -270,9 +269,9 @@ func (q *Querier) selectProfileFromStoreGateway(ctx context.Context, req *querie g, gCtx := errgroup.WithContext(ctx) for _, r := range responses { r := r - planEntry, ok := plan[r.addr] - if !ok && plan != nil { - return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) + blockHints, err := BlockHints(plan, r.addr) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) } g.Go(util.RecoverPanic(func() error { return r.response.Send(&ingestv1.MergeProfilesPprofRequest{ @@ -281,7 +280,7 @@ func (q *Querier) selectProfileFromStoreGateway(ctx context.Context, req *querie Start: req.Start, End: req.End, Type: profileType, - Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, + Hints: &ingestv1.Hints{Block: blockHints}, }, MaxNodes: req.MaxNodes, StackTraceSelector: req.StackTraceSelector, @@ -321,13 +320,13 @@ func (q *Querier) selectSeriesFromStoreGateway(ctx context.Context, req *ingeste g, _ := errgroup.WithContext(ctx) for _, r := range responses { r := r - planEntry, ok := plan[r.addr] - if !ok && plan != nil { - return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) + blockHints, err := BlockHints(plan, r.addr) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) } g.Go(util.RecoverPanic(func() error { req := req.CloneVT() - req.Request.Hints = &ingestv1.Hints{Block: planEntry.BlockHints} + req.Request.Hints = &ingestv1.Hints{Block: blockHints} return r.response.Send(req) })) } @@ -438,9 +437,9 @@ func (q *Querier) selectSpanProfileFromStoreGateway(ctx context.Context, req *qu g, gCtx := errgroup.WithContext(ctx) for _, r := range responses { r := r - planEntry, ok := plan[r.addr] - if !ok && plan != nil { - return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("no hints found for replica %s", r.addr)) + blockHints, err := BlockHints(plan, r.addr) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) } g.Go(util.RecoverPanic(func() error { return r.response.Send(&ingestv1.MergeSpanProfileRequest{ @@ -450,7 +449,7 @@ func (q *Querier) selectSpanProfileFromStoreGateway(ctx context.Context, req *qu End: req.End, Type: profileType, SpanSelector: req.SpanSelector, - Hints: &ingestv1.Hints{Block: planEntry.BlockHints}, + Hints: &ingestv1.Hints{Block: blockHints}, }, MaxNodes: req.MaxNodes, }) From 0a4eb345fa7cc7dd47c1092c4d88442ffe6e6ca7 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 3 May 2024 18:26:14 -0300 Subject: [PATCH 16/27] Remove unused fields in proto spec --- api/gen/proto/go/querier/v1/querier.pb.go | 551 +++++++----------- .../proto/go/querier/v1/querier_vtproto.pb.go | 62 -- api/openapiv2/gen/phlare.swagger.json | 27 - api/querier/v1/querier.proto | 26 - 4 files changed, 195 insertions(+), 471 deletions(-) diff --git a/api/gen/proto/go/querier/v1/querier.pb.go b/api/gen/proto/go/querier/v1/querier.pb.go index 1e206a1ec4..1ee29ec141 100644 --- a/api/gen/proto/go/querier/v1/querier.pb.go +++ b/api/gen/proto/go/querier/v1/querier.pb.go @@ -22,122 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type QueryType int32 - -const ( - QueryType_PROFILE_TYPES QueryType = 0 - QueryType_LABEL_NAMES QueryType = 1 - QueryType_LABEL_VALUES QueryType = 2 - QueryType_SERIES QueryType = 3 - QueryType_FLAME_GRAPH QueryType = 4 - QueryType_SPAN_PROFILE_FLAME_GRAPH QueryType = 5 - QueryType_PPROF QueryType = 6 - QueryType_TIME_SERIES QueryType = 7 - QueryType_DIFF QueryType = 8 -) - -// Enum value maps for QueryType. -var ( - QueryType_name = map[int32]string{ - 0: "PROFILE_TYPES", - 1: "LABEL_NAMES", - 2: "LABEL_VALUES", - 3: "SERIES", - 4: "FLAME_GRAPH", - 5: "SPAN_PROFILE_FLAME_GRAPH", - 6: "PPROF", - 7: "TIME_SERIES", - 8: "DIFF", - } - QueryType_value = map[string]int32{ - "PROFILE_TYPES": 0, - "LABEL_NAMES": 1, - "LABEL_VALUES": 2, - "SERIES": 3, - "FLAME_GRAPH": 4, - "SPAN_PROFILE_FLAME_GRAPH": 5, - "PPROF": 6, - "TIME_SERIES": 7, - "DIFF": 8, - } -) - -func (x QueryType) Enum() *QueryType { - p := new(QueryType) - *p = x - return p -} - -func (x QueryType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (QueryType) Descriptor() protoreflect.EnumDescriptor { - return file_querier_v1_querier_proto_enumTypes[0].Descriptor() -} - -func (QueryType) Type() protoreflect.EnumType { - return &file_querier_v1_querier_proto_enumTypes[0] -} - -func (x QueryType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use QueryType.Descriptor instead. -func (QueryType) EnumDescriptor() ([]byte, []int) { - return file_querier_v1_querier_proto_rawDescGZIP(), []int{0} -} - -type QueryImpactType int32 - -const ( - QueryImpactType_LOW QueryImpactType = 0 - QueryImpactType_MEDIUM QueryImpactType = 1 - QueryImpactType_HIGH QueryImpactType = 2 -) - -// Enum value maps for QueryImpactType. -var ( - QueryImpactType_name = map[int32]string{ - 0: "LOW", - 1: "MEDIUM", - 2: "HIGH", - } - QueryImpactType_value = map[string]int32{ - "LOW": 0, - "MEDIUM": 1, - "HIGH": 2, - } -) - -func (x QueryImpactType) Enum() *QueryImpactType { - p := new(QueryImpactType) - *p = x - return p -} - -func (x QueryImpactType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (QueryImpactType) Descriptor() protoreflect.EnumDescriptor { - return file_querier_v1_querier_proto_enumTypes[1].Descriptor() -} - -func (QueryImpactType) Type() protoreflect.EnumType { - return &file_querier_v1_querier_proto_enumTypes[1] -} - -func (x QueryImpactType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use QueryImpactType.Descriptor instead. -func (QueryImpactType) EnumDescriptor() ([]byte, []int) { - return file_querier_v1_querier_proto_rawDescGZIP(), []int{1} -} - type ProfileTypesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1189,12 +1073,7 @@ type AnalyzeQueryRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type QueryType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryType" json:"type,omitempty"` - // Milliseconds since epoch. If missing or zero, only the ingesters will be - // queried. - Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` - // Milliseconds since epoch. If missing or zero, only the ingesters will be - // queried. + Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` } @@ -1231,13 +1110,6 @@ func (*AnalyzeQueryRequest) Descriptor() ([]byte, []int) { return file_querier_v1_querier_proto_rawDescGZIP(), []int{16} } -func (x *AnalyzeQueryRequest) GetType() QueryType { - if x != nil { - return x.Type - } - return QueryType_PROFILE_TYPES -} - func (x *AnalyzeQueryRequest) GetStart() int64 { if x != nil { return x.Start @@ -1430,10 +1302,9 @@ type QueryImpact struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type QueryImpactType `protobuf:"varint,1,opt,name=type,proto3,enum=querier.v1.QueryImpactType" json:"type,omitempty"` - TotalBytesInTimeRange uint64 `protobuf:"varint,2,opt,name=total_bytes_in_time_range,json=totalBytesInTimeRange,proto3" json:"total_bytes_in_time_range,omitempty"` - TotalQueriedSeries uint64 `protobuf:"varint,3,opt,name=total_queried_series,json=totalQueriedSeries,proto3" json:"total_queried_series,omitempty"` - DeduplicationNeeded bool `protobuf:"varint,4,opt,name=deduplication_needed,json=deduplicationNeeded,proto3" json:"deduplication_needed,omitempty"` + TotalBytesInTimeRange uint64 `protobuf:"varint,2,opt,name=total_bytes_in_time_range,json=totalBytesInTimeRange,proto3" json:"total_bytes_in_time_range,omitempty"` + TotalQueriedSeries uint64 `protobuf:"varint,3,opt,name=total_queried_series,json=totalQueriedSeries,proto3" json:"total_queried_series,omitempty"` + DeduplicationNeeded bool `protobuf:"varint,4,opt,name=deduplication_needed,json=deduplicationNeeded,proto3" json:"deduplication_needed,omitempty"` } func (x *QueryImpact) Reset() { @@ -1468,13 +1339,6 @@ func (*QueryImpact) Descriptor() ([]byte, []int) { return file_querier_v1_querier_proto_rawDescGZIP(), []int{19} } -func (x *QueryImpact) GetType() QueryImpactType { - if x != nil { - return x.Type - } - return QueryImpactType_LOW -} - func (x *QueryImpact) GetTotalBytesInTimeRange() uint64 { if x != nil { return x.TotalBytesInTimeRange @@ -1647,143 +1511,124 @@ var file_querier_v1_querier_proto_rawDesc = []byte{ 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x06, 0x73, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x13, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x8d, 0x01, 0x0a, 0x14, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, - 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, - 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0b, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, - 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x53, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, - 0xdd, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, - 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x38, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, - 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x49, - 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x51, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x14, - 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x65, - 0x65, 0x64, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x65, 0x64, 0x75, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x2a, - 0xa2, 0x01, 0x0a, 0x09, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, - 0x0d, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x10, 0x00, - 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, - 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, - 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x03, 0x12, - 0x0f, 0x0a, 0x0b, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x04, - 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, - 0x5f, 0x46, 0x4c, 0x41, 0x4d, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x10, 0x05, 0x12, 0x09, - 0x0a, 0x05, 0x50, 0x50, 0x52, 0x4f, 0x46, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, - 0x45, 0x5f, 0x53, 0x45, 0x52, 0x49, 0x45, 0x53, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x49, - 0x46, 0x46, 0x10, 0x08, 0x2a, 0x30, 0x0a, 0x0f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, - 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, - 0x48, 0x49, 0x47, 0x48, 0x10, 0x02, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, - 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x12, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x22, 0x53, 0x0a, 0x13, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x65, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x8d, 0x01, 0x0a, 0x14, 0x41, + 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x3a, + 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, + 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, + 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, + 0x6d, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, + 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, + 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0a, 0x6e, 0x75, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, + 0x70, 0x61, 0x63, 0x74, 0x12, 0x38, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x49, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x30, + 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x5f, + 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x31, 0x0a, 0x14, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, + 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x65, + 0x64, 0x65, 0x64, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x19, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, - 0x61, 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, - 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, + 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, - 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, - 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x51, 0x0a, 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, - 0x69, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, - 0x12, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, - 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x53, 0x0a, 0x0c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, - 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, - 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, - 0x31, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, - 0x58, 0xaa, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, + 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x00, + 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x17, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, + 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, + 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, + 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1798,89 +1643,84 @@ func file_querier_v1_querier_proto_rawDescGZIP() []byte { return file_querier_v1_querier_proto_rawDescData } -var file_querier_v1_querier_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_querier_v1_querier_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_querier_v1_querier_proto_goTypes = []interface{}{ - (QueryType)(0), // 0: querier.v1.QueryType - (QueryImpactType)(0), // 1: querier.v1.QueryImpactType - (*ProfileTypesRequest)(nil), // 2: querier.v1.ProfileTypesRequest - (*ProfileTypesResponse)(nil), // 3: querier.v1.ProfileTypesResponse - (*SeriesRequest)(nil), // 4: querier.v1.SeriesRequest - (*SeriesResponse)(nil), // 5: querier.v1.SeriesResponse - (*SelectMergeStacktracesRequest)(nil), // 6: querier.v1.SelectMergeStacktracesRequest - (*SelectMergeStacktracesResponse)(nil), // 7: querier.v1.SelectMergeStacktracesResponse - (*SelectMergeSpanProfileRequest)(nil), // 8: querier.v1.SelectMergeSpanProfileRequest - (*SelectMergeSpanProfileResponse)(nil), // 9: querier.v1.SelectMergeSpanProfileResponse - (*DiffRequest)(nil), // 10: querier.v1.DiffRequest - (*DiffResponse)(nil), // 11: querier.v1.DiffResponse - (*FlameGraph)(nil), // 12: querier.v1.FlameGraph - (*FlameGraphDiff)(nil), // 13: querier.v1.FlameGraphDiff - (*Level)(nil), // 14: querier.v1.Level - (*SelectMergeProfileRequest)(nil), // 15: querier.v1.SelectMergeProfileRequest - (*SelectSeriesRequest)(nil), // 16: querier.v1.SelectSeriesRequest - (*SelectSeriesResponse)(nil), // 17: querier.v1.SelectSeriesResponse - (*AnalyzeQueryRequest)(nil), // 18: querier.v1.AnalyzeQueryRequest - (*AnalyzeQueryResponse)(nil), // 19: querier.v1.AnalyzeQueryResponse - (*QueryScope)(nil), // 20: querier.v1.QueryScope - (*QueryImpact)(nil), // 21: querier.v1.QueryImpact - (*v1.ProfileType)(nil), // 22: types.v1.ProfileType - (*v1.Labels)(nil), // 23: types.v1.Labels - (*v1.StackTraceSelector)(nil), // 24: types.v1.StackTraceSelector - (v1.TimeSeriesAggregationType)(0), // 25: types.v1.TimeSeriesAggregationType - (*v1.Series)(nil), // 26: types.v1.Series - (*v1.LabelValuesRequest)(nil), // 27: types.v1.LabelValuesRequest - (*v1.LabelNamesRequest)(nil), // 28: types.v1.LabelNamesRequest - (*v1.GetProfileStatsRequest)(nil), // 29: types.v1.GetProfileStatsRequest - (*v1.LabelValuesResponse)(nil), // 30: types.v1.LabelValuesResponse - (*v1.LabelNamesResponse)(nil), // 31: types.v1.LabelNamesResponse - (*v11.Profile)(nil), // 32: google.v1.Profile - (*v1.GetProfileStatsResponse)(nil), // 33: types.v1.GetProfileStatsResponse + (*ProfileTypesRequest)(nil), // 0: querier.v1.ProfileTypesRequest + (*ProfileTypesResponse)(nil), // 1: querier.v1.ProfileTypesResponse + (*SeriesRequest)(nil), // 2: querier.v1.SeriesRequest + (*SeriesResponse)(nil), // 3: querier.v1.SeriesResponse + (*SelectMergeStacktracesRequest)(nil), // 4: querier.v1.SelectMergeStacktracesRequest + (*SelectMergeStacktracesResponse)(nil), // 5: querier.v1.SelectMergeStacktracesResponse + (*SelectMergeSpanProfileRequest)(nil), // 6: querier.v1.SelectMergeSpanProfileRequest + (*SelectMergeSpanProfileResponse)(nil), // 7: querier.v1.SelectMergeSpanProfileResponse + (*DiffRequest)(nil), // 8: querier.v1.DiffRequest + (*DiffResponse)(nil), // 9: querier.v1.DiffResponse + (*FlameGraph)(nil), // 10: querier.v1.FlameGraph + (*FlameGraphDiff)(nil), // 11: querier.v1.FlameGraphDiff + (*Level)(nil), // 12: querier.v1.Level + (*SelectMergeProfileRequest)(nil), // 13: querier.v1.SelectMergeProfileRequest + (*SelectSeriesRequest)(nil), // 14: querier.v1.SelectSeriesRequest + (*SelectSeriesResponse)(nil), // 15: querier.v1.SelectSeriesResponse + (*AnalyzeQueryRequest)(nil), // 16: querier.v1.AnalyzeQueryRequest + (*AnalyzeQueryResponse)(nil), // 17: querier.v1.AnalyzeQueryResponse + (*QueryScope)(nil), // 18: querier.v1.QueryScope + (*QueryImpact)(nil), // 19: querier.v1.QueryImpact + (*v1.ProfileType)(nil), // 20: types.v1.ProfileType + (*v1.Labels)(nil), // 21: types.v1.Labels + (*v1.StackTraceSelector)(nil), // 22: types.v1.StackTraceSelector + (v1.TimeSeriesAggregationType)(0), // 23: types.v1.TimeSeriesAggregationType + (*v1.Series)(nil), // 24: types.v1.Series + (*v1.LabelValuesRequest)(nil), // 25: types.v1.LabelValuesRequest + (*v1.LabelNamesRequest)(nil), // 26: types.v1.LabelNamesRequest + (*v1.GetProfileStatsRequest)(nil), // 27: types.v1.GetProfileStatsRequest + (*v1.LabelValuesResponse)(nil), // 28: types.v1.LabelValuesResponse + (*v1.LabelNamesResponse)(nil), // 29: types.v1.LabelNamesResponse + (*v11.Profile)(nil), // 30: google.v1.Profile + (*v1.GetProfileStatsResponse)(nil), // 31: types.v1.GetProfileStatsResponse } var file_querier_v1_querier_proto_depIdxs = []int32{ - 22, // 0: querier.v1.ProfileTypesResponse.profile_types:type_name -> types.v1.ProfileType - 23, // 1: querier.v1.SeriesResponse.labels_set:type_name -> types.v1.Labels - 12, // 2: querier.v1.SelectMergeStacktracesResponse.flamegraph:type_name -> querier.v1.FlameGraph - 12, // 3: querier.v1.SelectMergeSpanProfileResponse.flamegraph:type_name -> querier.v1.FlameGraph - 6, // 4: querier.v1.DiffRequest.left:type_name -> querier.v1.SelectMergeStacktracesRequest - 6, // 5: querier.v1.DiffRequest.right:type_name -> querier.v1.SelectMergeStacktracesRequest - 13, // 6: querier.v1.DiffResponse.flamegraph:type_name -> querier.v1.FlameGraphDiff - 14, // 7: querier.v1.FlameGraph.levels:type_name -> querier.v1.Level - 14, // 8: querier.v1.FlameGraphDiff.levels:type_name -> querier.v1.Level - 24, // 9: querier.v1.SelectMergeProfileRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector - 25, // 10: querier.v1.SelectSeriesRequest.aggregation:type_name -> types.v1.TimeSeriesAggregationType - 24, // 11: querier.v1.SelectSeriesRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector - 26, // 12: querier.v1.SelectSeriesResponse.series:type_name -> types.v1.Series - 0, // 13: querier.v1.AnalyzeQueryRequest.type:type_name -> querier.v1.QueryType - 20, // 14: querier.v1.AnalyzeQueryResponse.query_scopes:type_name -> querier.v1.QueryScope - 21, // 15: querier.v1.AnalyzeQueryResponse.query_impact:type_name -> querier.v1.QueryImpact - 1, // 16: querier.v1.QueryImpact.type:type_name -> querier.v1.QueryImpactType - 2, // 17: querier.v1.QuerierService.ProfileTypes:input_type -> querier.v1.ProfileTypesRequest - 27, // 18: querier.v1.QuerierService.LabelValues:input_type -> types.v1.LabelValuesRequest - 28, // 19: querier.v1.QuerierService.LabelNames:input_type -> types.v1.LabelNamesRequest - 4, // 20: querier.v1.QuerierService.Series:input_type -> querier.v1.SeriesRequest - 6, // 21: querier.v1.QuerierService.SelectMergeStacktraces:input_type -> querier.v1.SelectMergeStacktracesRequest - 8, // 22: querier.v1.QuerierService.SelectMergeSpanProfile:input_type -> querier.v1.SelectMergeSpanProfileRequest - 15, // 23: querier.v1.QuerierService.SelectMergeProfile:input_type -> querier.v1.SelectMergeProfileRequest - 16, // 24: querier.v1.QuerierService.SelectSeries:input_type -> querier.v1.SelectSeriesRequest - 10, // 25: querier.v1.QuerierService.Diff:input_type -> querier.v1.DiffRequest - 29, // 26: querier.v1.QuerierService.GetProfileStats:input_type -> types.v1.GetProfileStatsRequest - 18, // 27: querier.v1.QuerierService.AnalyzeQuery:input_type -> querier.v1.AnalyzeQueryRequest - 3, // 28: querier.v1.QuerierService.ProfileTypes:output_type -> querier.v1.ProfileTypesResponse - 30, // 29: querier.v1.QuerierService.LabelValues:output_type -> types.v1.LabelValuesResponse - 31, // 30: querier.v1.QuerierService.LabelNames:output_type -> types.v1.LabelNamesResponse - 5, // 31: querier.v1.QuerierService.Series:output_type -> querier.v1.SeriesResponse - 7, // 32: querier.v1.QuerierService.SelectMergeStacktraces:output_type -> querier.v1.SelectMergeStacktracesResponse - 9, // 33: querier.v1.QuerierService.SelectMergeSpanProfile:output_type -> querier.v1.SelectMergeSpanProfileResponse - 32, // 34: querier.v1.QuerierService.SelectMergeProfile:output_type -> google.v1.Profile - 17, // 35: querier.v1.QuerierService.SelectSeries:output_type -> querier.v1.SelectSeriesResponse - 11, // 36: querier.v1.QuerierService.Diff:output_type -> querier.v1.DiffResponse - 33, // 37: querier.v1.QuerierService.GetProfileStats:output_type -> types.v1.GetProfileStatsResponse - 19, // 38: querier.v1.QuerierService.AnalyzeQuery:output_type -> querier.v1.AnalyzeQueryResponse - 28, // [28:39] is the sub-list for method output_type - 17, // [17:28] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 20, // 0: querier.v1.ProfileTypesResponse.profile_types:type_name -> types.v1.ProfileType + 21, // 1: querier.v1.SeriesResponse.labels_set:type_name -> types.v1.Labels + 10, // 2: querier.v1.SelectMergeStacktracesResponse.flamegraph:type_name -> querier.v1.FlameGraph + 10, // 3: querier.v1.SelectMergeSpanProfileResponse.flamegraph:type_name -> querier.v1.FlameGraph + 4, // 4: querier.v1.DiffRequest.left:type_name -> querier.v1.SelectMergeStacktracesRequest + 4, // 5: querier.v1.DiffRequest.right:type_name -> querier.v1.SelectMergeStacktracesRequest + 11, // 6: querier.v1.DiffResponse.flamegraph:type_name -> querier.v1.FlameGraphDiff + 12, // 7: querier.v1.FlameGraph.levels:type_name -> querier.v1.Level + 12, // 8: querier.v1.FlameGraphDiff.levels:type_name -> querier.v1.Level + 22, // 9: querier.v1.SelectMergeProfileRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector + 23, // 10: querier.v1.SelectSeriesRequest.aggregation:type_name -> types.v1.TimeSeriesAggregationType + 22, // 11: querier.v1.SelectSeriesRequest.stack_trace_selector:type_name -> types.v1.StackTraceSelector + 24, // 12: querier.v1.SelectSeriesResponse.series:type_name -> types.v1.Series + 18, // 13: querier.v1.AnalyzeQueryResponse.query_scopes:type_name -> querier.v1.QueryScope + 19, // 14: querier.v1.AnalyzeQueryResponse.query_impact:type_name -> querier.v1.QueryImpact + 0, // 15: querier.v1.QuerierService.ProfileTypes:input_type -> querier.v1.ProfileTypesRequest + 25, // 16: querier.v1.QuerierService.LabelValues:input_type -> types.v1.LabelValuesRequest + 26, // 17: querier.v1.QuerierService.LabelNames:input_type -> types.v1.LabelNamesRequest + 2, // 18: querier.v1.QuerierService.Series:input_type -> querier.v1.SeriesRequest + 4, // 19: querier.v1.QuerierService.SelectMergeStacktraces:input_type -> querier.v1.SelectMergeStacktracesRequest + 6, // 20: querier.v1.QuerierService.SelectMergeSpanProfile:input_type -> querier.v1.SelectMergeSpanProfileRequest + 13, // 21: querier.v1.QuerierService.SelectMergeProfile:input_type -> querier.v1.SelectMergeProfileRequest + 14, // 22: querier.v1.QuerierService.SelectSeries:input_type -> querier.v1.SelectSeriesRequest + 8, // 23: querier.v1.QuerierService.Diff:input_type -> querier.v1.DiffRequest + 27, // 24: querier.v1.QuerierService.GetProfileStats:input_type -> types.v1.GetProfileStatsRequest + 16, // 25: querier.v1.QuerierService.AnalyzeQuery:input_type -> querier.v1.AnalyzeQueryRequest + 1, // 26: querier.v1.QuerierService.ProfileTypes:output_type -> querier.v1.ProfileTypesResponse + 28, // 27: querier.v1.QuerierService.LabelValues:output_type -> types.v1.LabelValuesResponse + 29, // 28: querier.v1.QuerierService.LabelNames:output_type -> types.v1.LabelNamesResponse + 3, // 29: querier.v1.QuerierService.Series:output_type -> querier.v1.SeriesResponse + 5, // 30: querier.v1.QuerierService.SelectMergeStacktraces:output_type -> querier.v1.SelectMergeStacktracesResponse + 7, // 31: querier.v1.QuerierService.SelectMergeSpanProfile:output_type -> querier.v1.SelectMergeSpanProfileResponse + 30, // 32: querier.v1.QuerierService.SelectMergeProfile:output_type -> google.v1.Profile + 15, // 33: querier.v1.QuerierService.SelectSeries:output_type -> querier.v1.SelectSeriesResponse + 9, // 34: querier.v1.QuerierService.Diff:output_type -> querier.v1.DiffResponse + 31, // 35: querier.v1.QuerierService.GetProfileStats:output_type -> types.v1.GetProfileStatsResponse + 17, // 36: querier.v1.QuerierService.AnalyzeQuery:output_type -> querier.v1.AnalyzeQueryResponse + 26, // [26:37] is the sub-list for method output_type + 15, // [15:26] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_querier_v1_querier_proto_init() } @@ -2139,14 +1979,13 @@ func file_querier_v1_querier_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_querier_v1_querier_proto_rawDesc, - NumEnums: 2, + NumEnums: 0, NumMessages: 20, NumExtensions: 0, NumServices: 1, }, GoTypes: file_querier_v1_querier_proto_goTypes, DependencyIndexes: file_querier_v1_querier_proto_depIdxs, - EnumInfos: file_querier_v1_querier_proto_enumTypes, MessageInfos: file_querier_v1_querier_proto_msgTypes, }.Build() File_querier_v1_querier_proto = out.File diff --git a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go index 520801c590..563c7760a2 100644 --- a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go +++ b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go @@ -444,7 +444,6 @@ func (m *AnalyzeQueryRequest) CloneVT() *AnalyzeQueryRequest { return (*AnalyzeQueryRequest)(nil) } r := &AnalyzeQueryRequest{ - Type: m.Type, Start: m.Start, End: m.End, Query: m.Query, @@ -516,7 +515,6 @@ func (m *QueryImpact) CloneVT() *QueryImpact { return (*QueryImpact)(nil) } r := &QueryImpact{ - Type: m.Type, TotalBytesInTimeRange: m.TotalBytesInTimeRange, TotalQueriedSeries: m.TotalQueriedSeries, DeduplicationNeeded: m.DeduplicationNeeded, @@ -1080,9 +1078,6 @@ func (this *AnalyzeQueryRequest) EqualVT(that *AnalyzeQueryRequest) bool { } else if this == nil || that == nil { return false } - if this.Type != that.Type { - return false - } if this.Start != that.Start { return false } @@ -1187,9 +1182,6 @@ func (this *QueryImpact) EqualVT(that *QueryImpact) bool { } else if this == nil || that == nil { return false } - if this.Type != that.Type { - return false - } if this.TotalBytesInTimeRange != that.TotalBytesInTimeRange { return false } @@ -2693,11 +2685,6 @@ func (m *AnalyzeQueryRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if m.Type != 0 { - i = encodeVarint(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } @@ -2886,11 +2873,6 @@ func (m *QueryImpact) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if m.Type != 0 { - i = encodeVarint(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } @@ -3303,9 +3285,6 @@ func (m *AnalyzeQueryRequest) SizeVT() (n int) { } var l int _ = l - if m.Type != 0 { - n += 1 + sov(uint64(m.Type)) - } if m.Start != 0 { n += 1 + sov(uint64(m.Start)) } @@ -3384,9 +3363,6 @@ func (m *QueryImpact) SizeVT() (n int) { } var l int _ = l - if m.Type != 0 { - n += 1 + sov(uint64(m.Type)) - } if m.TotalBytesInTimeRange != 0 { n += 1 + sov(uint64(m.TotalBytesInTimeRange)) } @@ -5670,25 +5646,6 @@ func (m *AnalyzeQueryRequest) UnmarshalVT(dAtA []byte) error { return fmt.Errorf("proto: AnalyzeQueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= QueryType(b&0x7F) << shift - if b < 0x80 { - break - } - } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) @@ -6166,25 +6123,6 @@ func (m *QueryImpact) UnmarshalVT(dAtA []byte) error { return fmt.Errorf("proto: QueryImpact: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= QueryImpactType(b&0x7F) << shift - if b < 0x80 { - break - } - } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TotalBytesInTimeRange", wireType) diff --git a/api/openapiv2/gen/phlare.swagger.json b/api/openapiv2/gen/phlare.swagger.json index d84c2198af..ea79d9e323 100644 --- a/api/openapiv2/gen/phlare.swagger.json +++ b/api/openapiv2/gen/phlare.swagger.json @@ -1111,9 +1111,6 @@ "v1QueryImpact": { "type": "object", "properties": { - "type": { - "$ref": "#/definitions/v1QueryImpactType" - }, "totalBytesInTimeRange": { "type": "string", "format": "uint64" @@ -1127,15 +1124,6 @@ } } }, - "v1QueryImpactType": { - "type": "string", - "enum": [ - "LOW", - "MEDIUM", - "HIGH" - ], - "default": "LOW" - }, "v1QueryScope": { "type": "object", "properties": { @@ -1178,21 +1166,6 @@ } } }, - "v1QueryType": { - "type": "string", - "enum": [ - "PROFILE_TYPES", - "LABEL_NAMES", - "LABEL_VALUES", - "SERIES", - "FLAME_GRAPH", - "SPAN_PROFILE_FLAME_GRAPH", - "PPROF", - "TIME_SERIES", - "DIFF" - ], - "default": "PROFILE_TYPES" - }, "v1RawProfileSeries": { "type": "object", "properties": { diff --git a/api/querier/v1/querier.proto b/api/querier/v1/querier.proto index 1f2ef4f107..d3b8ee8db0 100644 --- a/api/querier/v1/querier.proto +++ b/api/querier/v1/querier.proto @@ -153,30 +153,11 @@ message SelectSeriesResponse { } message AnalyzeQueryRequest { - QueryType type = 1; - - // Milliseconds since epoch. If missing or zero, only the ingesters will be - // queried. int64 start = 2; - // Milliseconds since epoch. If missing or zero, only the ingesters will be - // queried. int64 end = 3; - string query = 4; } -enum QueryType { - PROFILE_TYPES = 0; - LABEL_NAMES = 1; - LABEL_VALUES = 2; - SERIES = 3; - FLAME_GRAPH = 4; - SPAN_PROFILE_FLAME_GRAPH = 5; - PPROF = 6; - TIME_SERIES = 7; - DIFF = 8; -} - message AnalyzeQueryResponse { repeated QueryScope query_scopes = 1; // detailed view of what the query will require QueryImpact query_impact = 2; // summary of the query impact / performance @@ -196,14 +177,7 @@ message QueryScope { } message QueryImpact { - QueryImpactType type = 1; uint64 total_bytes_in_time_range = 2; uint64 total_queried_series = 3; bool deduplication_needed = 4; } - -enum QueryImpactType { - LOW = 0; - MEDIUM = 1; - HIGH = 2; -} From 690c16e5928097d9c26fcc9732c473e3cdb45584 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 3 May 2024 18:27:31 -0300 Subject: [PATCH 17/27] Revert undesired change --- pkg/og/build/build.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/og/build/build.go b/pkg/og/build/build.go index 1f7938bf5d..c2c33e74b0 100644 --- a/pkg/og/build/build.go +++ b/pkg/og/build/build.go @@ -34,7 +34,7 @@ GENERAL Build ID: %s Build Time: %s Git SHA: %s - Git Dirty FileStats: %d + Git Dirty Files: %d Embedded Assets: %t ` From 67e10171d72b89bde11b8b529b0ddb515bf49dba Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 3 May 2024 18:29:18 -0300 Subject: [PATCH 18/27] Improve method name --- pkg/phlaredb/block/metadata.go | 2 +- pkg/phlaredb/phlaredb.go | 6 +++--- pkg/storegateway/query.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/phlaredb/block/metadata.go b/pkg/phlaredb/block/metadata.go index 0ed6c9066d..7c24fb5cd8 100644 --- a/pkg/phlaredb/block/metadata.go +++ b/pkg/phlaredb/block/metadata.go @@ -359,7 +359,7 @@ func (meta *Meta) GetStats() MetaStats { } } -func (stats MetaStats) Convert() *ingestv1.BlockStats { +func (stats MetaStats) ConvertToBlockStats() *ingestv1.BlockStats { indexBytes := uint64(0) profilesBytes := uint64(0) symbolsBytes := uint64(0) diff --git a/pkg/phlaredb/phlaredb.go b/pkg/phlaredb/phlaredb.go index a205ee1055..a503c7769e 100644 --- a/pkg/phlaredb/phlaredb.go +++ b/pkg/phlaredb/phlaredb.go @@ -590,12 +590,12 @@ func (f *PhlareDB) GetBlockStats(ctx context.Context, req *connect.Request[inges f.headLock.RLock() for _, h := range f.heads { if slices.Contains(req.Msg.GetUlids(), h.meta.ULID.String()) { - res.BlockStats = append(res.BlockStats, h.GetMetaStats().Convert()) + res.BlockStats = append(res.BlockStats, h.GetMetaStats().ConvertToBlockStats()) } } for _, h := range f.flushing { if slices.Contains(req.Msg.GetUlids(), h.meta.ULID.String()) { - res.BlockStats = append(res.BlockStats, h.GetMetaStats().Convert()) + res.BlockStats = append(res.BlockStats, h.GetMetaStats().ConvertToBlockStats()) } } f.headLock.RUnlock() @@ -603,7 +603,7 @@ func (f *PhlareDB) GetBlockStats(ctx context.Context, req *connect.Request[inges f.blockQuerier.queriersLock.RLock() for _, q := range f.blockQuerier.queriers { if slices.Contains(req.Msg.GetUlids(), q.meta.ULID.String()) { - res.BlockStats = append(res.BlockStats, q.GetMetaStats().Convert()) + res.BlockStats = append(res.BlockStats, q.GetMetaStats().ConvertToBlockStats()) } } f.blockQuerier.queriersLock.RUnlock() diff --git a/pkg/storegateway/query.go b/pkg/storegateway/query.go index 6f9c6589d1..ded9dcf4a3 100644 --- a/pkg/storegateway/query.go +++ b/pkg/storegateway/query.go @@ -149,7 +149,7 @@ func (s *StoreGateway) GetBlockStats(ctx context.Context, req *connect.Request[i for ulid, block := range bs.blocks { if slices.Contains(req.Msg.Ulids, ulid.String()) { - res.BlockStats = append(res.BlockStats, block.meta.GetStats().Convert()) + res.BlockStats = append(res.BlockStats, block.meta.GetStats().ConvertToBlockStats()) } } return nil From a4e408f822052253271575183572b2747ba7dda2 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 3 May 2024 18:30:27 -0300 Subject: [PATCH 19/27] Revert undesired change --- pkg/phlaredb/head.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/phlaredb/head.go b/pkg/phlaredb/head.go index 849793ab89..b82d5c4904 100644 --- a/pkg/phlaredb/head.go +++ b/pkg/phlaredb/head.go @@ -562,7 +562,7 @@ func (h *Head) flush(ctx context.Context) error { return errors.Wrap(err, "flushing symdb") } for _, file := range h.symdb.Files() { - // FileStats' path is relative to the symdb dir. + // Files' path is relative to the symdb dir. file.RelPath = filepath.Join(symdb.DefaultDirName, file.RelPath) files = append(files, file) blockSize += file.SizeBytes From 7769249b7fa7a7ebd69f05fcd98ac1ab36990168 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 3 May 2024 18:33:45 -0300 Subject: [PATCH 20/27] Improve naming consistency --- pkg/querier/replication.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/querier/replication.go b/pkg/querier/replication.go index a0c92ee740..ba91ecc799 100644 --- a/pkg/querier/replication.go +++ b/pkg/querier/replication.go @@ -97,14 +97,14 @@ func forGivenPlan[Result any, Querier any](ctx context.Context, plan map[string] result = make([]ResponseFromReplica[Result], len(plan)) ) - for replica, hints := range plan { + for replica, planEntry := range plan { if !replicationSet.Includes(replica) { continue } var ( i = idx r = replica - h = hints + h = planEntry.BlockHints ) idx++ g.Go(func() error { @@ -113,7 +113,7 @@ func forGivenPlan[Result any, Querier any](ctx context.Context, plan map[string] return err } - resp, err := f(ctx, client, &ingestv1.Hints{Block: h.BlockHints}) + resp, err := f(ctx, client, &ingestv1.Hints{Block: h}) if err != nil { return err } From 1918b54d7b58ab2029aea4f68963a8588e3fde3b Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Fri, 3 May 2024 18:36:28 -0300 Subject: [PATCH 21/27] Remove unused function --- pkg/querier/replication.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/querier/replication.go b/pkg/querier/replication.go index ba91ecc799..1e772d6e91 100644 --- a/pkg/querier/replication.go +++ b/pkg/querier/replication.go @@ -473,10 +473,3 @@ func (r *replicasPerBlockID) blockPlan(ctx context.Context) map[string]*blockPla return plan } - -func (r *replicasPerBlockID) contains(ulid string) bool { - if replicas, ok := r.m[ulid]; ok { - return len(replicas) > 0 - } - return false -} From 3ba9520633317c8001c0539a02d9afef054a6afc Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Mon, 6 May 2024 10:08:07 -0300 Subject: [PATCH 22/27] Speed up reference-help target --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fd69e72ce2..7164767a96 100644 --- a/Makefile +++ b/Makefile @@ -250,7 +250,7 @@ clean: ## Delete intermediate build artifacts .PHONY: reference-help reference-help: ## Generates the reference help documentation. -reference-help: build +reference-help: go/bin @(./pyroscope -h || true) > cmd/pyroscope/help.txt.tmpl @(./pyroscope -help-all || true) > cmd/pyroscope/help-all.txt.tmpl From c86ff1894d1d5e14f8bedb3b26912a674e6e0311 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Mon, 6 May 2024 10:09:04 -0300 Subject: [PATCH 23/27] Add per-tenant overrides for query analysis --- cmd/pyroscope/help-all.txt.tmpl | 4 ++++ cmd/pyroscope/help.txt.tmpl | 4 ++++ .../index.md | 10 +++++++++ pkg/frontend/frontend.go | 1 + pkg/frontend/frontend_analyze_query.go | 9 ++++++++ pkg/querier/analyze_query.go | 7 ++++++ pkg/querier/querier.go | 7 ++++++ pkg/validation/limits.go | 22 ++++++++++++++++--- pkg/validation/testutil.go | 20 +++++++++++------ 9 files changed, 74 insertions(+), 10 deletions(-) diff --git a/cmd/pyroscope/help-all.txt.tmpl b/cmd/pyroscope/help-all.txt.tmpl index a4ecc98189..588308a746 100644 --- a/cmd/pyroscope/help-all.txt.tmpl +++ b/cmd/pyroscope/help-all.txt.tmpl @@ -551,6 +551,10 @@ Usage of ./pyroscope: Limit how far back in profiling data can be queried, up until lookback duration ago. This limit is enforced in the query frontend. If the requested time range is outside the allowed range, the request will not fail, but will be modified to only query data within the allowed time range. 0 to disable, default to 7d. (default 1w) -querier.max-query-parallelism int Maximum number of queries that will be scheduled in parallel by the frontend. + -querier.query-analysis-enabled + Whether query analysis is enabled in the query frontend. If disabled, the /AnalyzeQuery endpoint will return an empty response. (default true) + -querier.query-analysis-series-enabled + Whether the series portion of query analysis is enabled. If disabled, no series data (e.g., series count) will be calculated by the /AnalyzeQuery endpoint. (default true) -querier.query-store-after duration The time after which a metric should be queried from storage and not just ingesters. 0 means all queries are sent to store. If this option is enabled, the time range of the query sent to the store-gateway will be manipulated to ensure the query end is not more recent than 'now - query-store-after'. (default 4h0m0s) -querier.split-queries-by-interval duration diff --git a/cmd/pyroscope/help.txt.tmpl b/cmd/pyroscope/help.txt.tmpl index bcf5fcd771..4918f51ee0 100644 --- a/cmd/pyroscope/help.txt.tmpl +++ b/cmd/pyroscope/help.txt.tmpl @@ -159,6 +159,10 @@ Usage of ./pyroscope: Limit how far back in profiling data can be queried, up until lookback duration ago. This limit is enforced in the query frontend. If the requested time range is outside the allowed range, the request will not fail, but will be modified to only query data within the allowed time range. 0 to disable, default to 7d. (default 1w) -querier.max-query-parallelism int Maximum number of queries that will be scheduled in parallel by the frontend. + -querier.query-analysis-enabled + Whether query analysis is enabled in the query frontend. If disabled, the /AnalyzeQuery endpoint will return an empty response. (default true) + -querier.query-analysis-series-enabled + Whether the series portion of query analysis is enabled. If disabled, no series data (e.g., series count) will be calculated by the /AnalyzeQuery endpoint. (default true) -querier.split-queries-by-interval duration Split queries by a time interval and execute in parallel. The value 0 disables splitting by time -query-scheduler.max-outstanding-requests-per-tenant int diff --git a/docs/sources/configure-server/reference-configuration-parameters/index.md b/docs/sources/configure-server/reference-configuration-parameters/index.md index b81a9c1af5..c6a0570615 100644 --- a/docs/sources/configure-server/reference-configuration-parameters/index.md +++ b/docs/sources/configure-server/reference-configuration-parameters/index.md @@ -1883,6 +1883,16 @@ The `limits` block configures default and per-tenant limits imposed by component # CLI flag: -querier.max-query-parallelism [max_query_parallelism: | default = 0] +# Whether query analysis is enabled. If disabled, the corresponding endpoint +# will return an empty response. +# CLI flag: -querier.query-analysis-enabled +[query_analysis_enabled: | default = true] + +# Whether the series portion of query analysis is enabled. If disabled, no +# series data (e.g., series count) will be calculated. +# CLI flag: -querier.query-analysis-series-enabled +[query_analysis_series_enabled: | default = true] + # Maximum number of flame graph nodes by default. 0 to disable. # CLI flag: -querier.max-flamegraph-nodes-default [max_flamegraph_nodes_default: | default = 8192] diff --git a/pkg/frontend/frontend.go b/pkg/frontend/frontend.go index 06498c9f70..6dfb6ad7c1 100644 --- a/pkg/frontend/frontend.go +++ b/pkg/frontend/frontend.go @@ -99,6 +99,7 @@ type Limits interface { MaxQueryParallelism(string) int MaxQueryLength(tenantID string) time.Duration MaxQueryLookback(tenantID string) time.Duration + QueryAnalysisEnabled(string) bool validation.FlameGraphLimits } diff --git a/pkg/frontend/frontend_analyze_query.go b/pkg/frontend/frontend_analyze_query.go index 3a1bac2797..531c556747 100644 --- a/pkg/frontend/frontend_analyze_query.go +++ b/pkg/frontend/frontend_analyze_query.go @@ -21,6 +21,15 @@ func (f *Frontend) AnalyzeQuery(ctx context.Context, ) { opentracing.SpanFromContext(ctx) + tenantID, err := tenant.TenantID(ctx) + if err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, err) + } + + if !f.limits.QueryAnalysisEnabled(tenantID) { + return connect.NewResponse(&querierv1.AnalyzeQueryResponse{}), nil + } + tenantIDs, err := tenant.TenantIDs(ctx) if err != nil { return nil, connect.NewError(connect.CodeInvalidArgument, err) diff --git a/pkg/querier/analyze_query.go b/pkg/querier/analyze_query.go index 6cf263d654..9dd15977f6 100644 --- a/pkg/querier/analyze_query.go +++ b/pkg/querier/analyze_query.go @@ -120,6 +120,13 @@ func addBlockStatsToQueryScope(blockStatsFromReplicas []ResponseFromReplica[*ing } func (q *Querier) getQueriedSeriesCount(ctx context.Context, req *querierv1.AnalyzeQueryRequest) (uint64, error) { + tenantId, err := tenant.TenantID(ctx) + if err != nil { + return 0, err + } + if !q.limits.QueryAnalysisSeriesEnabled(tenantId) { + return 0, nil + } matchers, err := createMatchersFromQuery(req.Query) if err != nil { return 0, err diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 4a5ee032c0..2012b078ea 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -56,6 +56,10 @@ func (cfg *Config) RegisterFlags(fs *flag.FlagSet) { fs.DurationVar(&cfg.QueryStoreAfter, "querier.query-store-after", 4*time.Hour, "The time after which a metric should be queried from storage and not just ingesters. 0 means all queries are sent to store. If this option is enabled, the time range of the query sent to the store-gateway will be manipulated to ensure the query end is not more recent than 'now - query-store-after'.") } +type Limits interface { + QueryAnalysisSeriesEnabled(string) bool +} + type Querier struct { services.Service subservices *services.Manager @@ -71,6 +75,8 @@ type Querier struct { storageBucket phlareobj.Bucket tenantConfigProvider phlareobj.TenantConfigProvider + + limits Limits } // TODO(kolesnikovae): For backwards compatibility. @@ -128,6 +134,7 @@ func New(params *NewQuerierParams) (*Querier, error) { VCSServiceHandler: vcs.New(params.Logger), storageBucket: params.StorageBucket, tenantConfigProvider: params.CfgProvider, + limits: params.Overrides, } svcs := []services.Service{q.ingesterQuerier.pool} diff --git a/pkg/validation/limits.go b/pkg/validation/limits.go index 1b269963b4..6395597b75 100644 --- a/pkg/validation/limits.go +++ b/pkg/validation/limits.go @@ -55,9 +55,11 @@ type Limits struct { MaxGlobalSeriesPerTenant int `yaml:"max_global_series_per_tenant" json:"max_global_series_per_tenant"` // Querier enforced limits. - MaxQueryLookback model.Duration `yaml:"max_query_lookback" json:"max_query_lookback"` - MaxQueryLength model.Duration `yaml:"max_query_length" json:"max_query_length"` - MaxQueryParallelism int `yaml:"max_query_parallelism" json:"max_query_parallelism"` + MaxQueryLookback model.Duration `yaml:"max_query_lookback" json:"max_query_lookback"` + MaxQueryLength model.Duration `yaml:"max_query_length" json:"max_query_length"` + MaxQueryParallelism int `yaml:"max_query_parallelism" json:"max_query_parallelism"` + QueryAnalysisEnabled bool `yaml:"query_analysis_enabled" json:"query_analysis_enabled"` + QueryAnalysisSeriesEnabled bool `yaml:"query_analysis_series_enabled" json:"query_analysis_series_enabled"` // Flame graph enforced limits. MaxFlameGraphNodesDefault int `yaml:"max_flamegraph_nodes_default" json:"max_flamegraph_nodes_default"` @@ -124,6 +126,9 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) { f.IntVar(&l.MaxQueryParallelism, "querier.max-query-parallelism", 0, "Maximum number of queries that will be scheduled in parallel by the frontend.") + f.BoolVar(&l.QueryAnalysisEnabled, "querier.query-analysis-enabled", true, "Whether query analysis is enabled in the query frontend. If disabled, the /AnalyzeQuery endpoint will return an empty response.") + f.BoolVar(&l.QueryAnalysisSeriesEnabled, "querier.query-analysis-series-enabled", true, "Whether the series portion of query analysis is enabled. If disabled, no series data (e.g., series count) will be calculated by the /AnalyzeQuery endpoint.") + f.IntVar(&l.MaxProfileSizeBytes, "validation.max-profile-size-bytes", 4*1024*1024, "Maximum size of a profile in bytes. This is based off the uncompressed size. 0 to disable.") f.IntVar(&l.MaxProfileStacktraceSamples, "validation.max-profile-stacktrace-samples", 16000, "Maximum number of samples in a profile. 0 to disable.") f.IntVar(&l.MaxProfileStacktraceSampleLabels, "validation.max-profile-stacktrace-sample-labels", 100, "Maximum number of labels in a profile sample. 0 to disable.") @@ -411,6 +416,17 @@ func (o *Overrides) RejectOlderThan(tenantID string) time.Duration { return time.Duration(o.getOverridesForTenant(tenantID).RejectOlderThan) } +// QueryAnalysisEnabled can be used to disable the query analysis endpoint in the query frontend. +func (o *Overrides) QueryAnalysisEnabled(tenantID string) bool { + return o.getOverridesForTenant(tenantID).QueryAnalysisEnabled +} + +// QueryAnalysisSeriesEnabled can be used to disable the series portion of the query analysis endpoint in the query frontend. +// To be used for tenants where calculating series can be expensive. +func (o *Overrides) QueryAnalysisSeriesEnabled(tenantID string) bool { + return o.getOverridesForTenant(tenantID).QueryAnalysisSeriesEnabled +} + func (o *Overrides) DefaultLimits() *Limits { return o.defaultLimits } diff --git a/pkg/validation/testutil.go b/pkg/validation/testutil.go index 18b7d1d52c..13e04f9a06 100644 --- a/pkg/validation/testutil.go +++ b/pkg/validation/testutil.go @@ -5,13 +5,15 @@ import ( ) type MockLimits struct { - QuerySplitDurationValue time.Duration - MaxQueryParallelismValue int - MaxQueryLengthValue time.Duration - MaxQueryLookbackValue time.Duration - MaxLabelNameLengthValue int - MaxLabelValueLengthValue int - MaxLabelNamesPerSeriesValue int + QuerySplitDurationValue time.Duration + MaxQueryParallelismValue int + MaxQueryLengthValue time.Duration + MaxQueryLookbackValue time.Duration + QueryAnalysisEnabledValue bool + QueryAnalysisSeriesEnabledValue bool + MaxLabelNameLengthValue int + MaxLabelValueLengthValue int + MaxLabelNamesPerSeriesValue int MaxFlameGraphNodesDefaultValue int MaxFlameGraphNodesMaxValue int @@ -33,6 +35,10 @@ func (m MockLimits) QuerySplitDuration(string) time.Duration { return m.Q func (m MockLimits) MaxQueryParallelism(string) int { return m.MaxQueryParallelismValue } func (m MockLimits) MaxQueryLength(tenantID string) time.Duration { return m.MaxQueryLengthValue } func (m MockLimits) MaxQueryLookback(tenantID string) time.Duration { return m.MaxQueryLookbackValue } +func (m MockLimits) QueryAnalysisEnabled(tenantID string) bool { return m.QueryAnalysisEnabledValue } +func (m MockLimits) QueryAnalysisSeriesEnabled(tenantID string) bool { + return m.QueryAnalysisSeriesEnabledValue +} func (m MockLimits) MaxFlameGraphNodesDefault(string) int { return m.MaxFlameGraphNodesDefaultValue } func (m MockLimits) MaxFlameGraphNodesMax(string) int { return m.MaxFlameGraphNodesMaxValue } From 0deea6e68f8557750ff7d8faf93ec25a80609cca Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Mon, 6 May 2024 11:11:35 -0300 Subject: [PATCH 24/27] Change default config value for query_analysis_series_enabled --- pkg/validation/limits.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/validation/limits.go b/pkg/validation/limits.go index 6395597b75..64a9fd91b6 100644 --- a/pkg/validation/limits.go +++ b/pkg/validation/limits.go @@ -127,7 +127,7 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) { f.IntVar(&l.MaxQueryParallelism, "querier.max-query-parallelism", 0, "Maximum number of queries that will be scheduled in parallel by the frontend.") f.BoolVar(&l.QueryAnalysisEnabled, "querier.query-analysis-enabled", true, "Whether query analysis is enabled in the query frontend. If disabled, the /AnalyzeQuery endpoint will return an empty response.") - f.BoolVar(&l.QueryAnalysisSeriesEnabled, "querier.query-analysis-series-enabled", true, "Whether the series portion of query analysis is enabled. If disabled, no series data (e.g., series count) will be calculated by the /AnalyzeQuery endpoint.") + f.BoolVar(&l.QueryAnalysisSeriesEnabled, "querier.query-analysis-series-enabled", false, "Whether the series portion of query analysis is enabled. If disabled, no series data (e.g., series count) will be calculated by the /AnalyzeQuery endpoint.") f.IntVar(&l.MaxProfileSizeBytes, "validation.max-profile-size-bytes", 4*1024*1024, "Maximum size of a profile in bytes. This is based off the uncompressed size. 0 to disable.") f.IntVar(&l.MaxProfileStacktraceSamples, "validation.max-profile-stacktrace-samples", 16000, "Maximum number of samples in a profile. 0 to disable.") From 13ec9fe55600a7cde51352179e713ed13d3097d3 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Mon, 6 May 2024 11:21:23 -0300 Subject: [PATCH 25/27] Update reference help --- cmd/pyroscope/help-all.txt.tmpl | 2 +- cmd/pyroscope/help.txt.tmpl | 2 +- ebpf/testdata | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/pyroscope/help-all.txt.tmpl b/cmd/pyroscope/help-all.txt.tmpl index 588308a746..0b0c0de789 100644 --- a/cmd/pyroscope/help-all.txt.tmpl +++ b/cmd/pyroscope/help-all.txt.tmpl @@ -554,7 +554,7 @@ Usage of ./pyroscope: -querier.query-analysis-enabled Whether query analysis is enabled in the query frontend. If disabled, the /AnalyzeQuery endpoint will return an empty response. (default true) -querier.query-analysis-series-enabled - Whether the series portion of query analysis is enabled. If disabled, no series data (e.g., series count) will be calculated by the /AnalyzeQuery endpoint. (default true) + Whether the series portion of query analysis is enabled. If disabled, no series data (e.g., series count) will be calculated by the /AnalyzeQuery endpoint. -querier.query-store-after duration The time after which a metric should be queried from storage and not just ingesters. 0 means all queries are sent to store. If this option is enabled, the time range of the query sent to the store-gateway will be manipulated to ensure the query end is not more recent than 'now - query-store-after'. (default 4h0m0s) -querier.split-queries-by-interval duration diff --git a/cmd/pyroscope/help.txt.tmpl b/cmd/pyroscope/help.txt.tmpl index 4918f51ee0..e949ba0ea2 100644 --- a/cmd/pyroscope/help.txt.tmpl +++ b/cmd/pyroscope/help.txt.tmpl @@ -162,7 +162,7 @@ Usage of ./pyroscope: -querier.query-analysis-enabled Whether query analysis is enabled in the query frontend. If disabled, the /AnalyzeQuery endpoint will return an empty response. (default true) -querier.query-analysis-series-enabled - Whether the series portion of query analysis is enabled. If disabled, no series data (e.g., series count) will be calculated by the /AnalyzeQuery endpoint. (default true) + Whether the series portion of query analysis is enabled. If disabled, no series data (e.g., series count) will be calculated by the /AnalyzeQuery endpoint. -querier.split-queries-by-interval duration Split queries by a time interval and execute in parallel. The value 0 disables splitting by time -query-scheduler.max-outstanding-requests-per-tenant int diff --git a/ebpf/testdata b/ebpf/testdata index 31c1b5a98c..e82696abfc 160000 --- a/ebpf/testdata +++ b/ebpf/testdata @@ -1 +1 @@ -Subproject commit 31c1b5a98c20d67e5154c6ef91e7b7b1762c6c56 +Subproject commit e82696abfc724799c9be63939d2ba4e5195f6f2f From 0fe77c8abb8ceca9d3b2dc1881f8ad36aed3a596 Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Mon, 6 May 2024 12:22:53 -0300 Subject: [PATCH 26/27] Improve naming consistency, fix flaky test --- api/gen/proto/go/ingester/v1/ingester.pb.go | 242 +++++++++--------- .../go/ingester/v1/ingester_vtproto.pb.go | 92 +++---- api/gen/proto/go/querier/v1/querier.pb.go | 229 ++++++++--------- .../proto/go/querier/v1/querier_vtproto.pb.go | 74 +++--- api/ingester/v1/ingester.proto | 10 +- api/openapiv2/gen/phlare.swagger.json | 24 +- api/querier/v1/querier.proto | 12 +- .../index.md | 9 +- pkg/phlaredb/block/metadata.go | 20 +- pkg/querier/analyze_query.go | 14 +- pkg/querier/analyze_query_test.go | 129 +++++----- 11 files changed, 429 insertions(+), 426 deletions(-) diff --git a/api/gen/proto/go/ingester/v1/ingester.pb.go b/api/gen/proto/go/ingester/v1/ingester.pb.go index 6f26ed84d7..fa7e443cfb 100644 --- a/api/gen/proto/go/ingester/v1/ingester.pb.go +++ b/api/gen/proto/go/ingester/v1/ingester.pb.go @@ -1753,12 +1753,12 @@ type BlockStats struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NumSeries uint64 `protobuf:"varint,2,opt,name=num_series,json=numSeries,proto3" json:"num_series,omitempty"` - NumProfiles uint64 `protobuf:"varint,3,opt,name=num_profiles,json=numProfiles,proto3" json:"num_profiles,omitempty"` - NumSamples uint64 `protobuf:"varint,4,opt,name=num_samples,json=numSamples,proto3" json:"num_samples,omitempty"` - IndexBytes uint64 `protobuf:"varint,5,opt,name=index_bytes,json=indexBytes,proto3" json:"index_bytes,omitempty"` - ProfilesBytes uint64 `protobuf:"varint,6,opt,name=profiles_bytes,json=profilesBytes,proto3" json:"profiles_bytes,omitempty"` - SymbolsBytes uint64 `protobuf:"varint,7,opt,name=symbols_bytes,json=symbolsBytes,proto3" json:"symbols_bytes,omitempty"` + SeriesCount uint64 `protobuf:"varint,2,opt,name=series_count,json=seriesCount,proto3" json:"series_count,omitempty"` + ProfileCount uint64 `protobuf:"varint,3,opt,name=profile_count,json=profileCount,proto3" json:"profile_count,omitempty"` + SampleCount uint64 `protobuf:"varint,4,opt,name=sample_count,json=sampleCount,proto3" json:"sample_count,omitempty"` + IndexBytes uint64 `protobuf:"varint,5,opt,name=index_bytes,json=indexBytes,proto3" json:"index_bytes,omitempty"` + ProfileBytes uint64 `protobuf:"varint,6,opt,name=profile_bytes,json=profileBytes,proto3" json:"profile_bytes,omitempty"` + SymbolBytes uint64 `protobuf:"varint,7,opt,name=symbol_bytes,json=symbolBytes,proto3" json:"symbol_bytes,omitempty"` } func (x *BlockStats) Reset() { @@ -1793,23 +1793,23 @@ func (*BlockStats) Descriptor() ([]byte, []int) { return file_ingester_v1_ingester_proto_rawDescGZIP(), []int{28} } -func (x *BlockStats) GetNumSeries() uint64 { +func (x *BlockStats) GetSeriesCount() uint64 { if x != nil { - return x.NumSeries + return x.SeriesCount } return 0 } -func (x *BlockStats) GetNumProfiles() uint64 { +func (x *BlockStats) GetProfileCount() uint64 { if x != nil { - return x.NumProfiles + return x.ProfileCount } return 0 } -func (x *BlockStats) GetNumSamples() uint64 { +func (x *BlockStats) GetSampleCount() uint64 { if x != nil { - return x.NumSamples + return x.SampleCount } return 0 } @@ -1821,16 +1821,16 @@ func (x *BlockStats) GetIndexBytes() uint64 { return 0 } -func (x *BlockStats) GetProfilesBytes() uint64 { +func (x *BlockStats) GetProfileBytes() uint64 { if x != nil { - return x.ProfilesBytes + return x.ProfileBytes } return 0 } -func (x *BlockStats) GetSymbolsBytes() uint64 { +func (x *BlockStats) GetSymbolBytes() uint64 { if x != nil { - return x.SymbolsBytes + return x.SymbolBytes } return 0 } @@ -2066,113 +2066,113 @@ var file_ingester_v1_ingester_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0a, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xdc, 0x01, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x73, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6d, - 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, 0x75, - 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, - 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, - 0x6e, 0x75, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x70, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, - 0x6c, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x2a, 0x6b, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x63, 0x6b, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, - 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, - 0x53, 0x54, 0x41, 0x43, 0x4b, 0x54, 0x52, 0x41, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x15, 0x0a, - 0x11, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x54, 0x52, - 0x45, 0x45, 0x10, 0x02, 0x32, 0x90, 0x09, 0x0a, 0x0f, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x50, 0x75, 0x73, 0x68, - 0x12, 0x14, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4c, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, - 0x0a, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x69, 0x6e, 0x67, - 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x43, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1a, 0x2e, 0x69, 0x6e, 0x67, 0x65, + 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xe0, 0x01, 0x0a, 0x0a, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x69, 0x65, + 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x62, + 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x2a, 0x6b, 0x0a, 0x16, 0x53, + 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x5f, 0x46, + 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x5f, 0x46, 0x4f, 0x52, + 0x4d, 0x41, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x54, 0x52, 0x41, 0x43, 0x45, 0x53, 0x10, + 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x45, 0x52, 0x47, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, + 0x54, 0x5f, 0x54, 0x52, 0x45, 0x45, 0x10, 0x02, 0x32, 0x90, 0x09, 0x0a, 0x0f, 0x49, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x04, + 0x50, 0x75, 0x73, 0x68, 0x12, 0x14, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x75, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0c, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x69, + 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1a, 0x2e, + 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x05, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x12, 0x19, 0x2e, - 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x75, 0x73, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, - 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x53, 0x74, - 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x63, - 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x13, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x27, 0x2e, 0x69, - 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6b, 0x0a, 0x12, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x12, 0x26, 0x2e, 0x69, 0x6e, - 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x50, - 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, - 0x30, 0x01, 0x12, 0x65, 0x0a, 0x10, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x69, - 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, - 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x0d, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x2e, 0x69, 0x6e, 0x67, - 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, - 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x21, - 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x05, 0x46, 0x6c, 0x75, 0x73, + 0x68, 0x12, 0x19, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x6c, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x69, + 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6c, 0x75, 0x73, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x18, 0x4d, 0x65, + 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x63, 0x6b, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x13, 0x4d, 0x65, 0x72, + 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x12, 0x27, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x69, 0x6e, 0x67, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6b, 0x0a, 0x12, 0x4d, 0x65, 0x72, + 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x12, + 0x26, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, + 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x50, 0x70, 0x72, 0x6f, 0x66, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x65, 0x0a, 0x10, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, + 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x69, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, + 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x58, 0x0a, + 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, + 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xb3, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, - 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x49, 0x6e, 0x67, - 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, - 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, - 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x67, 0x65, - 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x49, 0x6e, 0x67, 0x65, 0x73, - 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, - 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0c, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x58, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x21, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xb3, 0x01, 0x0a, 0x0f, + 0x63, 0x6f, 0x6d, 0x2e, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, + 0x0d, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, + 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, + 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e, 0x67, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x49, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x49, + 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x49, 0x6e, 0x67, + 0x65, 0x73, 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x49, 0x6e, 0x67, 0x65, 0x73, + 0x74, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0c, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/gen/proto/go/ingester/v1/ingester_vtproto.pb.go b/api/gen/proto/go/ingester/v1/ingester_vtproto.pb.go index 03ec9ac84f..286c2b25c9 100644 --- a/api/gen/proto/go/ingester/v1/ingester_vtproto.pb.go +++ b/api/gen/proto/go/ingester/v1/ingester_vtproto.pb.go @@ -749,12 +749,12 @@ func (m *BlockStats) CloneVT() *BlockStats { return (*BlockStats)(nil) } r := &BlockStats{ - NumSeries: m.NumSeries, - NumProfiles: m.NumProfiles, - NumSamples: m.NumSamples, - IndexBytes: m.IndexBytes, - ProfilesBytes: m.ProfilesBytes, - SymbolsBytes: m.SymbolsBytes, + SeriesCount: m.SeriesCount, + ProfileCount: m.ProfileCount, + SampleCount: m.SampleCount, + IndexBytes: m.IndexBytes, + ProfileBytes: m.ProfileBytes, + SymbolBytes: m.SymbolBytes, } if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) @@ -1679,22 +1679,22 @@ func (this *BlockStats) EqualVT(that *BlockStats) bool { } else if this == nil || that == nil { return false } - if this.NumSeries != that.NumSeries { + if this.SeriesCount != that.SeriesCount { return false } - if this.NumProfiles != that.NumProfiles { + if this.ProfileCount != that.ProfileCount { return false } - if this.NumSamples != that.NumSamples { + if this.SampleCount != that.SampleCount { return false } if this.IndexBytes != that.IndexBytes { return false } - if this.ProfilesBytes != that.ProfilesBytes { + if this.ProfileBytes != that.ProfileBytes { return false } - if this.SymbolsBytes != that.SymbolsBytes { + if this.SymbolBytes != that.SymbolBytes { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -4035,13 +4035,13 @@ func (m *BlockStats) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.SymbolsBytes != 0 { - i = encodeVarint(dAtA, i, uint64(m.SymbolsBytes)) + if m.SymbolBytes != 0 { + i = encodeVarint(dAtA, i, uint64(m.SymbolBytes)) i-- dAtA[i] = 0x38 } - if m.ProfilesBytes != 0 { - i = encodeVarint(dAtA, i, uint64(m.ProfilesBytes)) + if m.ProfileBytes != 0 { + i = encodeVarint(dAtA, i, uint64(m.ProfileBytes)) i-- dAtA[i] = 0x30 } @@ -4050,18 +4050,18 @@ func (m *BlockStats) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - if m.NumSamples != 0 { - i = encodeVarint(dAtA, i, uint64(m.NumSamples)) + if m.SampleCount != 0 { + i = encodeVarint(dAtA, i, uint64(m.SampleCount)) i-- dAtA[i] = 0x20 } - if m.NumProfiles != 0 { - i = encodeVarint(dAtA, i, uint64(m.NumProfiles)) + if m.ProfileCount != 0 { + i = encodeVarint(dAtA, i, uint64(m.ProfileCount)) i-- dAtA[i] = 0x18 } - if m.NumSeries != 0 { - i = encodeVarint(dAtA, i, uint64(m.NumSeries)) + if m.SeriesCount != 0 { + i = encodeVarint(dAtA, i, uint64(m.SeriesCount)) i-- dAtA[i] = 0x10 } @@ -4708,23 +4708,23 @@ func (m *BlockStats) SizeVT() (n int) { } var l int _ = l - if m.NumSeries != 0 { - n += 1 + sov(uint64(m.NumSeries)) + if m.SeriesCount != 0 { + n += 1 + sov(uint64(m.SeriesCount)) } - if m.NumProfiles != 0 { - n += 1 + sov(uint64(m.NumProfiles)) + if m.ProfileCount != 0 { + n += 1 + sov(uint64(m.ProfileCount)) } - if m.NumSamples != 0 { - n += 1 + sov(uint64(m.NumSamples)) + if m.SampleCount != 0 { + n += 1 + sov(uint64(m.SampleCount)) } if m.IndexBytes != 0 { n += 1 + sov(uint64(m.IndexBytes)) } - if m.ProfilesBytes != 0 { - n += 1 + sov(uint64(m.ProfilesBytes)) + if m.ProfileBytes != 0 { + n += 1 + sov(uint64(m.ProfileBytes)) } - if m.SymbolsBytes != 0 { - n += 1 + sov(uint64(m.SymbolsBytes)) + if m.SymbolBytes != 0 { + n += 1 + sov(uint64(m.SymbolBytes)) } n += len(m.unknownFields) return n @@ -8434,9 +8434,9 @@ func (m *BlockStats) UnmarshalVT(dAtA []byte) error { switch fieldNum { case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumSeries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SeriesCount", wireType) } - m.NumSeries = 0 + m.SeriesCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8446,16 +8446,16 @@ func (m *BlockStats) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumSeries |= uint64(b&0x7F) << shift + m.SeriesCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumProfiles", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProfileCount", wireType) } - m.NumProfiles = 0 + m.ProfileCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8465,16 +8465,16 @@ func (m *BlockStats) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumProfiles |= uint64(b&0x7F) << shift + m.ProfileCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumSamples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SampleCount", wireType) } - m.NumSamples = 0 + m.SampleCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8484,7 +8484,7 @@ func (m *BlockStats) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumSamples |= uint64(b&0x7F) << shift + m.SampleCount |= uint64(b&0x7F) << shift if b < 0x80 { break } @@ -8510,9 +8510,9 @@ func (m *BlockStats) UnmarshalVT(dAtA []byte) error { } case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfilesBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProfileBytes", wireType) } - m.ProfilesBytes = 0 + m.ProfileBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8522,16 +8522,16 @@ func (m *BlockStats) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ProfilesBytes |= uint64(b&0x7F) << shift + m.ProfileBytes |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SymbolsBytes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SymbolBytes", wireType) } - m.SymbolsBytes = 0 + m.SymbolBytes = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -8541,7 +8541,7 @@ func (m *BlockStats) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.SymbolsBytes |= uint64(b&0x7F) << shift + m.SymbolBytes |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/api/gen/proto/go/querier/v1/querier.pb.go b/api/gen/proto/go/querier/v1/querier.pb.go index 1ee29ec141..e9475ba0de 100644 --- a/api/gen/proto/go/querier/v1/querier.pb.go +++ b/api/gen/proto/go/querier/v1/querier.pb.go @@ -1191,12 +1191,12 @@ type QueryScope struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ComponentType string `protobuf:"bytes,1,opt,name=component_type,json=componentType,proto3" json:"component_type,omitempty"` // high level, e.g., "short term" or "long term" storage - ComponentCount int64 `protobuf:"varint,2,opt,name=component_count,json=componentCount,proto3" json:"component_count,omitempty"` // how many components of this type will work on the query - NumBlocks uint64 `protobuf:"varint,3,opt,name=num_blocks,json=numBlocks,proto3" json:"num_blocks,omitempty"` - NumSeries uint64 `protobuf:"varint,4,opt,name=num_series,json=numSeries,proto3" json:"num_series,omitempty"` - NumProfiles uint64 `protobuf:"varint,5,opt,name=num_profiles,json=numProfiles,proto3" json:"num_profiles,omitempty"` - NumSamples uint64 `protobuf:"varint,6,opt,name=num_samples,json=numSamples,proto3" json:"num_samples,omitempty"` + ComponentType string `protobuf:"bytes,1,opt,name=component_type,json=componentType,proto3" json:"component_type,omitempty"` // a descriptive high level name of the component processing one part of the query (e.g., "short term storage") + ComponentCount uint64 `protobuf:"varint,2,opt,name=component_count,json=componentCount,proto3" json:"component_count,omitempty"` // how many components of this type will process the query (indicator of read-path replication) + BlockCount uint64 `protobuf:"varint,3,opt,name=block_count,json=blockCount,proto3" json:"block_count,omitempty"` + SeriesCount uint64 `protobuf:"varint,4,opt,name=series_count,json=seriesCount,proto3" json:"series_count,omitempty"` + ProfileCount uint64 `protobuf:"varint,5,opt,name=profile_count,json=profileCount,proto3" json:"profile_count,omitempty"` + SampleCount uint64 `protobuf:"varint,6,opt,name=sample_count,json=sampleCount,proto3" json:"sample_count,omitempty"` IndexBytes uint64 `protobuf:"varint,7,opt,name=index_bytes,json=indexBytes,proto3" json:"index_bytes,omitempty"` ProfileBytes uint64 `protobuf:"varint,8,opt,name=profile_bytes,json=profileBytes,proto3" json:"profile_bytes,omitempty"` SymbolBytes uint64 `protobuf:"varint,9,opt,name=symbol_bytes,json=symbolBytes,proto3" json:"symbol_bytes,omitempty"` @@ -1241,37 +1241,37 @@ func (x *QueryScope) GetComponentType() string { return "" } -func (x *QueryScope) GetComponentCount() int64 { +func (x *QueryScope) GetComponentCount() uint64 { if x != nil { return x.ComponentCount } return 0 } -func (x *QueryScope) GetNumBlocks() uint64 { +func (x *QueryScope) GetBlockCount() uint64 { if x != nil { - return x.NumBlocks + return x.BlockCount } return 0 } -func (x *QueryScope) GetNumSeries() uint64 { +func (x *QueryScope) GetSeriesCount() uint64 { if x != nil { - return x.NumSeries + return x.SeriesCount } return 0 } -func (x *QueryScope) GetNumProfiles() uint64 { +func (x *QueryScope) GetProfileCount() uint64 { if x != nil { - return x.NumProfiles + return x.ProfileCount } return 0 } -func (x *QueryScope) GetNumSamples() uint64 { +func (x *QueryScope) GetSampleCount() uint64 { if x != nil { - return x.NumSamples + return x.SampleCount } return 0 } @@ -1525,110 +1525,111 @@ var file_querier_v1_querier_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x52, 0x0b, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xc7, 0x02, 0x0a, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x22, 0xd1, 0x02, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, - 0x75, 0x6d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, - 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, - 0x6d, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x70, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6e, - 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, - 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0a, 0x6e, 0x75, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, - 0x70, 0x61, 0x63, 0x74, 0x12, 0x38, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x49, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x30, - 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x5f, - 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x31, 0x0a, 0x14, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, - 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x65, - 0x64, 0x65, 0x64, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, + 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xac, + 0x01, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x38, + 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x69, 0x6e, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x49, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x51, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x14, 0x64, 0x65, + 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x65, 0x65, 0x64, + 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x32, 0xbb, 0x07, + 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x53, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, + 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x19, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, + 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, + 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, + 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, + 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, + 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, + 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x17, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, + 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x19, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x73, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, - 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x71, 0x0a, 0x16, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, - 0x6e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, - 0x12, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x00, - 0x12, 0x53, 0x0a, 0x0c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, - 0x12, 0x1f, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x17, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0c, - 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, - 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, - 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, - 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, - 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xab, 0x01, 0x0a, 0x0e, + 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0c, + 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x61, 0x66, 0x61, + 0x6e, 0x61, 0x2f, 0x70, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x16, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x51, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go index 563c7760a2..c5fbef6779 100644 --- a/api/gen/proto/go/querier/v1/querier_vtproto.pb.go +++ b/api/gen/proto/go/querier/v1/querier_vtproto.pb.go @@ -491,10 +491,10 @@ func (m *QueryScope) CloneVT() *QueryScope { r := &QueryScope{ ComponentType: m.ComponentType, ComponentCount: m.ComponentCount, - NumBlocks: m.NumBlocks, - NumSeries: m.NumSeries, - NumProfiles: m.NumProfiles, - NumSamples: m.NumSamples, + BlockCount: m.BlockCount, + SeriesCount: m.SeriesCount, + ProfileCount: m.ProfileCount, + SampleCount: m.SampleCount, IndexBytes: m.IndexBytes, ProfileBytes: m.ProfileBytes, SymbolBytes: m.SymbolBytes, @@ -1145,16 +1145,16 @@ func (this *QueryScope) EqualVT(that *QueryScope) bool { if this.ComponentCount != that.ComponentCount { return false } - if this.NumBlocks != that.NumBlocks { + if this.BlockCount != that.BlockCount { return false } - if this.NumSeries != that.NumSeries { + if this.SeriesCount != that.SeriesCount { return false } - if this.NumProfiles != that.NumProfiles { + if this.ProfileCount != that.ProfileCount { return false } - if this.NumSamples != that.NumSamples { + if this.SampleCount != that.SampleCount { return false } if this.IndexBytes != that.IndexBytes { @@ -2788,23 +2788,23 @@ func (m *QueryScope) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x38 } - if m.NumSamples != 0 { - i = encodeVarint(dAtA, i, uint64(m.NumSamples)) + if m.SampleCount != 0 { + i = encodeVarint(dAtA, i, uint64(m.SampleCount)) i-- dAtA[i] = 0x30 } - if m.NumProfiles != 0 { - i = encodeVarint(dAtA, i, uint64(m.NumProfiles)) + if m.ProfileCount != 0 { + i = encodeVarint(dAtA, i, uint64(m.ProfileCount)) i-- dAtA[i] = 0x28 } - if m.NumSeries != 0 { - i = encodeVarint(dAtA, i, uint64(m.NumSeries)) + if m.SeriesCount != 0 { + i = encodeVarint(dAtA, i, uint64(m.SeriesCount)) i-- dAtA[i] = 0x20 } - if m.NumBlocks != 0 { - i = encodeVarint(dAtA, i, uint64(m.NumBlocks)) + if m.BlockCount != 0 { + i = encodeVarint(dAtA, i, uint64(m.BlockCount)) i-- dAtA[i] = 0x18 } @@ -3332,17 +3332,17 @@ func (m *QueryScope) SizeVT() (n int) { if m.ComponentCount != 0 { n += 1 + sov(uint64(m.ComponentCount)) } - if m.NumBlocks != 0 { - n += 1 + sov(uint64(m.NumBlocks)) + if m.BlockCount != 0 { + n += 1 + sov(uint64(m.BlockCount)) } - if m.NumSeries != 0 { - n += 1 + sov(uint64(m.NumSeries)) + if m.SeriesCount != 0 { + n += 1 + sov(uint64(m.SeriesCount)) } - if m.NumProfiles != 0 { - n += 1 + sov(uint64(m.NumProfiles)) + if m.ProfileCount != 0 { + n += 1 + sov(uint64(m.ProfileCount)) } - if m.NumSamples != 0 { - n += 1 + sov(uint64(m.NumSamples)) + if m.SampleCount != 0 { + n += 1 + sov(uint64(m.SampleCount)) } if m.IndexBytes != 0 { n += 1 + sov(uint64(m.IndexBytes)) @@ -5934,16 +5934,16 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ComponentCount |= int64(b&0x7F) << shift + m.ComponentCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumBlocks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BlockCount", wireType) } - m.NumBlocks = 0 + m.BlockCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -5953,16 +5953,16 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumBlocks |= uint64(b&0x7F) << shift + m.BlockCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumSeries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SeriesCount", wireType) } - m.NumSeries = 0 + m.SeriesCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -5972,16 +5972,16 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumSeries |= uint64(b&0x7F) << shift + m.SeriesCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumProfiles", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProfileCount", wireType) } - m.NumProfiles = 0 + m.ProfileCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -5991,16 +5991,16 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumProfiles |= uint64(b&0x7F) << shift + m.ProfileCount |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumSamples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SampleCount", wireType) } - m.NumSamples = 0 + m.SampleCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -6010,7 +6010,7 @@ func (m *QueryScope) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NumSamples |= uint64(b&0x7F) << shift + m.SampleCount |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/api/ingester/v1/ingester.proto b/api/ingester/v1/ingester.proto index 86f64cc8c4..52bf13600e 100644 --- a/api/ingester/v1/ingester.proto +++ b/api/ingester/v1/ingester.proto @@ -239,10 +239,10 @@ message GetBlockStatsResponse { } message BlockStats { - uint64 num_series = 2; - uint64 num_profiles = 3; - uint64 num_samples = 4; + uint64 series_count = 2; + uint64 profile_count = 3; + uint64 sample_count = 4; uint64 index_bytes = 5; - uint64 profiles_bytes = 6; - uint64 symbols_bytes = 7; + uint64 profile_bytes = 6; + uint64 symbol_bytes = 7; } diff --git a/api/openapiv2/gen/phlare.swagger.json b/api/openapiv2/gen/phlare.swagger.json index ea79d9e323..145f6a2369 100644 --- a/api/openapiv2/gen/phlare.swagger.json +++ b/api/openapiv2/gen/phlare.swagger.json @@ -547,15 +547,15 @@ "v1BlockStats": { "type": "object", "properties": { - "numSeries": { + "seriesCount": { "type": "string", "format": "uint64" }, - "numProfiles": { + "profileCount": { "type": "string", "format": "uint64" }, - "numSamples": { + "sampleCount": { "type": "string", "format": "uint64" }, @@ -563,11 +563,11 @@ "type": "string", "format": "uint64" }, - "profilesBytes": { + "profileBytes": { "type": "string", "format": "uint64" }, - "symbolsBytes": { + "symbolBytes": { "type": "string", "format": "uint64" } @@ -1129,26 +1129,26 @@ "properties": { "componentType": { "type": "string", - "title": "high level, e.g., \"short term\" or \"long term\" storage" + "title": "a descriptive high level name of the component processing one part of the query (e.g., \"short term storage\")" }, "componentCount": { "type": "string", - "format": "int64", - "title": "how many components of this type will work on the query" + "format": "uint64", + "title": "how many components of this type will process the query (indicator of read-path replication)" }, - "numBlocks": { + "blockCount": { "type": "string", "format": "uint64" }, - "numSeries": { + "seriesCount": { "type": "string", "format": "uint64" }, - "numProfiles": { + "profileCount": { "type": "string", "format": "uint64" }, - "numSamples": { + "sampleCount": { "type": "string", "format": "uint64" }, diff --git a/api/querier/v1/querier.proto b/api/querier/v1/querier.proto index d3b8ee8db0..3192ecc663 100644 --- a/api/querier/v1/querier.proto +++ b/api/querier/v1/querier.proto @@ -164,13 +164,13 @@ message AnalyzeQueryResponse { } message QueryScope { - string component_type = 1; // high level, e.g., "short term" or "long term" storage - int64 component_count = 2; // how many components of this type will work on the query + string component_type = 1; // a descriptive high level name of the component processing one part of the query (e.g., "short term storage") + uint64 component_count = 2; // how many components of this type will process the query (indicator of read-path replication) - uint64 num_blocks = 3; - uint64 num_series = 4; - uint64 num_profiles = 5; - uint64 num_samples = 6; + uint64 block_count = 3; + uint64 series_count = 4; + uint64 profile_count = 5; + uint64 sample_count = 6; uint64 index_bytes = 7; uint64 profile_bytes = 8; uint64 symbol_bytes = 9; diff --git a/docs/sources/configure-server/reference-configuration-parameters/index.md b/docs/sources/configure-server/reference-configuration-parameters/index.md index c6a0570615..59748393f6 100644 --- a/docs/sources/configure-server/reference-configuration-parameters/index.md +++ b/docs/sources/configure-server/reference-configuration-parameters/index.md @@ -1883,15 +1883,16 @@ The `limits` block configures default and per-tenant limits imposed by component # CLI flag: -querier.max-query-parallelism [max_query_parallelism: | default = 0] -# Whether query analysis is enabled. If disabled, the corresponding endpoint -# will return an empty response. +# Whether query analysis is enabled in the query frontend. If disabled, the +# /AnalyzeQuery endpoint will return an empty response. # CLI flag: -querier.query-analysis-enabled [query_analysis_enabled: | default = true] # Whether the series portion of query analysis is enabled. If disabled, no -# series data (e.g., series count) will be calculated. +# series data (e.g., series count) will be calculated by the /AnalyzeQuery +# endpoint. # CLI flag: -querier.query-analysis-series-enabled -[query_analysis_series_enabled: | default = true] +[query_analysis_series_enabled: | default = false] # Maximum number of flame graph nodes by default. 0 to disable. # CLI flag: -querier.max-flamegraph-nodes-default diff --git a/pkg/phlaredb/block/metadata.go b/pkg/phlaredb/block/metadata.go index 7c24fb5cd8..3d9add4c16 100644 --- a/pkg/phlaredb/block/metadata.go +++ b/pkg/phlaredb/block/metadata.go @@ -361,24 +361,24 @@ func (meta *Meta) GetStats() MetaStats { func (stats MetaStats) ConvertToBlockStats() *ingestv1.BlockStats { indexBytes := uint64(0) - profilesBytes := uint64(0) - symbolsBytes := uint64(0) + profileBytes := uint64(0) + symbolBytes := uint64(0) for _, f := range stats.FileStats { if f.RelPath == IndexFilename { indexBytes = f.SizeBytes } else if f.RelPath == "profiles.parquet" { - profilesBytes += f.SizeBytes + profileBytes += f.SizeBytes } else if strings.HasPrefix(f.RelPath, "symbols") { - symbolsBytes += f.SizeBytes + symbolBytes += f.SizeBytes } } blockStats := &ingestv1.BlockStats{ - NumSeries: stats.NumSeries, - NumProfiles: stats.NumProfiles, - NumSamples: stats.NumSamples, - IndexBytes: indexBytes, - ProfilesBytes: profilesBytes, - SymbolsBytes: symbolsBytes, + SeriesCount: stats.NumSeries, + ProfileCount: stats.NumProfiles, + SampleCount: stats.NumSamples, + IndexBytes: indexBytes, + ProfileBytes: profileBytes, + SymbolBytes: symbolBytes, } return blockStats } diff --git a/pkg/querier/analyze_query.go b/pkg/querier/analyze_query.go index 9dd15977f6..67780b2966 100644 --- a/pkg/querier/analyze_query.go +++ b/pkg/querier/analyze_query.go @@ -68,11 +68,11 @@ func getDataFromPlan(plan blockPlan) (ingesterQueryScope *queryScope, storeGatew deduplicationNeeded = deduplicationNeeded || planEntry.Deduplication if planEntry.InstanceType == ingesterInstance { ingesterQueryScope.ComponentCount += 1 - ingesterQueryScope.NumBlocks += uint64(len(planEntry.Ulids)) + ingesterQueryScope.BlockCount += uint64(len(planEntry.Ulids)) ingesterQueryScope.blockIds = append(ingesterQueryScope.blockIds, planEntry.Ulids...) } else { storeGatewayQueryScope.ComponentCount += 1 - storeGatewayQueryScope.NumBlocks += uint64(len(planEntry.Ulids)) + storeGatewayQueryScope.BlockCount += uint64(len(planEntry.Ulids)) storeGatewayQueryScope.blockIds = append(storeGatewayQueryScope.blockIds, planEntry.Ulids...) } } @@ -109,12 +109,12 @@ func (q *Querier) getBlockStatsFromStoreGateways(ctx context.Context, plan block func addBlockStatsToQueryScope(blockStatsFromReplicas []ResponseFromReplica[*ingestv1.GetBlockStatsResponse], queryScope *queryScope) { for _, r := range blockStatsFromReplicas { for _, stats := range r.response.BlockStats { - queryScope.NumSeries += stats.NumSeries - queryScope.NumProfiles += stats.NumProfiles - queryScope.NumSamples += stats.NumSamples + queryScope.SeriesCount += stats.SeriesCount + queryScope.ProfileCount += stats.ProfileCount + queryScope.SampleCount += stats.SampleCount queryScope.IndexBytes += stats.IndexBytes - queryScope.ProfileBytes += stats.ProfilesBytes - queryScope.SymbolBytes += stats.SymbolsBytes + queryScope.ProfileBytes += stats.ProfileBytes + queryScope.SymbolBytes += stats.SymbolBytes } } } diff --git a/pkg/querier/analyze_query_test.go b/pkg/querier/analyze_query_test.go index 141c4bab3c..62115afeea 100644 --- a/pkg/querier/analyze_query_test.go +++ b/pkg/querier/analyze_query_test.go @@ -1,9 +1,11 @@ package querier import ( + "slices" "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ingestv1 "github.com/grafana/pyroscope/api/gen/proto/go/ingester/v1" querierv1 "github.com/grafana/pyroscope/api/gen/proto/go/querier/v1" @@ -11,24 +13,28 @@ import ( func Test_getDataFromPlan(t *testing.T) { tests := []struct { - name string - plan blockPlan - wantIngesterQueryScope *queryScope - wantStoreGatewayQueryScope *queryScope - wantDeduplicationNeeded bool + name string + plan blockPlan + verifyIngesterQueryScope func(t *testing.T, scope *queryScope) + verifyStoreGatewayQueryScope func(t *testing.T, scope *queryScope) + wantDeduplicationNeeded bool }{ { name: "empty plan", plan: blockPlan{}, - wantIngesterQueryScope: &queryScope{ - QueryScope: &querierv1.QueryScope{ - ComponentType: "Short term storage", - }, + verifyIngesterQueryScope: func(t *testing.T, scope *queryScope) { + require.Equal(t, &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Short term storage", + }, + }, scope) }, - wantStoreGatewayQueryScope: &queryScope{ - QueryScope: &querierv1.QueryScope{ - ComponentType: "Long term storage", - }, + verifyStoreGatewayQueryScope: func(t *testing.T, scope *queryScope) { + require.Equal(t, &queryScope{ + QueryScope: &querierv1.QueryScope{ + ComponentType: "Long term storage", + }, + }, scope) }, wantDeduplicationNeeded: false, }, @@ -44,18 +50,15 @@ func Test_getDataFromPlan(t *testing.T) { InstanceType: ingesterInstance, }, }, - wantIngesterQueryScope: &queryScope{ - QueryScope: &querierv1.QueryScope{ - ComponentType: "Short term storage", - ComponentCount: 2, - NumBlocks: 4, - }, - blockIds: []string{"block A", "block B", "block C", "block D"}, + verifyIngesterQueryScope: func(t *testing.T, scope *queryScope) { + require.Equal(t, uint64(2), scope.ComponentCount) + require.Equal(t, uint64(4), scope.BlockCount) + for _, block := range []string{"block A", "block B", "block C", "block D"} { + require.True(t, slices.Contains(scope.blockIds, block)) + } }, - wantStoreGatewayQueryScope: &queryScope{ - QueryScope: &querierv1.QueryScope{ - ComponentType: "Long term storage", - }, + verifyStoreGatewayQueryScope: func(t *testing.T, scope *queryScope) { + require.Equal(t, uint64(0), scope.ComponentCount) }, wantDeduplicationNeeded: true, }, @@ -75,21 +78,19 @@ func Test_getDataFromPlan(t *testing.T) { InstanceType: storeGatewayInstance, }, }, - wantIngesterQueryScope: &queryScope{ - QueryScope: &querierv1.QueryScope{ - ComponentType: "Short term storage", - ComponentCount: 2, - NumBlocks: 4, - }, - blockIds: []string{"block A", "block B", "block C", "block D"}, + verifyIngesterQueryScope: func(t *testing.T, scope *queryScope) { + require.Equal(t, uint64(2), scope.ComponentCount) + require.Equal(t, uint64(4), scope.BlockCount) + for _, block := range []string{"block A", "block B", "block C", "block D"} { + require.True(t, slices.Contains(scope.blockIds, block)) + } }, - wantStoreGatewayQueryScope: &queryScope{ - QueryScope: &querierv1.QueryScope{ - ComponentType: "Long term storage", - ComponentCount: 1, - NumBlocks: 2, - }, - blockIds: []string{"block E", "block F"}, + verifyStoreGatewayQueryScope: func(t *testing.T, scope *queryScope) { + require.Equal(t, uint64(1), scope.ComponentCount) + require.Equal(t, uint64(2), scope.BlockCount) + for _, block := range []string{"block E", "block F"} { + require.True(t, slices.Contains(scope.blockIds, block)) + } }, wantDeduplicationNeeded: true, }, @@ -97,8 +98,8 @@ func Test_getDataFromPlan(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { gotIngesterQueryScope, gotStoreGatewayQueryScope, gotDeduplicationNeeded := getDataFromPlan(tt.plan) - assert.Equalf(t, tt.wantIngesterQueryScope, gotIngesterQueryScope, "getDataFromPlan(%v)", tt.plan) - assert.Equalf(t, tt.wantStoreGatewayQueryScope, gotStoreGatewayQueryScope, "getDataFromPlan(%v)", tt.plan) + tt.verifyIngesterQueryScope(t, gotIngesterQueryScope) + tt.verifyStoreGatewayQueryScope(t, gotStoreGatewayQueryScope) assert.Equalf(t, tt.wantDeduplicationNeeded, gotDeduplicationNeeded, "getDataFromPlan(%v)", tt.plan) }) } @@ -121,9 +122,9 @@ func Test_addBlockStatsToQueryScope(t *testing.T) { queryScope: &queryScope{QueryScope: &querierv1.QueryScope{}}, }, verifyExpectations: func(t *testing.T, s *queryScope) { - assert.Equalf(t, uint64(0), s.NumSeries, "addBlockStatsToQueryScope(%v)", s) - assert.Equalf(t, uint64(0), s.NumProfiles, "addBlockStatsToQueryScope(%v)", s) - assert.Equalf(t, uint64(0), s.NumSamples, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(0), s.SeriesCount, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(0), s.ProfileCount, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(0), s.SampleCount, "addBlockStatsToQueryScope(%v)", s) assert.Equalf(t, uint64(0), s.IndexBytes, "addBlockStatsToQueryScope(%v)", s) assert.Equalf(t, uint64(0), s.ProfileBytes, "addBlockStatsToQueryScope(%v)", s) assert.Equalf(t, uint64(0), s.SymbolBytes, "addBlockStatsToQueryScope(%v)", s) @@ -138,20 +139,20 @@ func Test_addBlockStatsToQueryScope(t *testing.T) { response: &ingestv1.GetBlockStatsResponse{ BlockStats: []*ingestv1.BlockStats{ { - NumSeries: 50, - NumProfiles: 100, - NumSamples: 2000, - IndexBytes: 1024, - ProfilesBytes: 4096, - SymbolsBytes: 65536, + SeriesCount: 50, + ProfileCount: 100, + SampleCount: 2000, + IndexBytes: 1024, + ProfileBytes: 4096, + SymbolBytes: 65536, }, { - NumSeries: 100, - NumProfiles: 200, - NumSamples: 4000, - IndexBytes: 2048, - ProfilesBytes: 8192, - SymbolsBytes: 131072, + SeriesCount: 100, + ProfileCount: 200, + SampleCount: 4000, + IndexBytes: 2048, + ProfileBytes: 8192, + SymbolBytes: 131072, }, }, }, @@ -161,12 +162,12 @@ func Test_addBlockStatsToQueryScope(t *testing.T) { response: &ingestv1.GetBlockStatsResponse{ BlockStats: []*ingestv1.BlockStats{ { - NumSeries: 50, - NumProfiles: 100, - NumSamples: 2000, - IndexBytes: 1024, - ProfilesBytes: 4096, - SymbolsBytes: 65536, + SeriesCount: 50, + ProfileCount: 100, + SampleCount: 2000, + IndexBytes: 1024, + ProfileBytes: 4096, + SymbolBytes: 65536, }, }, }, @@ -175,9 +176,9 @@ func Test_addBlockStatsToQueryScope(t *testing.T) { queryScope: &queryScope{QueryScope: &querierv1.QueryScope{}}, }, verifyExpectations: func(t *testing.T, s *queryScope) { - assert.Equalf(t, uint64(200), s.NumSeries, "addBlockStatsToQueryScope(%v)", s) - assert.Equalf(t, uint64(400), s.NumProfiles, "addBlockStatsToQueryScope(%v)", s) - assert.Equalf(t, uint64(8000), s.NumSamples, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(200), s.SeriesCount, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(400), s.ProfileCount, "addBlockStatsToQueryScope(%v)", s) + assert.Equalf(t, uint64(8000), s.SampleCount, "addBlockStatsToQueryScope(%v)", s) assert.Equalf(t, uint64(4096), s.IndexBytes, "addBlockStatsToQueryScope(%v)", s) assert.Equalf(t, uint64(16384), s.ProfileBytes, "addBlockStatsToQueryScope(%v)", s) assert.Equalf(t, uint64(262144), s.SymbolBytes, "addBlockStatsToQueryScope(%v)", s) From 33e3926f9199313d4566665dc807596578af4e4c Mon Sep 17 00:00:00 2001 From: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Date: Mon, 6 May 2024 12:33:37 -0300 Subject: [PATCH 27/27] Revert change to ebpf/testdata --- ebpf/testdata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebpf/testdata b/ebpf/testdata index e82696abfc..31c1b5a98c 160000 --- a/ebpf/testdata +++ b/ebpf/testdata @@ -1 +1 @@ -Subproject commit e82696abfc724799c9be63939d2ba4e5195f6f2f +Subproject commit 31c1b5a98c20d67e5154c6ef91e7b7b1762c6c56