-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Redesigned the Symfony Profiler #15523
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
b267347
Redesigned most of the Symfony Profiler panels
javiereguiluz 4e66c45
Added some missing SVG icons
javiereguiluz b7f604c
Highlight the line of code which caused the exception
javiereguiluz 3cdf546
CSS tweaks to fix some reported issues
javiereguiluz 0a58431
A new round of tweaks and fixes
javiereguiluz 9dc561c
Redesigned the "debug/dump" panel and other minor tweaks
javiereguiluz 10f1fbb
Replaced the CSS-based tabs by proper JavaScript-based tabs
javiereguiluz a5f367c
First version of the redesigned Form panel
javiereguiluz 6ca6b2f
Added the new icons, made the sidebar narrower, added badges in the
javiereguiluz 22841fc
More design tweaks
javiereguiluz 7cbced0
Refactored the "summary" section and redesigned all the profiler erro…
javiereguiluz 50a60d5
Refactored the JavaScript code that creates the tabs
javiereguiluz 656739e
Added a "toggle" utility
javiereguiluz b3aa953
Refactored the JavaScript code, used toggles in the Dump panel and
javiereguiluz 376f1be
Finished the redesign of the Symfony Profiler
javiereguiluz 3f6f747
Tweaks as per Stof's review and comments
javiereguiluz ab133e1
Minor tweaks for the Form panel
javiereguiluz 904c618
Allow a toggle to define if its related content is displayed by default
javiereguiluz 8a2a7cd
Replaced a randomly-generated ID by the real log index
javiereguiluz 4e81feb
Lots of minor tweaks
javiereguiluz 688e3f7
Minor JavaScript changes
javiereguiluz e47339b
Fixed the title of all panels and fixed some JavaScript issues
javiereguiluz 3ac9100
Refactored some JavaScript code
javiereguiluz edb5e5e
Improved the vertical spacing of tabbed navigation
javiereguiluz 4139c6b
Minor JavaScript change
javiereguiluz 14b7cf5
More CSS tweaks to polish profiler panels
javiereguiluz a1d2e24
Redesigned the search results page
javiereguiluz 489fbd6
Improved the timeline graphics and allowed panels to define their pag…
javiereguiluz 437a67b
Simplified the management of the profiler panel titles
javiereguiluz 72a64e3
Added some metrics about sub-requests in the performance panel
javiereguiluz f79894f
Fixed some CSS issues in Firefox
javiereguiluz 2b55b9b
Allow to disable tabs, tweaked tables layout and other minor tweaks
javiereguiluz 79f7297
Display the listener priority in the events panel
javiereguiluz 50d5f59
Add a check to avoid errors for special pages (exceptions for example)
javiereguiluz 14e725f
Fixed some test for the TraceableEventDispatcher changes
javiereguiluz b254b69
Sort uncalled events by priority
javiereguiluz 67ef234
Grouped listeners by event in the events panel
javiereguiluz f971509
Fixed an HTML markup issue for the new events panel
javiereguiluz ac6f79a
Adjusted the logger panel after the grouping of related deprecations
javiereguiluz ac63334
Tweaked the logger panel stack trace contents
javiereguiluz a808fa5
Tweaked the toolbar for Silex 2
javiereguiluz 73809a8
Removed the app.request... call to make it compatible with Silex
javiereguiluz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Lots of minor tweaks
- Loading branch information
commit 4e81feb6ffb423676ca946ea95c520d610513cfa
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,34 +48,34 @@ | |
{% endblock %} | ||
|
||
{% block panel %} | ||
{% if collector.events is empty %} | ||
<div class="empty"> | ||
<p>No timing events have been recorded. Are you sure that debugging is enabled in the kernel?</p> | ||
<h2>Performance metrics</h2> | ||
|
||
<div class="metrics"> | ||
<div class="metric"> | ||
<span class="value">{{ '%.0f'|format(collector.duration) }} <span class="unit">ms</span></span> | ||
<span class="label">Total execution time</span> | ||
</div> | ||
{% else %} | ||
<h2>Performance metrics</h2> | ||
|
||
<div class="metrics"> | ||
<div class="metric"> | ||
<span class="value">{{ '%.0f'|format(collector.duration) }} <span class="unit">ms</span></span> | ||
<span class="label">Total execution time</span> | ||
</div> | ||
<div class="metric"> | ||
<span class="value">{{ '%.0f'|format(collector.inittime) }} <span class="unit">ms</span></span> | ||
<span class="label">Symfony initialization</span> | ||
</div> | ||
|
||
{% if profile.collectors.memory %} | ||
<div class="metric"> | ||
<span class="value">{{ '%.0f'|format(collector.inittime) }} <span class="unit">ms</span></span> | ||
<span class="label">Symfony initialization</span> | ||
<span class="value">{{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} <span class="unit">MB</span></span> | ||
<span class="label">Peak memory usage</span> | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
{% if profile.collectors.memory %} | ||
<div class="metric"> | ||
<span class="value">{{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} <span class="unit">MB</span></span> | ||
<span class="label">Peak memory usage</span> | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
<h2>Execution timeline</h2> | ||
<h2>Execution timeline</h2> | ||
|
||
{% if collector.events is empty %} | ||
<div class="empty"> | ||
<p>No timing events have been recorded. Are you sure that debugging is enabled in the kernel?</p> | ||
</div> | ||
{% else %} | ||
{{ block('panelContent') }} | ||
{% endif %} | ||
{% endblock %} | ||
|
@@ -84,8 +84,8 @@ | |
<form id="timeline-control" action="" method="get"> | ||
<input type="hidden" name="panel" value="time"> | ||
<label for="threshold">Threshold</label> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<input type="number" size="3" name="threshold" value="3" min="0"> ms | ||
<span class="help">(timeline only displays events slower than this threshold)</span> | ||
<input type="number" size="3" name="threshold" id="threshold" value="3" min="0"> ms | ||
<span class="help">(timeline only displays events with a duration longer than this threshold)</span> | ||
</form> | ||
|
||
{% if profile.parent %} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep using the
{% from %}
tag to import the needed macro, as done previouslyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made all the changes suggested in your other comments, but I'm struggling with this one.
First I don't really know why
{% from ... %}
is recommended instead of{% import ...
. Second, I though that perfixing all utility macros with thehelper.
prefix would be better for code legibility. But of course this could be a bad idea :) I just need some more comments about this. Thanks.