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

Show DB "callers" in the DB panel #501

Merged
merged 6 commits into from
May 22, 2023

Conversation

rhertogh
Copy link
Contributor

@rhertogh rhertogh commented Apr 30, 2023

Q A
Is bugfix?
New feature? ✔️
Breaks BC?
Fixed issues #499

Existing DB panel is unchanged and located under the "Queries" tab:

image

A new tab "Callers" is added:

image

@what-the-diff
Copy link

what-the-diff bot commented Apr 30, 2023

PR Summary

  • New panel for showing DB query callers
    Added a new panel to display the callers of database queries, providing better insight into query usage.

  • Improved CSS selectors compatibility
    Changed some CSS selectors from IDs to classes for better compatibility with other panels and themes, such as Bootstrap.

  • Fixed issue with aliases in backtraces
    Resolved an issue where aliases were not being resolved in backtraces, preventing false positives when determining repeating query callers using path aliases in the codebase or project configuration files.

  • Introduction of queries.php file
    Added a new file, queries.php, to handle related code.

  • Enhanced detail view with tabs
    Updated the detail view to utilize tabs for better organization and display of query and caller data.

  • Code separation for querying and callers
    Moved all code related to querying into its own tab, leaving only callers in the main detail tab for better focus.

  • Removed unused variables
    Eliminated some unused variables from both views for cleaner code.

@rhertogh rhertogh changed the title First setup for #499: Show repeating DB calls from the same function Show repeating DB calls from the same function in DB panel Apr 30, 2023
@rhertogh rhertogh marked this pull request as ready for review April 30, 2023 23:06
@rhertogh
Copy link
Contributor Author

rhertogh commented May 1, 2023

@samdark @bizley Originally this issue was intended to show "repeating callers" (as discussed in #499) and is currently implemented as such (minimum of 5 calls).
Since it's now displayed on a separate tab do we want to show all callers on that tab (so including callers that, for example, only make 1 query call)?
The "repeating calls" would that simply be "Total calls". Looking at it now it would actually make more sense that way.

@samdark
Copy link
Member

samdark commented May 7, 2023

@rhertogh agree.

@samdark samdark added this to the 2.1.22 milestone May 7, 2023
@samdark samdark requested a review from a team May 7, 2023 12:57
@samdark samdark added the type:feature New feature label May 7, 2023
docs/guide/db-panel.md Outdated Show resolved Hide resolved
docs/guide/db-panel.md Outdated Show resolved Hide resolved
docs/guide/db-panel.md Outdated Show resolved Hide resolved
docs/guide/installation.md Outdated Show resolved Hide resolved
src/panels/DbPanel.php Outdated Show resolved Hide resolved
src/panels/DbPanel.php Outdated Show resolved Hide resolved
src/panels/DbPanel.php Show resolved Hide resolved
src/panels/DbPanel.php Show resolved Hide resolved
src/views/default/panels/db/detail.php Outdated Show resolved Hide resolved
@rhertogh rhertogh marked this pull request as draft May 18, 2023 15:51
…nes) and show warning on summary, index and "callers tab"
@rhertogh rhertogh marked this pull request as ready for review May 18, 2023 22:30
@rhertogh rhertogh requested a review from bizley May 18, 2023 22:30
@rhertogh rhertogh changed the title Show repeating DB calls from the same function in DB panel Show DB "callers" in the DB panel May 18, 2023
@rhertogh
Copy link
Contributor Author

@samdark @bizley The PR has been updated to list all "callers" (please see updated screenshot in opening post).

@samdark samdark merged commit 5e4d49a into yiisoft:master May 22, 2023
10 checks passed
@samdark
Copy link
Member

samdark commented May 22, 2023

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants