Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: update system report table name #693

Merged
merged 5 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions pkg/apiserver/diagnose/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ func GetTotalTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef,
{name: "tidb_cop", tbl: "tidb_cop", labels: []string{"instance"}},
{name: "tidb_transaction", tbl: "tidb_transaction", labels: []string{"sql_type"}},
{name: "tidb_transaction_local_latch_wait", tbl: "tidb_transaction_local_latch_wait", labels: []string{"instance"}},
{name: "tidb_txn_cmd", tbl: "tidb_txn_cmd", labels: []string{"type"}},
{name: "tidb_kv_backoff", tbl: "tidb_kv_backoff", labels: []string{"type"}},
{name: "tidb_kv_request", tbl: "tidb_kv_request", labels: []string{"type"}},
{name: "tidb_slow_query", tbl: "tidb_slow_query", labels: []string{"instance"}},
Expand All @@ -386,6 +387,7 @@ func GetTotalTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef,
{name: "tidb_gc_push_task", tbl: "tidb_gc_push_task", labels: []string{"type"}},
{name: "tidb_batch_client_unavailable", tbl: "tidb_batch_client_unavailable", labels: []string{"instance"}},
{name: "tidb_batch_client_wait", tbl: "tidb_batch_client_wait", labels: []string{"instance"}},
{name: "tidb_batch_client_wait_conn", tbl: "tidb_batch_client_wait_conn", labels: []string{"instance"}},
// PD
{name: "pd_tso_rpc", tbl: "pd_tso_rpc", labels: []string{"instance"}},
{name: "pd_tso_wait", tbl: "pd_tso_wait", labels: []string{"instance"}},
Expand All @@ -399,19 +401,20 @@ func GetTotalTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef,
{name: "etcd_wal_fsync", tbl: "etcd_wal_fsync", labels: []string{"instance"}},
{name: "pd_peer_round_trip", tbl: "pd_peer_round_trip", labels: []string{"To"}},
// TiKV
{name: "tikv_grpc_messge", tbl: "tikv_grpc_messge", labels: []string{"type"}},
{name: "tikv_grpc_message", tbl: "tikv_grpc_message", labels: []string{"type"}},
{name: "tikv_cop_request", tbl: "tikv_cop_request", labels: []string{"req"}},
{name: "tikv_cop_handle", tbl: "tikv_cop_handle", labels: []string{"req"}},
{name: "tikv_cop_wait", tbl: "tikv_cop_wait", labels: []string{"req"}},
{name: "tikv_scheduler_command", tbl: "tikv_scheduler_command", labels: []string{"type"}},
{name: "tikv_scheduler_latch_wait", tbl: "tikv_scheduler_latch_wait", labels: []string{"type"}},
{name: "tikv_storage_async_request", tbl: "tikv_storage_async_request", labels: []string{"type"}},
{name: "tikv_raft_propose_wait", tbl: "tikv_propose_wait", labels: []string{"instance"}},
{name: "tikv_raft_process", tbl: "tikv_process", labels: []string{"type"}},
{name: "tikv_raft_append_log", tbl: "tikv_append_log", labels: []string{"instance"}},
{name: "tikv_raft_commit_log", tbl: "tikv_commit_log", labels: []string{"instance"}},
{name: "tikv_raft_apply_wait", tbl: "tikv_apply_wait", labels: []string{"instance"}},
{name: "tikv_raft_apply_log", tbl: "tikv_apply_log", labels: []string{"instance"}},
{name: "tikv_scheduler_processing_read", tbl: "tikv_scheduler_processing_read", labels: []string{"type"}},
{name: "tikv_raft_propose_wait", tbl: "tikv_raftstore_propose_wait", labels: []string{"instance"}},
{name: "tikv_raft_process", tbl: "tikv_raftstore_process", labels: []string{"type"}},
{name: "tikv_raft_append_log", tbl: "tikv_raftstore_append_log", labels: []string{"instance"}},
{name: "tikv_raft_commit_log", tbl: "tikv_raftstore_commit_log", labels: []string{"instance"}},
{name: "tikv_raft_apply_wait", tbl: "tikv_raftstore_apply_wait", labels: []string{"instance"}},
{name: "tikv_raft_apply_log", tbl: "tikv_raftstore_apply_log", labels: []string{"instance"}},
{name: "tikv_raft_store_events", tbl: "tikv_raft_store_events", labels: []string{"type"}},
{name: "tikv_handle_snapshot", tbl: "tikv_handle_snapshot", labels: []string{"type"}},
{name: "tikv_send_snapshot", tbl: "tikv_send_snapshot", labels: []string{"instance"}},
Expand Down Expand Up @@ -534,6 +537,7 @@ func GetTiDBTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef,
{name: "tidb_gc_push_task", tbl: "tidb_gc_push_task", labels: []string{"instance", "type"}},
{name: "tidb_batch_client_unavailable", tbl: "tidb_batch_client_unavailable", labels: []string{"instance"}},
{name: "tidb_batch_client_wait", tbl: "tidb_batch_client_wait", labels: []string{"instance"}},
{name: "tidb_batch_client_wait_conn", tbl: "tidb_batch_client_wait_conn", labels: []string{"instance"}},
{name: "pd_tso_rpc", tbl: "pd_tso_rpc", labels: []string{"instance"}},
{name: "pd_tso_wait", tbl: "pd_tso_wait", labels: []string{"instance"}},
}
Expand Down Expand Up @@ -1113,19 +1117,20 @@ func GetTiKVStoreInfo(startTime, endTime string, db *gorm.DB) (TableDef, error)

func GetTiKVTotalTimeConsumeTable(startTime, endTime string, db *gorm.DB) (TableDef, error) {
defs1 := []totalTimeByLabelsTableDef{
{name: "tikv_grpc_messge", tbl: "tikv_grpc_messge", labels: []string{"instance", "type"}},
{name: "tikv_grpc_message", tbl: "tikv_grpc_message", labels: []string{"instance", "type"}},
{name: "tikv_cop_request", tbl: "tikv_cop_request", labels: []string{"instance", "req"}},
{name: "tikv_cop_handle", tbl: "tikv_cop_handle", labels: []string{"instance", "req"}},
{name: "tikv_cop_wait", tbl: "tikv_cop_wait", labels: []string{"instance", "req"}},
{name: "tikv_scheduler_command", tbl: "tikv_scheduler_command", labels: []string{"instance", "type"}},
{name: "tikv_scheduler_latch_wait", tbl: "tikv_scheduler_latch_wait", labels: []string{"instance", "type"}},
{name: "tikv_storage_async_request", tbl: "tikv_storage_async_request", labels: []string{"instance", "type"}},
{name: "tikv_raft_propose_wait", tbl: "tikv_propose_wait", labels: []string{"instance"}},
{name: "tikv_raft_process", tbl: "tikv_process", labels: []string{"instance", "type"}},
{name: "tikv_raft_append_log", tbl: "tikv_append_log", labels: []string{"instance"}},
{name: "tikv_raft_commit_log", tbl: "tikv_commit_log", labels: []string{"instance"}},
{name: "tikv_raft_apply_wait", tbl: "tikv_apply_wait", labels: []string{"instance"}},
{name: "tikv_raft_apply_log", tbl: "tikv_apply_log", labels: []string{"instance"}},
{name: "tikv_scheduler_processing_read", tbl: "tikv_scheduler_processing_read", labels: []string{"type"}},
{name: "tikv_raft_propose_wait", tbl: "tikv_raftstore_propose_wait", labels: []string{"instance"}},
{name: "tikv_raft_process", tbl: "tikv_raftstore_process", labels: []string{"instance", "type"}},
{name: "tikv_raft_append_log", tbl: "tikv_raftstore_append_log", labels: []string{"instance"}},
{name: "tikv_raft_commit_log", tbl: "tikv_raftstore_commit_log", labels: []string{"instance"}},
{name: "tikv_raft_apply_wait", tbl: "tikv_raftstore_apply_wait", labels: []string{"instance"}},
{name: "tikv_raft_apply_log", tbl: "tikv_raftstore_apply_log", labels: []string{"instance"}},
{name: "tikv_raft_store_events", tbl: "tikv_raft_store_events", labels: []string{"instance", "type"}},
{name: "tikv_handle_snapshot", tbl: "tikv_handle_snapshot", labels: []string{"instance", "type"}},
{name: "tikv_send_snapshot", tbl: "tikv_send_snapshot", labels: []string{"instance"}},
Expand Down
2 changes: 1 addition & 1 deletion ui/diagnoseReportApp/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ diagnosis:
pd_region_heartbeat: The time cost of heartbeats in each TiKV instance. The label is [address].
etcd_wal_fsync: The time cost of etcd writing WAL into the persistent storage. The label is [instance].
pd_peer_round_trip: The latency of the network. The label is [To].
tikv_grpc_messge: The time cost of TiKV handle of gRPC message. The label is [type].
tikv_grpc_message: The time cost of handling TiKV gRPC messages. The label is [type].
tikv_cop_request: The time cost of Coprocessor handling read requests. The label is [req].
tikv_cop_handle: The time cost of handling Coprocessor requests. The label is [req].
tikv_cop_wait: The time cost of Coprocessor requests that wait for being handled. The label is [req].
Expand Down
2 changes: 1 addition & 1 deletion ui/diagnoseReportApp/translations/zh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ diagnosis:
pd_region_heartbeat: 每个 TiKV 实例中心跳的耗时,标签是"服务地址"。
etcd_wal_fsync: etcd 将 WAL 写入持久存储器的耗时,标签是"实例"。
pd_peer_round_trip: 网络的延迟,标签是"实例"。
tikv_grpc_messge: gRPC 报文的 TiKV 句柄的耗时,标签是"类型"。
tikv_grpc_message: gRPC 报文的 TiKV 处理耗时,标签是"类型"。
tikv_cop_request: Coprocessor 处理读请求的时间开销,标签是"请求"。
tikv_cop_handle: 处理 Coprocessor 请求的时间开销,标签是"请求"。
tikv_cop_wait: Coprocessor 请求等待处理的耗时,标签是"请求"。
Expand Down