Documentation ¶
Index ¶
- Constants
- func CreateHeadWithSeries(t testing.TB, j int, opts HeadGenOptions) (*tsdb.Head, []*storepb.Series)
- func RunSeriesInterestingCases(t testutil.TB, maxSamples, maxSeries int, ...)
- func TestServerSeries(t testutil.TB, store storepb.StoreServer, cases ...*SeriesCase)
- type HeadGenOptions
- type SeriesCase
- type SeriesServer
Constants ¶
View Source
const (
// LabelLongSuffix is a label with ~50B in size, to emulate real-world high cardinality.
LabelLongSuffix = "aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd"
)
View Source
const RemoteReadFrameLimit = 1048576
Variables ¶
This section is empty.
Functions ¶
func CreateHeadWithSeries ¶
CreateHeadWithSeries returns head filled with given samples and same series returned in separate list for assertion purposes. Returned series list has "ext1"="1" prepended. Each series looks as follows: {foo=bar,i=000001aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd} <random value> where number indicate sample number from 0. Returned series are frame in same way as remote read would frame them.
func TestServerSeries ¶
func TestServerSeries(t testutil.TB, store storepb.StoreServer, cases ...*SeriesCase)
TestServerSeries runs tests against given cases.
Types ¶
type HeadGenOptions ¶
type SeriesCase ¶
type SeriesCase struct { Name string Req *storepb.SeriesRequest // Exact expectations are checked only for tests. For benchmarks only length is assured. ExpectedSeries []*storepb.Series ExpectedWarnings []string ExpectedHints []hintspb.SeriesResponseHints }
SeriesCase represents single test/benchmark case for testing storepb series.
type SeriesServer ¶
type SeriesServer struct { // This field just exist to pseudo-implement the unused methods of the interface. storepb.Store_SeriesServer SeriesSet []*storepb.Series Warnings []string HintsSet []*types.Any Size int64 // contains filtered or unexported fields }
SeriesServer is test gRPC storeAPI series server.
func NewSeriesServer ¶
func NewSeriesServer(ctx context.Context) *SeriesServer
func (*SeriesServer) Context ¶
func (s *SeriesServer) Context() context.Context
func (*SeriesServer) Send ¶
func (s *SeriesServer) Send(r *storepb.SeriesResponse) error
Click to show internal directories.
Click to hide internal directories.