8000 [Cache] Count cache hits/misses in ProxyAdapter by nicolas-grekas · Pull Request #17734 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Cache] Count cache hits/misses in ProxyAdapter #17734

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

Merged
merged 1 commit into from
Mar 4, 2016

Conversation

nicolas-grekas
Copy link
Member
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #17537 partially
License MIT
Doc PR -

I propose to add this subset of the Doctrine\Common\Cache\Cache interface so that we can build data collectors on top and show these stats in the web profiler.
ping @javiereguiluz

* - misses: Number of items that have been requested and not found.
* - uptime: Time that the server is running.
* - memory_usage: Memory used by the server to store items.
* - memory_available: Memory allowed to use for storage.
Copy link
Member

Choose a reason for hiding this comment

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

The description for memory_available looks confusing to me. Is it the total memory allowed or the remaining memory available?

@nicolas-grekas
Copy link
Member Author

The comments in the interface are from the doctrine cache interface and I have exactly the same questions about them. When looking at the implementations there, it seems "uptime" is implemented as "start time", but is it true for all drivers? Some of them fetch stats info that are called "uptime" natively. Does this mean doctrine's stats return values change semantic from implem to implem?
@Ocramius & @Tobion, I'd really like to have your opinion on this and on the above @javiereguiluz's comments.

@fabpot
Copy link
Member
fabpot commented Mar 2, 2016

I would instead create a wrapper (possibly in the existing proxy) instead of changing all implementation.

Overall, I'm not even sure it's something we need now. So, I'm -0 on this one.

@nicolas-grekas
Copy link
Member Author

Updated
Status: needs review

@nicolas-grekas nicolas-grekas changed the title [Cache] Add StatsInterface [Cache] Count cache hits/misses in ProxyAdapter Mar 4, 2016
@fabpot
Copy link
Member
fabpot commented Mar 4, 2016

👍

@javiereguiluz
Copy link
Member

👍

This is definitely going to help us a lot to display this info in the new Cache profiler panel. Thanks @nicolas-grekas!

@fabpot
Copy link
Member
fabpot commented Mar 4, 2016

Thank you @nicolas-grekas.

@fabpot fabpot merged commit e6f21f9 into symfony:master Mar 4, 2016
fabpot added a commit that referenced this pull request Mar 4, 2016
…as-grekas)

This PR was merged into the 3.1-dev branch.

Discussion
----------

[Cache] Count cache hits/misses in ProxyAdapter

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17537 partially
| License       | MIT
| Doc PR        | -

I propose to add this subset of the `Doctrine\Common\Cache\Cache` interface so that we can build data collectors on top and show these stats in the web profiler.
ping @javiereguiluz

Commits
-------

e6f21f9 [Cache] Count cache hits/misses in ProxyAdapter
@nicolas-grekas nicolas-grekas deleted the cache-stats branch March 4, 2016 09:38
@fabpot fabpot mentioned this pull request May 13, 2016
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.

4 participants
0