Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Detail ¶
type Detail struct {
SchemaName string `json:"schema_name"`
Digest string `json:"digest"`
DigestText string `json:"digest_text"`
AggSumLatency int `json:"sum_latency"`
AggExecCount int `json:"exec_count"`
AggAvgAffectedRows int `json:"avg_affected_rows"`
AggAvgTotalKeys int `json:"avg_total_keys"`
AggTableNames string `json:"agg_table_names"`
// Schemas is extracted from table_names column
// table_names example: "d1.t1,d2.t2", we extract the "d1,d2" as schemas
AggSchemas string `json:"schemas"`
QuerySampleText string `json:"query_sample_text"`
LastSeen string `json:"last_seen"`
Plans []*Plan `json:"plans"`
}
Detail represents the detail of a statement
func QueryStatementDetail ¶
Sample params: schemas: "tpcc" beginTime: "2020-02-13 10:30:00" endTime: "2020-02-13 11:00:00" digest: "bcaa7bdb37e24d03fb48f20cc32f4ff3f51c0864dc378829e519650df5c7b923"
type Node ¶
type Node struct {
Address string `json:"address"`
SumLatency int `json:"sum_latency"`
ExecCount int `json:"exec_count"`
AvgLatency int `json:"avg_latency"`
MaxLatency int `json:"max_latency"`
AvgMem int `json:"avg_mem"`
SumBackoffTimes int `json:"sum_backoff_times"`
}
Node represents the statement in each node
func QueryStatementNodes ¶
func QueryStatementNodes(db *gorm.DB, schema, beginTime, endTime, digest string) (result []*Node, err error)
Sample params: schemas: "tpcc" beginTime: "2020-02-13 10:30:00" endTime: "2020-02-13 11:00:00" digest: "bcaa7bdb37e24d03fb48f20cc32f4ff3f51c0864dc378829e519650df5c7b923"
type Overview ¶
type Overview struct {
SchemaName string `json:"schema_name"`
Digest string `json:"digest"`
DigestText string `json:"digest_text"`
AggSumLatency int `json:"sum_latency"`
AggAvgLatency int `json:"avg_latency"`
AggExecCount int `json:"exec_count"`
AggAvgAffectedRows int `json:"avg_affected_rows"`
AggAvgMem int `json:"avg_mem"`
AggTableNames string `json:"agg_table_names"`
// Schemas is extracted from table_names column
// table_names example: "d1.t1,d2.t2", we extract the "d1,d2" as schemas
AggSchemas string `json:"schemas"`
}
Overview represents the overview of a statement
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Register ¶
func (s *Service) Register(r *gin.RouterGroup, auth *user.AuthService)
Click to show internal directories.
Click to hide internal directories.