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

cop: display kv read time details in the execution information #52146

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

cfzjywxk
Copy link
Contributor

@cfzjywxk cfzjywxk commented Mar 27, 2024

What problem does this PR solve?

Issue Number: ref #28937

Problem Summary:

explain analyze select * from t1;
+-----------------------+---------+---------+-----------+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+-----------+------+
| id                    | estRows | actRows | task      | access object | execution info                                                                                                                                                                                                                                                                                                                                               | operator info                               | memory    | disk |
+-----------------------+---------+---------+-----------+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+-----------+------+
| TableReader_5         | 6.00    | 6       | root      |               | time:104.4ms, loops:2, RU:0.714463, cop_task: {num: 1, max: 104.2ms, proc_keys: 6, tot_proc: 704.9µs, tot_wait: 513.1µs, rpc_num: 1, rpc_time: 104.1ms, copr_cache_hit_ratio: 0.00, build_task_duration: 553.6µs, max_distsql_concurrency: 1}                                                                                                                | data:TableFullScan_4                        | 542 Bytes | N/A  |
| └─TableFullScan_4     | 6.00    | 6       | cop[tikv] | table:t1      | tikv_task:{time:104ms, loops:1}, scan_detail: {total_process_keys: 6, total_process_keys_size: 295, total_keys: 7, get_snapshot_time: 206.9µs, rocksdb: {key_skipped_count: 6, block: {cache_hit_count: 2}}}, total_process_time: 704.9µs, total_suspend_time: 100.9ms, total_wait_time: 513.1µs, total_kv_read_wall_time: 104ms, tikv_wall_time: 103.1ms    | keep order:false, stats:partial[k1:missing] | N/A       | N/A  |
+-----------------------+---------+---------+-----------+---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------+-----------+------+

The `total_kv_read_wall_time` could be displayed in the execution information.

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

Documentation

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@cfzjywxk cfzjywxk added the type/enhancement The issue or PR belongs to an enhancement. label Mar 27, 2024
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 27, 2024
Copy link

tiprow bot commented Mar 27, 2024

Hi @cfzjywxk. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@cfzjywxk
Copy link
Contributor Author

Em... The cache is not updated. sigh...

@zyguan
Copy link
Contributor

zyguan commented Mar 28, 2024

/retest

Copy link

tiprow bot commented Mar 28, 2024

@zyguan: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 28, 2024
@zyguan
Copy link
Contributor

zyguan commented Mar 28, 2024

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Mar 28, 2024
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Merging #52146 (c6cf92f) into master (923b071) will increase coverage by 2.0460%.
Report is 2 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #52146        +/-   ##
================================================
+ Coverage   72.1432%   74.1892%   +2.0460%     
================================================
  Files          1467       1467                
  Lines        426679     426733        +54     
================================================
+ Hits         307820     316590      +8770     
+ Misses        99681      90299      -9382     
- Partials      19178      19844       +666     
Flag Coverage Δ
integration 48.2269% <100.0000%> (?)
unit 70.9565% <100.0000%> (-0.0723%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 49.3520% <ø> (+8.7442%) ⬆️

@cfzjywxk
Copy link
Contributor Author

/test check-dev2

Copy link

tiprow bot commented Mar 28, 2024

@cfzjywxk: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

@ekexium ekexium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a unit test for it?

@cfzjywxk
Copy link
Contributor Author

Can we have a unit test for it?

@ekexium The test is added, PTAL

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 28, 2024
Copy link

ti-chi-bot bot commented Mar 28, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-28 01:55:36.304690467 +0000 UTC m=+2119363.326936855: ☑️ agreed by zyguan.
  • 2024-03-28 08:34:19.822743362 +0000 UTC m=+2143286.844989750: ☑️ agreed by ekexium.

Copy link
Contributor

@windtalker windtalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

ti-chi-bot bot commented Mar 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekexium, windtalker, zyguan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Mar 29, 2024
@cfzjywxk
Copy link
Contributor Author

/retest

@cfzjywxk
Copy link
Contributor Author

/retest

@cfzjywxk
Copy link
Contributor Author

/test check-dev2

Copy link

tiprow bot commented Mar 29, 2024

@cfzjywxk: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@cfzjywxk
Copy link
Contributor Author

/test check-dev2

Copy link

tiprow bot commented Mar 29, 2024

@cfzjywxk: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@cfzjywxk
Copy link
Contributor Author

/retest

@cfzjywxk
Copy link
Contributor Author

/test check-dev2

Copy link

tiprow bot commented Mar 29, 2024

@cfzjywxk: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

/test check-dev2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 3, 2024
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. do-not-merge/needs-tests-checked labels Apr 3, 2024
@ti-chi-bot ti-chi-bot bot merged commit 3648b9d into pingcap:master Apr 3, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants