Documentation ¶
Index ¶
- Constants
- type DefaultStore
- func (ds *DefaultStore) Close()
- func (ds *DefaultStore) Instances(items []InstanceItem) error
- func (ds *DefaultStore) PlanMeta(meta *tipb.PlanMeta) error
- func (ds *DefaultStore) ResourceMeteringRecord(instance, instanceType string, record *rsmetering.ResourceUsageRecord, ...) error
- func (ds *DefaultStore) SQLMeta(meta *tipb.SQLMeta) error
- func (ds *DefaultStore) TopSQLRecord(instance, instanceType string, record *tipb.TopSQLRecord) error
- type InstanceItem
- type Metric
- type PrepareSlicePool
- type Store
- type StringBuilderPool
Constants ¶
View Source
const ( MetricNameInstance = "instance" MetricNameCPUTime = "cpu_time" MetricNameReadRow = "read_row" MetricNameReadIndex = "read_index" MetricNameWriteRow = "write_row" MetricNameWriteIndex = "write_index" MetricNameSQLExecCount = "sql_exec_count" MetricNameSQLDurationSum = "sql_duration_sum" MetricNameSQLDurationCount = "sql_duration_count" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultStore ¶
type DefaultStore struct {
// contains filtered or unexported fields
}
func NewDefaultStore ¶
func NewDefaultStore(vminsertHandler http.HandlerFunc, documentDB *genji.DB) (*DefaultStore, error)
func (*DefaultStore) Close ¶
func (ds *DefaultStore) Close()
func (*DefaultStore) Instances ¶
func (ds *DefaultStore) Instances(items []InstanceItem) error
func (*DefaultStore) PlanMeta ¶
func (ds *DefaultStore) PlanMeta(meta *tipb.PlanMeta) error
func (*DefaultStore) ResourceMeteringRecord ¶
func (ds *DefaultStore) ResourceMeteringRecord( instance, instanceType string, record *rsmetering.ResourceUsageRecord, schemaInfo *sync.Map, ) error
func (*DefaultStore) SQLMeta ¶
func (ds *DefaultStore) SQLMeta(meta *tipb.SQLMeta) error
func (*DefaultStore) TopSQLRecord ¶
func (ds *DefaultStore) TopSQLRecord(instance, instanceType string, record *tipb.TopSQLRecord) error
type InstanceItem ¶
type PrepareSlicePool ¶
type PrepareSlicePool struct {
// contains filtered or unexported fields
}
func (*PrepareSlicePool) Get ¶
func (psp *PrepareSlicePool) Get() *[]interface{}
func (*PrepareSlicePool) Put ¶
func (psp *PrepareSlicePool) Put(ps *[]interface{})
type Store ¶
type Store interface { Instances(items []InstanceItem) error TopSQLRecord(instance, instanceType string, record *tipb.TopSQLRecord) error ResourceMeteringRecord(instance, instanceType string, record *rsmetering.ResourceUsageRecord, schemaInfo *sync.Map) error SQLMeta(meta *tipb.SQLMeta) error PlanMeta(meta *tipb.PlanMeta) error Close() }
type StringBuilderPool ¶
type StringBuilderPool struct {
// contains filtered or unexported fields
}
func (*StringBuilderPool) Get ¶
func (sbp *StringBuilderPool) Get() *strings.Builder
func (*StringBuilderPool) Put ¶
func (sbp *StringBuilderPool) Put(sb *strings.Builder)
Click to show internal directories.
Click to hide internal directories.