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

slow_log: Improve descriptions #817

Merged
merged 1 commit into from
Nov 26, 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
36 changes: 18 additions & 18 deletions ui/lib/apps/SlowQuery/pages/Detail/DetailTabTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ export default function TabBasic({ data }: ITabTimeProps) {
key: 'optimize_time',
value: data.optimize_time! * 10e8,
},
{
key: 'wait_ts',
value: data.wait_ts! * 10e8,
},
{
key: 'cop_time',
value: data.cop_time! * 10e8,
Expand All @@ -58,36 +54,36 @@ export default function TabBasic({ data }: ITabTimeProps) {
value: data.process_time! * 10e8,
},
{
key: 'lock_keys_time',
value: data.lock_keys_time! * 10e8,
},
{
key: 'backoff_time',
value: data.backoff_time! * 10e8,
key: 'local_latch_wait_time',
value: data.local_latch_wait_time! * 10e8,
},
{
key: 'prewrite_time',
value: data.prewrite_time! * 10e8,
key: 'lock_keys_time',
value: data.lock_keys_time! * 10e8,
},
{
key: 'local_latch_wait_time',
value: data.local_latch_wait_time! * 10e8,
key: 'resolve_lock_time',
value: data.resolve_lock_time! * 10e8,
},
{
key: 'wait_prewrite_binlog_time',
value: data.wait_prewrite_binlog_time! * 10e8,
key: 'wait_ts',
value: data.wait_ts! * 10e8,
},
{
key: 'get_commit_ts_time',
value: data.get_commit_ts_time! * 10e8,
},
{
key: 'prewrite_time',
value: data.prewrite_time! * 10e8,
},
{
key: 'commit_time',
value: data.commit_time! * 10e8,
},
{
key: 'resolve_lock_time',
value: data.resolve_lock_time! * 10e8,
key: 'backoff_time',
value: data.backoff_time! * 10e8,
},
{
key: 'commit_backoff_time',
Expand All @@ -101,6 +97,10 @@ export default function TabBasic({ data }: ITabTimeProps) {
key: 'write_sql_response_total',
value: data.write_sql_response_total! * 10e8,
},
{
key: 'wait_prewrite_binlog_time',
value: data.wait_prewrite_binlog_time! * 10e8,
},
]
const columns = timeValueColumns('slow_query.fields.', items)
return (
Expand Down
14 changes: 7 additions & 7 deletions ui/lib/apps/SlowQuery/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ slow_query:
preproc_subqueries_time_tooltip: Time consumed when pre-processing the subquery during the rewrite plan phase
optimize_time:     Optimize Plan Time
wait_ts:   Get Start Ts Time
wait_ts_tooltip: Time consumed of retrieving the transaction start timestamp when transaction begins
wait_ts_tooltip: Time consumed when getting a start timestamp when transaction begins
cop_time:   Coprocessor Executor Time
cop_time_tooltip: 'The elapsed wall time when TiDB Coprocessor executor waiting all Coprocessor requests to finish (note: when there are JOIN in SQL statement, multiple TiDB Coprocessor executors may be running in parallel, which may cause this time not being a wall time)'
wait_time:     Coprocessor Wait Time
wait_time_tooltip: The total waiting time of Coprocessor request in TiKV
wait_time_tooltip: 'The total time of Coprocessor request is prepared and wait to execute in TiKV, which may happen when retrieving a snapshot though Raft concensus protocol (note: TiKV waits requests in parallel so that this is not a wall time)'
process_time:     Coprocessor Process Time
process_time_tooltip: 'The total time of Coprocessor request being executed in TiKV (note: TiKV executes requests in parallel so that this is not a wall time)'
backoff_time:   Backoff Retry Time
backoff_time_tooltip: 'The total waiting time before retry when a query encounters errors and requires a retry (note: there may be multiple backoff running in parallel so that this may not be a wall time)'
backoff_time:   Execution Backoff Time
backoff_time_tooltip: 'The total backoff waiting time before retry when a query encounters errors (note: there may be multiple backoffs in parallel so that this may not be a wall time)'
lock_keys_time:   Lock Keys Time
lock_keys_time_tooltip: Time consumed when locking keys in pessimistic transaction
get_commit_ts_time:   Get Commit Ts Time
Expand All @@ -68,11 +68,11 @@ slow_query:
commit_time:   Commit Time
commit_time_tooltip: Time consumed in 2PC commit phase when transaction commits
commit_backoff_time:   Commit Backoff Time
commit_backoff_time_tooltip: Total backoff waiting time when 2PC commit encounters errors when transaction commits
commit_backoff_time_tooltip: 'The total backoff waiting time when 2PC commit encounters errors (note: there may be multiple backoffs in parallel so that this may not be a wall time)'
write_sql_response_total:   Send response Time
write_sql_response_total_tooltip: Time consumed when sending response to the SQL client
exec_retry_time:   Retry execution Time
exec_retry_time_tooltip: Time consumed when retrying the SQL statement execution caused by locks or errors
exec_retry_time:   Retried execution Time
exec_retry_time_tooltip: Wall time consumed when SQL statement is retried and executed again, except for the last exection

request_count: Request Count
process_keys: Process Keys
Expand Down
22 changes: 11 additions & 11 deletions ui/lib/apps/SlowQuery/translations/zh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,31 @@ slow_query:
cop_time:   Coprocessor 执行耗时
cop_time_tooltip: TiDB Coprocessor 算子等待所有任务在 TiKV 上并行执行完毕耗费的自然时间(注:当 SQL 语句中包含 JOIN 时,多个 TiDB Coprocessor 算子可能会并行执行,此时不再等同于自然时间)
wait_time:     Coprocessor 累计等待耗时
wait_time_tooltip: TiKV 准备并等待 Coprocessor 任务执行的累计时间
wait_time_tooltip: TiKV 准备并等待 Coprocessor 任务执行的累计时间,等待过程中包括通过 Raft 一致性协议取快照等(注:TiKV 会并行等待任务,因此该时间不是自然流逝时间)
process_time:     Coprocessor 累计执行耗时
process_time_tooltip: TiKV 执行 Coprocessor 任务的累计处理时间(注:TiKV 会并行处理请求,该时间不是自然流逝时间
process_time_tooltip: TiKV 执行 Coprocessor 任务的累计处理时间(注:TiKV 会并行处理任务,因此该时间不是自然流逝时间
lock_keys_time:   上锁耗时
lock_keys_time_tooltip: 悲观事务中对相关行数据进行上锁的耗时
backoff_time:   累计重试等待耗时
backoff_time_tooltip: 执行过程中遇到锁或者错误后的累计等待耗时(注:可能同时存在多个重试等待,因此该时间可能不是自然流逝时间)
backoff_time:   执行阶段累计 Backoff 耗时
backoff_time_tooltip: 在执行失败时,Backoff 机制等待一段时间再重试时的 Backoff 累计耗时(注:可能同时存在多个 Backoff,因此该时间可能不是自然流逝时间)
get_commit_ts_time:   取事务 Commit Ts 耗时
get_commit_ts_time_tooltip: 从 PD 取提交时间戳(事务号)步骤的耗时
local_latch_wait_time:   Local Latch Wait 耗时
local_latch_wait_time:   TiDB 本地等锁耗时
local_latch_wait_time_tooltip: 事务在 TiDB 本地与其他事务产生了锁冲突并等待的耗时
resolve_lock_time:   Resolve Lock 耗时
resolve_lock_time:   解锁耗时
resolve_lock_time_tooltip: 事务在提交过程中与其他事务产生了锁冲突并处理锁冲突的耗时
prewrite_time:   Prewrite 阶段耗时
prewrite_time_tooltip: 事务两阶段提交中第一阶段(prewrite 阶段)的耗时
wait_prewrite_binlog_time:   Binlog Prewrite 等待耗时
wait_prewrite_binlog_time_tooltip: 等待 Binlog Prewrite 完成的耗时
commit_time:   Commit 阶段耗时
commit_time_tooltip: 事务两阶段提交中第二阶段(commit 阶段)的耗时
commit_backoff_time:   Commit 重试等待耗时
commit_backoff_time_tooltip: 事务两阶段提交过程中遇到锁或者错误后的等待耗时
commit_backoff_time:   Commit 阶段累计 Backoff 耗时
commit_backoff_time_tooltip: 事务递交失败时,Backoff 机制等待一段时间再重试时的 Backoff 累计耗时(注:可能同时存在多个 Backoff,因此该时间可能不是自然流逝时间)
write_sql_response_total:   发送结果耗时
write_sql_response_total_tooltip: 发送 SQL 结果给客户端的耗时
exec_retry_time:   执行重试耗时
exec_retry_time_tooltip: 由于锁冲突或者某些错误导致执行失败的执行耗时
write_sql_response_total_tooltip: 发送 SQL 语句执行结果给客户端的耗时
exec_retry_time:   前序执行耗时
exec_retry_time_tooltip: 由于锁冲突或错误,计划可能会执行失败并重试执行多次,该时间是不包含最后一次执行的前序执行自然时间(注:执行计划中的时间不含该前序时间)

request_count: Coprocessor 请求数
process_keys: 可见版本数
Expand Down
7 changes: 6 additions & 1 deletion ui/lib/utils/tableColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,17 @@ function fieldsDescriptionColumn(transKeyPrefix: string): IColumn {
minWidth: 150,
maxWidth: 300,
onRender: (rec) => {
return (
const content = (
<TransText
transKey={`${transKeyPrefix}${rec.key}_tooltip`}
noFallback
/>
)
return (
<Tooltip title={content}>
<span>{content}</span>
</Tooltip>
)
},
}
}
Expand Down