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

feat: init optimizer trace #1187

Merged
merged 20 commits into from
Mar 10, 2022
Merged

Conversation

shhdgit
Copy link
Member

@shhdgit shhdgit commented Feb 16, 2022

  • visit optimizer trace tool page via the specified url: /optimizer_trace

image

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 16, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • baurine

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

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

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2022

Codecov Report

Merging #1187 (142b6bd) into master (8abc480) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1187      +/-   ##
==========================================
- Coverage   29.43%   29.43%   -0.01%     
==========================================
  Files         286      287       +1     
  Lines       16944    16945       +1     
  Branches      648      648              
==========================================
  Hits         4988     4988              
- Misses      11725    11726       +1     
  Partials      231      231              
Flag Coverage Δ
be_integration_test_latest 9.29% <ø> (-0.05%) ⬇️
be_integration_test_v4.0.1 9.27% <ø> (-0.05%) ⬇️
be_unit_test 24.07% <ø> (ø)
e2e_test 65.18% <0.00%> (-0.03%) ⬇️

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


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8abc480...142b6bd. Read the comment docs.

@shhdgit shhdgit marked this pull request as ready for review February 25, 2022 08:21
@shhdgit shhdgit changed the title [WIP]feat: init optimizer trace feat: init optimizer trace Feb 25, 2022
@@ -0,0 +1,86 @@
import React, { useEffect, useRef, useMemo } from 'react'
import Viz from 'viz.js'
Copy link
Member

@breezewish breezewish Mar 1, 2022

Choose a reason for hiding this comment

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

  1. viz.js is not maintained. I doubt whether it will cause problems for us.

  2. How large will the frontend compiled code become when we are now carrying viz.js in? Will it be too slow to load in cloud environments?

  3. As something running in the browser, how is the performance when it meets large JSON to be visualized? Will it cause the browser to freeze?

Copy link
Member Author

@shhdgit shhdgit Mar 3, 2022

Choose a reason for hiding this comment

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

  1. Yes! viz.js is probably not a good choice. I've replaced it with d3-graphviz.

  2. Optimizer trace has been split into a separate module. So it shouldn't affect first screen load.

  3. d3-graphviz use wasm to compute the graphviz layout in the web-worker so that it may not freeze the browser.

Copy link
Member

@breezewish breezewish Mar 4, 2022

Choose a reason for hiding this comment

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

Cool, d3-graphviz looks promising! It is interesting that WASM load is fine even in esbuild..

@shhdgit shhdgit requested a review from breezewish March 3, 2022 16:05
@shhdgit
Copy link
Member Author

shhdgit commented Mar 4, 2022

/cc @breeswish @baurine @YiniXu9506
PTAL, thanks~

@ti-chi-bot ti-chi-bot requested a review from baurine March 4, 2022 03:17
@shhdgit shhdgit requested a review from YiniXu9506 March 4, 2022 03:18
Copy link
Contributor

@YiniXu9506 YiniXu9506 left a comment

Choose a reason for hiding this comment

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

Feedback about user experience has been delivered. The code LGTM.

@ti-chi-bot
Copy link
Member

@YiniXu9506: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments.

In response to this:

Some user experiences feedback have been delivered. The code LGTM.

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 ti-community-infra/tichi repository.

@shhdgit
Copy link
Member Author

shhdgit commented Mar 10, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 142b6bd

@shhdgit shhdgit merged commit f8c59bc into pingcap:master Mar 10, 2022
shhdgit added a commit to shhdgit/tidb-dashboard that referenced this pull request Mar 16, 2022
* feat: init optimizer trace

* update: logical optimizer

* tweak: optimizer trace layout

* fix: index

* update: icon

* update: deps

* tweak: some styles

* udpate: step interface

* tweak: logical optimization step

* tweak: final

* tweak: unselected candidates style

* update: unselected candates style

* deps: use d3-graphviz

* chore: remove webpack chunk name comment

* tweak: error boundary

* chore: clear some deps

* tweak: action info tooltip
shhdgit added a commit to shhdgit/tidb-dashboard that referenced this pull request Mar 16, 2022
* feat: init optimizer trace

* update: logical optimizer

* tweak: optimizer trace layout

* fix: index

* update: icon

* update: deps

* tweak: some styles

* udpate: step interface

* tweak: logical optimization step

* tweak: final

* tweak: unselected candidates style

* update: unselected candates style

* deps: use d3-graphviz

* chore: remove webpack chunk name comment

* tweak: error boundary

* chore: clear some deps

* tweak: action info tooltip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants