Skip to content

[WebProfilerBundle] Improve cache panel #22129

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
wants to merge 6 commits into from
Closed

[WebProfilerBundle] Improve cache panel #22129

wants to merge 6 commits into from

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Mar 23, 2017

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

An attempt to improve the page a bit. Personally i think all elements on a single page is too much info.

Before

image

image

After

image

image

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

👍 trying to improve this page was on my TODO list for 3.3 too. @ro0NL thanks for taking care of this.

I agree that this page has too much information. Looking at your screenshot, I'd like to suggest these additional changes:

  1. Use the <span class="unit">ms</span> code to display the "ms" value, as we do in other profiler panels such as "Performance" (and maybe apply it to the "%" too in "hit/misses" ??)

  2. Rearrange the row of information as follows:

  • Total calls
  • Total time
  • <div class="metric-divider"></div>
  • Total reads
  • Total writes
  • Total deletes
  • <div class="metric-divider"></div>
  • Total Hits
  • Total Misses
  • Hits/reads

@ro0NL
Copy link
Contributor Author

ro0NL commented Mar 23, 2017

Improved the metric handling, moving things to the view layer. Totally worth it :) (screenshot updated).

@ro0NL ro0NL changed the title [WebProfilerBundle] Switch to tabs for cache panel [WebProfilerBundle] Improve cache panel Mar 23, 2017
<tr>
<th>Results</th>
<td>
{% if call.result != false %}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Nyholm not sure about a) this check and b) loose comparison. As you can see in the screenshots null was hidden as wel. Does false need to be excluded, strictly?

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for this PR.
I'm not sure about your questions. Call.result could be false if there was an error (if I remember correctly). I think that is the reason for this check.

Why it not is a strict comparison... that is probably a typo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll check it out tonight. I'd prefer something like displaying n/a in that case, opposed to just an empty cell.

Copy link
Contributor Author

@ro0NL ro0NL Mar 24, 2017

Choose a reason for hiding this comment

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

@Nyholm figured it out; this is (AFAIK) the direct result value from the method call passed by the traceableadapter.

Now given https://github.com/php-fig/cache/blob/master/src/CacheItemInterface.php#L42 i dont think we should maky any assumptions here.

Besides, this hides false as a result from a hasItem call ;-)

Copy link
Member

@stof stof left a comment

Choose a reason for hiding this comment

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

👍

@nicolas-grekas nicolas-grekas added this to the 3.3 milestone Mar 24, 2017
@ro0NL
Copy link
Contributor Author

ro0NL commented Mar 24, 2017

Did some overall improvements to the table structure.. i kinda like it. The whole thing looks really calm now and we save a lot on spacing overall.

Screenshots updated.

Should be reviewed with ?w=1

@fabpot
Copy link
Member

fabpot commented Mar 24, 2017

Thank you @ro0NL.

@fabpot fabpot closed this Mar 24, 2017
fabpot added a commit that referenced this pull request Mar 24, 2017
This PR was squashed before being merged into the 3.3-dev branch (closes #22129).

Discussion
----------

[WebProfilerBundle] Improve cache panel

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

An attempt to improve the page a bit. Personally i think all elements on a single page is too much info.

Before

![image](https://cloud.githubusercontent.com/assets/1047696/24272477/d4d96a44-101d-11e7-9cc5-1646fc2c0603.png)

![image](https://cloud.githubusercontent.com/assets/1047696/24272500/e51318a6-101d-11e7-8875-c270016f11a2.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/24311179/530dcc6a-10d3-11e7-9c39-7c73ee2775f1.png)

![image](https://cloud.githubusercontent.com/assets/1047696/24311215/82c48566-10d3-11e7-82ff-6d79c3040a25.png)

Commits
-------

3592d0d [WebProfilerBundle] Improve cache panel
@ro0NL ro0NL deleted the wdt/tabbed-cache branch March 25, 2017 07:38
@fabpot fabpot mentioned this pull request May 1, 2017
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.

7 participants