/** * @return driverStatistic */ public function getStats() { $stat = new driverStatistic(); $stat->setInfo('[Devtrue] A void info string')->setSize(0)->setData(implode(', ', array_keys($this->itemInstances)))->setRawData(true); return $stat; }
/** * @return driverStatistic */ public function getStats() { $stat = new driverStatistic(); $info = $this->instance->info(); /** * Data returned by Ssdb are very poorly formatted * using hardcoded offset of pair key-value :-( */ $stat->setInfo(sprintf("Ssdb-server v%s with a total of %s call(s).\n For more information see RawData.", $info[2], $info[6]))->setRawData($info)->setData(implode(', ', array_keys($this->itemInstances)))->setSize($this->instance->dbsize()); return $stat; }
/** * @return driverStatistic * @throws \phpFastCache\Exceptions\phpFastCacheIOException */ public function getStats() { $stat = new driverStatistic(); $path = $this->getFilePath(false); if (!is_dir($path)) { throw new phpFastCacheIOException("Can't read PATH:" . $path); } $stat->setData(implode(', ', array_keys($this->itemInstances)))->setRawData(['tmp' => $this->tmp])->setSize(Directory::dirSize($path))->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); return $stat; }
/** * @return driverStatistic */ public function getStats() { $size = 0; $stat = new driverStatistic(); $stat->setData($_COOKIE); /** * Only count PFC Cookie */ foreach ($_COOKIE as $key => $value) { if (strpos($key, self::PREFIX) === 0) { $size += strlen($value); } } $stat->setSize($size); return $stat; }