You are here

public function MemcacheStatsObject::getCounters in Memcache API and Integration 8.2

@inheritDoc

Overrides MemcacheStatsInterface::getCounters

1 method overrides MemcacheStatsObject::getCounters()
McrouterStatsObject::getCounters in memcache_admin/src/Stats/McrouterStatsObject.php
@inheritDoc

File

memcache_admin/src/Stats/MemcacheStatsObject.php, line 158

Class

MemcacheStatsObject
Class MemcacheStats.

Namespace

Drupal\memcache_admin\Stats

Code

public function getCounters() : string {
  $incr_hits = isset($this->stats['incr_hits']) ?? 0;
  $incr_misses = isset($this->stats['incr_misses']) ?? 0;
  $decr_hits = isset($this->stats['decr_hits']) ?? 0;
  $decr_misses = isset($this->stats['decr_misses']) ?? 0;
  return $this
    ->t('@incr increments, @decr decrements', [
    '@incr' => number_format($incr_hits + $incr_misses),
    '@decr' => number_format($decr_hits + $decr_misses),
  ]);
}