You are here

function _memcache_admin_stats_counters in Memcache API and Integration 7

Same name and namespace in other branches
  1. 6 memcache_admin/memcache_admin.module \_memcache_admin_stats_counters()

Statistics report: calculate # of increments and decrements.

1 call to _memcache_admin_stats_counters()
memcache_admin_stats in memcache_admin/memcache_admin.module
Callback for the Memcache Stats page.

File

memcache_admin/memcache_admin.module, line 183
For the collection and display of memcache stats.

Code

function _memcache_admin_stats_counters($stats) {
  if (!is_array($stats)) {
    $stats = array();
  }
  $stats += array(
    'incr_hits' => 0,
    'incr_misses' => 0,
    'decr_hits' => 0,
    'decr_misses' => 0,
  );
  return t('!incr increments, !decr decrements', array(
    '!incr' => number_format($stats['incr_hits'] + $stats['incr_misses']),
    '!decr' => number_format($stats['decr_hits'] + $stats['decr_misses']),
  ));
}