-
Notifications
You must be signed in to change notification settings - Fork 16
Made the profiler page better #20
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,7 +128,7 @@ private function calculateStatistics() | |
| $statistics[$name]['time'] += $call->time; | ||
| if ($call->name === 'getItem') { | ||
| $statistics[$name]['reads'] += 1; | ||
| if ($call->result !== false) { | ||
| if ($call->isHit) { | ||
|
Member
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. should be a method?
Member
Author
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. No, It is a property that only exists if call->name == 'getItem* |
||
| $statistics[$name]['hits'] += 1; | ||
| } else { | ||
| $statistics[$name]['misses'] += 1; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,15 @@ | |
|
|
||
| {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} | ||
|
|
||
| {% block head %} | ||
| {{ parent() }} | ||
| <style> | ||
| .color-red { | ||
| color:red; | ||
| } | ||
| </style> | ||
| {% endblock head %} | ||
|
|
||
| {% block toolbar %} | ||
| {% set icon %} | ||
| <img width="20" height="28" alt="Cache" | ||
|
|
@@ -91,8 +100,12 @@ | |
| <li class="{{ i is odd ? 'odd' : 'even' }}"> | ||
| <div> | ||
| <strong>Name</strong>: {{ call.name }}<br /> | ||
| <strong>Arguments</strong>: {{ call.arguments|json_encode() }}<br /> | ||
| <strong>Results</strong>: {{ call.result|json_encode() }}<br /> | ||
| <strong>Arguments</strong>: {{ call.arguments|json_encode|truncate(140) }}<br /> | ||
| <strong>Results</strong>: {% if call.result == false %} | ||
| <span class="color-red">Miss</span> | ||
| {% else %} | ||
| {{ call.result|truncate(140) }} | ||
|
Member
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. may make sense to have a button to click to show the rest at some point too
Member
Author
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. Yes. Agree. But I left that for a future improvement. |
||
| {% endif %}<br /> | ||
| </div> | ||
| <small> | ||
| <strong>Time</strong>: {{ '%0.2f'|format(call.time * 1000) }} ms | ||
|
|
||
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.
maybe we could try running through jms_serializer, if the user has it installed
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.
You are talking about if $type=='object'? Yeah, why not.
On line 178 we do only have 'resource' and some other thing we dont want to display.
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.
yeah