Documentation
¶
Index ¶
- Variables
- func IsEnabled(ctx context.Context) bool
- func ShouldTrackHTTPGRPCResponse(code int32) bool
- type Stats
- func (s *Stats) AddFetchedChunkBytes(bytes uint64)
- func (s *Stats) AddFetchedSeries(series uint64)
- func (s *Stats) AddWallTime(t time.Duration)
- func (*Stats) Descriptor() ([]byte, []int)deprecated
- func (x *Stats) GetFetchedChunkBytes() uint64
- func (x *Stats) GetFetchedSeriesCount() uint64
- func (x *Stats) GetWallTime() int64
- func (s *Stats) LoadFetchedChunkBytes() uint64
- func (s *Stats) LoadFetchedSeries() uint64
- func (s *Stats) LoadWallTime() time.Duration
- func (s *Stats) Merge(other *Stats)
- func (*Stats) ProtoMessage()
- func (x *Stats) ProtoReflect() protoreflect.Message
- func (x *Stats) Reset()
- func (x *Stats) String() string
- type WallTimeMiddleware
Constants ¶
This section is empty.
Variables ¶
View Source
var File_stats_stats_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Stats ¶
type Stats struct { // The sum of all wall time spent in the querier to execute the query. WallTime int64 `protobuf:"varint,1,opt,name=wall_time,json=wallTime,proto3" json:"wall_time,omitempty"` // The number of series fetched for the query FetchedSeriesCount uint64 `protobuf:"varint,2,opt,name=fetched_series_count,json=fetchedSeriesCount,proto3" json:"fetched_series_count,omitempty"` // The number of bytes of the chunks fetched for the query FetchedChunkBytes uint64 `protobuf:"varint,3,opt,name=fetched_chunk_bytes,json=fetchedChunkBytes,proto3" json:"fetched_chunk_bytes,omitempty"` // contains filtered or unexported fields }
func ContextWithEmptyStats ¶
ContextWithEmptyStats returns a context with empty stats.
func FromContext ¶
FromContext gets the Stats out of the Context. Returns nil if stats have not been initialised in the context.
func (*Stats) AddFetchedChunkBytes ¶
func (*Stats) AddFetchedSeries ¶
func (*Stats) AddWallTime ¶
AddWallTime adds some time to the counter.
func (*Stats) Descriptor
deprecated
func (*Stats) GetFetchedChunkBytes ¶
func (*Stats) GetFetchedSeriesCount ¶
func (*Stats) GetWallTime ¶
func (*Stats) LoadFetchedChunkBytes ¶
func (*Stats) LoadFetchedSeries ¶
func (*Stats) LoadWallTime ¶
LoadWallTime returns current wall time.
func (*Stats) ProtoMessage ¶
func (*Stats) ProtoMessage()
func (*Stats) ProtoReflect ¶
func (x *Stats) ProtoReflect() protoreflect.Message
type WallTimeMiddleware ¶
type WallTimeMiddleware struct{}
WallTimeMiddleware tracks the wall time.
func NewWallTimeMiddleware ¶
func NewWallTimeMiddleware() WallTimeMiddleware
NewWallTimeMiddleware makes a new WallTimeMiddleware.
Click to show internal directories.
Click to hide internal directories.