Documentation ¶
Index ¶
- Constants
- Variables
- func CompareTables(tables1, tables2 []*TableDef) ([]*TableDef, []TableRowDef)
- func GetReportEndTables(startTime, endTime string, db *gorm.DB, sqliteDB *dbstore.DB, reportID uint, ...) ([]*TableDef, []TableRowDef)
- func GetReportHeaderTables(startTime, endTime string, db *gorm.DB, sqliteDB *dbstore.DB, reportID uint, ...) ([]*TableDef, []TableRowDef)
- func GetReportTablesIn2Range(startTime1, endTime1, startTime2, endTime2 string, db *gorm.DB, ...) ([]*TableDef, []TableRowDef)
- func Migrate(db *dbstore.DB)
- func NewReport(db *dbstore.DB, startTime, endTime time.Time, ...) (uint, error)
- func RoundFloatString(s string) string
- func SaveReportContent(db *dbstore.DB, reportID uint, content string) error
- func UpdateReportProgress(db *dbstore.DB, reportID uint, progress int) error
- type AvgMaxMinTableDef
- type Report
- type ReportRes
- type Service
- type TableDef
- func GenerateDiffTable(dr diffRows) *TableDef
- func GenerateReportError(errRows []TableRowDef) *TableDef
- func GetCPUUsageTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetClusterHardwareInfoTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetClusterInfoTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetCompareHeaderTimeTable(startTime1, endTime1, startTime2, endTime2 string) *TableDef
- func GetCompareReportTablesForDisplay(startTime1, endTime1, startTime2, endTime2 string, db *gorm.DB, ...) []*TableDef
- func GetDiagnoseReport(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetGoroutinesCountTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetHeaderTimeTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetLoadTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetPDClusterStatusTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetPDConfigInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetPDCurrentConfig(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetPDEtcdStatusTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetPDSchedulerInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetPDTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetProcessMemUsageTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetReportTables(startTime, endTime string, db *gorm.DB, sqliteDB *dbstore.DB, reportID uint) []*TableDef
- func GetReportTablesForDisplay(startTime, endTime string, db *gorm.DB, sqliteDB *dbstore.DB, reportID uint) []*TableDef
- func GetStoreStatusTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiDBCurrentConfig(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiDBDDLOwner(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiDBGCConfigInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiDBTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiDBTxnTableData(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVCacheHitTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVCopInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVCurrentConfig(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVErrorTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVGCInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVRaftInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVRegionSizeInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVRocksDBTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVSchedulerInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVSnapshotInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVStoreInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVTaskInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVThreadCPUTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTiKVTotalTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTotalErrorTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- func GetTotalTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef, error)
- type TableRowDef
Constants ¶
View Source
const ( // Category names. CategoryHeader = "header" CategoryDiagnose = "diagnose" CategoryLoad = "load" CategoryOverview = "overview" CategoryTiDB = "TiDB" CategoryPD = "PD" CategoryTiKV = "TiKV" CategoryConfig = "config" CategoryError = "error" )
View Source
const TemplateIndex = `` /* 2634-byte string literal not displayed */
View Source
const TemplateTable = `` /* 2608-byte string literal not displayed */
Variables ¶
View Source
var TemplateInfos = []utils.TemplateInfo{ {Name: "sql-diagnosis/index", Text: TemplateIndex}, {Name: "sql-diagnosis/table", Text: TemplateTable}, }
Functions ¶
func CompareTables ¶
func CompareTables(tables1, tables2 []*TableDef) ([]*TableDef, []TableRowDef)
func GetReportEndTables ¶
func GetReportHeaderTables ¶
func GetReportTablesIn2Range ¶
func RoundFloatString ¶
func SaveReportContent ¶
Types ¶
type AvgMaxMinTableDef ¶
type AvgMaxMinTableDef struct { Comment string // contains filtered or unexported fields }
type Report ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Register ¶
func (s *Service) Register(r *gin.RouterGroup, auth *user.AuthService)
type TableDef ¶
type TableDef struct { Category []string // The category of the table, such as [TiDB] Title string CommentEN string // English Comment CommentCN string // Chinese comment Column []string // Column name Rows []TableRowDef // contains filtered or unexported fields }
func GenerateDiffTable ¶
func GenerateDiffTable(dr diffRows) *TableDef
func GenerateReportError ¶
func GenerateReportError(errRows []TableRowDef) *TableDef
func GetCPUUsageTable ¶
func GetClusterInfoTable ¶
func GetDiagnoseReport ¶
func GetGoroutinesCountTable ¶
func GetHeaderTimeTable ¶
func GetPDClusterStatusTable ¶
func GetPDConfigInfo ¶
func GetPDCurrentConfig ¶
func GetPDEtcdStatusTable ¶
func GetPDSchedulerInfo ¶
func GetPDTimeConsumeTable ¶
func GetProcessMemUsageTable ¶
func GetReportTables ¶
func GetStoreStatusTable ¶
func GetTiDBCurrentConfig ¶
func GetTiDBDDLOwner ¶
func GetTiDBGCConfigInfo ¶
func GetTiDBTimeConsumeTable ¶
func GetTiDBTxnTableData ¶
func GetTiKVCacheHitTable ¶
func GetTiKVCurrentConfig ¶
func GetTiKVErrorTable ¶
func GetTiKVRaftInfo ¶
func GetTiKVRegionSizeInfo ¶
func GetTiKVSchedulerInfo ¶
func GetTiKVSnapshotInfo ¶
func GetTiKVStoreInfo ¶
func GetTiKVTaskInfo ¶
func GetTiKVThreadCPUTable ¶
func GetTotalErrorTable ¶
func (TableDef) ColumnWidth ¶
type TableRowDef ¶
type TableRowDef struct { Values []string SubValues [][]string // SubValues need fold default. Comment string // contains filtered or unexported fields }
func NewTableRowDef ¶
func NewTableRowDef(values []string, subValues [][]string) TableRowDef
Source Files ¶
Click to show internal directories.
Click to hide internal directories.