package
1.6.65
Repository: https://github.com/deepflowio/deepflow.git
Documentation: pkg.go.dev

# README

Construct From Source

In order to improve the performance of receiving Prometheus remote_write data, we precompiled a set of pb.go files and put them here, and made several performance optimizations.

In order to allow other logic in deepflow-server (such as querier) to continue to use the original pb.go file, we modified the package in the code optimized here to avoid conflicts with the original structure.

wget https://raw.githubusercontent.com/prometheus/prometheus/main/prompb/remote.proto
wget https://raw.githubusercontent.com/prometheus/prometheus/main/prompb/remote.pb.go
wget https://raw.githubusercontent.com/prometheus/prometheus/main/prompb/types.proto
wget https://raw.githubusercontent.com/prometheus/prometheus/main/prompb/types.pb.go

# change package from `prometheus` to `prometheus_deepflow`
sed -i 's/\<prometheus\>/prometheus_deepflow/g' ./*.proto ./*.pb.go

Optimizations

We provide a ResetWithBufferReserved() method, so that the WriteRequest structure can reuse its internal TimeSeries and Labels array memory during frequent unmarshall.

In addition, when deserializing the string in Label, we use the mechanism in the unsafeBytesToString() method to avoid memory allocation. Therefore, when using this file, please note that neither the Name nor the Value in the Label hold actual memory.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Server will return a single ReadResponse message with matched series that includes list of raw samples.
Server will stream a delimited ChunkedReadResponse message that contains XOR or HISTOGRAM(!) encoded chunks for a single series.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

A BucketSpan defines a number of consecutive buckets with their offset.
Chunk represents a TSDB chunk.
ChunkedReadResponse is a response when response_type equals STREAMED_XOR_CHUNKS.
ChunkedSeries represents single, encoded time series.
No description provided by the author
A native histogram, also known as a sparse histogram.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Matcher specifies a rule, which can match or set of labels or not.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReadRequest represents a remote read request.
ReadResponse is a response when response_type equals SAMPLES.
No description provided by the author
TimeSeries represents samples and labels for a single time series.
No description provided by the author

# Type aliases

We require this to match chunkenc.Encoding.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author