Leaseweb / LswMemcacheBundle

Symfony bundle for Memcache Doctrine caching and session storage in the Web Debug Toolbar.
MIT License
202 stars 57 forks source link

Error displaying server statistics #75

Closed falvarez closed 8 years ago

falvarez commented 8 years ago

When calling memcache:statistics, I get something like:

Please give the pool (default)
Servers found: 48

  pid
  uptime
  time
  version
  libevent
  pointer_size
  rusage_user
...

It seems that $memcache->getStats() returns statistics for the whole pool instead of an array of server => statistics.

I have tried myself to fix the issue:

https://github.com/falvarez/LswMemcacheBundle/commit/bfce68ee3fa2f33233b06d4d6f6273301faafbd7

But I'm not really sure if it is the right way to do it.

Thanks in advance. Kind regards

mevdschee commented 8 years ago

Thank you. I will need to try to see whether or not this works. Did you run it on a pool with multiple servers? Does it show hits and misses per server?

falvarez commented 8 years ago

Hello.

I thought that $memcache->getStats() returned statistics for the whole pool, but it only return stats for the first server of the pool.

It seems that the right method should be $memcache->getExtendedStats(). It returns data in the expected format (array of server => stats).

I will shortly submit a PR.

Many thanks and kind regards.

mevdschee commented 8 years ago

merged #76