Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Profiles = ProfileMap{ "realistic-k8s-2d-small": realisticK8s([]time.Duration{ 2 * time.Hour, 2 * time.Hour, 2 * time.Hour, 8 * time.Hour, 8 * time.Hour, 8 * time.Hour, 8 * time.Hour, 8 * time.Hour, 2 * time.Hour, }, 1*time.Hour, 100, 50), "realistic-k8s-1w-small": realisticK8s([]time.Duration{ 2 * time.Hour, 2 * time.Hour, 2 * time.Hour, 8 * time.Hour, 8 * time.Hour, 48 * time.Hour, 48 * time.Hour, 48 * time.Hour, 2 * time.Hour, }, 1*time.Hour, 100, 50), "realistic-k8s-30d-tiny": realisticK8s([]time.Duration{ 2 * time.Hour, 2 * time.Hour, 2 * time.Hour, 8 * time.Hour, 176 * time.Hour, 176 * time.Hour, 176 * time.Hour, 176 * time.Hour, 2 * time.Hour, }, 1*time.Hour, 1, 5), "realistic-k8s-365d-tiny": realisticK8s([]time.Duration{ 2 * time.Hour, 2 * time.Hour, 2 * time.Hour, 8 * time.Hour, 176 * time.Hour, 176 * time.Hour, 176 * time.Hour, 176 * time.Hour, 67 * 24 * time.Hour, 67 * 24 * time.Hour, 67 * 24 * time.Hour, 67 * 24 * time.Hour, 67 * 24 * time.Hour, }, 1*time.Hour, 1, 5), "continuous-1w-small": continuous([]time.Duration{ 2 * time.Hour, 2 * time.Hour, 2 * time.Hour, 8 * time.Hour, 8 * time.Hour, 48 * time.Hour, 48 * time.Hour, 48 * time.Hour, 2 * time.Hour, }, 100, 100), "continuous-30d-tiny": continuous([]time.Duration{ 2 * time.Hour, 2 * time.Hour, 2 * time.Hour, 8 * time.Hour, 176 * time.Hour, 176 * time.Hour, 176 * time.Hour, 176 * time.Hour, 2 * time.Hour, }, 1, 5), "continuous-365d-tiny": continuous([]time.Duration{ 2 * time.Hour, 2 * time.Hour, 2 * time.Hour, 8 * time.Hour, 176 * time.Hour, 176 * time.Hour, 176 * time.Hour, 176 * time.Hour, 67 * 24 * time.Hour, 67 * 24 * time.Hour, 67 * 24 * time.Hour, 67 * 24 * time.Hour, 67 * 24 * time.Hour, }, 1, 5), } )
Functions ¶
Types ¶
type BlockSpec ¶
type BlockSpec struct { metadata.Meta Series []SeriesSpec }
TODO(bwplotka): Add option to create downsampled blocks.
type BlockWriter ¶
type BlockWriter struct {
// contains filtered or unexported fields
}
BlockWriter is implementation of Writer interface. Not designed to be thread-safe.
func NewTSDBBlockWriter ¶
func NewTSDBBlockWriter(logger log.Logger, dir string) (*BlockWriter, error)
NewTSDBBlockWriter create new TSDB block writer.
The returned writer is generally not assumed to be thread-safe at the moment. It is assumed for single use.
The returned writer accumulates all series in memory until `Flush` is called. The repeated pattern of writes and flushes is allowed e.g.:
for n < 1000 { // write a lot of stuff into memory w.Write() w.Write() // write block to disk w.Flush() }
The above loop will produce 1000 blocks on disk.
Note that the writer will not check if the target directory exists or contains anything at all. It is the caller's responsibility to ensure that the resulting blocks do not overlap etc.
type ProfileMap ¶
func (ProfileMap) Keys ¶
func (p ProfileMap) Keys() (keys []string)
type SeriesSpec ¶
Click to show internal directories.
Click to hide internal directories.