Retrieve Stats instance.

@return Stats
17055
public static function getInstance(): Stats
    {
        if (self::$instance instanceof Stats) {
            return self::$instance;
        }
        self::$instance = new Stats();
        self::$instance->exporter = new NoopExporter();

        return self::$instance;
    }
11891
public function getStats()
    {
        $service = $this->getService();

        // stats for a site
        $response = $service->request('stats', 'GET', NULL, $this->getParams());

        $responseArray = $this->getResponseArray($response);

        if (!$this->isError()) {
            $this->_data = $responseArray;
        } else {
            $this->_data = array();
        }

        return $this;
    }
1173036
public function getMetrics()
    {
        if ($this->metrics === null) {
            $this->metrics = new Metrics($this->coverage);
        }

        return $this->metrics;
    }
166861
public function stream_stat()
    {
        $statistics = $this->fileStatisticsTemplate();

        if ($this->_download !== null) {
            $statistics[7] = $statistics['size'] = $this->_download->getSize();
        }
        if ($this->_upload !== null) {
            $statistics[7] = $statistics['size'] = $this->_pointerOffset;
        }

        return $statistics;
    }
777383
public function getStat()
    {
        $sources = [];
        $names = [];
        foreach ($this->lines as $line) {
            $line->loadStat($sources, $names);
        }
        return [
            'sources' => $sources,
            'names' => $names,
        ];
    }
363019
public function getStats()
    {
        $directory = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($this->path),
            \RecursiveIteratorIterator::SELF_FIRST
        );

        $cacheIterator = new \RegexIterator($directory, '/^.+\.cache/i', \RecursiveRegexIterator::GET_MATCH);

        $stats[ 'path' ] = $this->path;
        $stats[ 'files' ] = 0;
        $stats[ 'size' ] = 0;

        foreach ($cacheIterator as $cacheFiles) {
            foreach ($cacheFiles as $cacheFile) {
                $stats[ 'files' ]++;
                $stats[ 'size' ] += filesize($cacheFile);
            }
        }

        return $stats;
    }
843664
public function getResults()
    {
        if(!$this->statManager->checkStatus()){
            $this->runValidation($this->options);
        }
        return $this->statManager->getStatus();
    }
1304375
protected function getStats () : array
    {
        if (!$this->_StatsDone) :
            foreach ($this->_Stats['tally'] as &$Roundvalue) :
                foreach ($Roundvalue as $ArcKey => &$Arcvalue) :
                    foreach ($Arcvalue as $key => &$value) :
                        if ($key === 'from' || $key === 'to') :
                            $value = $this->_selfElection->getCandidateId($value, true);
                        endif;
                    endforeach;
                endforeach;
            endforeach;

            foreach ($this->_Stats['arcs'] as $ArcKey => &$Arcvalue) :
                foreach ($Arcvalue as $key => &$value) :
                    if ($key === 'from' || $key === 'to') :
                        $value = $this->_selfElection->getCandidateId($value, true);
                    endif;
                endforeach;
            endforeach;

            $this->_StatsDone = true;
        endif;

        return $this->_Stats;
    }
1107085
public function getResult () : Result
    {
        // Cache
        if ( $this->_Result !== null ) :
            return $this->_Result;
        endif;

            //////

        // Sort pairwise
        $this->_PairwiseSort = $this->pairwiseSort();

        // Ranking calculation
        $this->makeArcs();

        // Make Stats
        $this->_Stats['tally'] = $this->_PairwiseSort;
        $this->_Stats['arcs'] = $this->_Arcs;

        // Make Result      
        return $this->_Result = $this->createResult($this->makeResult());
    }
676864
public function metrics()
    {
        $this->_start = microtime(true);
        $result = $this->_collector->metrics();
        $this->_time  = microtime(true) - $this->_start;
        return $result;
    }
626880
public static function getInstance()
    {
        if (null === self::$instance) {
            self::$instance = new static();

            $loader = new YamlFileLoader(self::$instance, new FileLocator(__DIR__.'/../Resources/config'));
            $loader->load('config.yml');
            $loader->load('services.yml');

            self::$instance->setParameter('phantomjs.cache_dir', sys_get_temp_dir());
            self::$instance->setParameter('phantomjs.resource_dir', __DIR__.'/../Resources');
        }

        return self::$instance;
    }
934649
public function get()
    {
        return $this->findAndLoadClasses()
            ->map(function ($class) {
                return new ReflectionClass($class);
            })
            ->reject(function ($class) {
                return $this->rejectionStrategy->shouldClassBeRejected($class);
            })
            ->reject(function ($class) {
                foreach (config('stats.ignored_namespaces', []) as $namespace) {
                    if (Str::startsWith($class->getNamespaceName(), $namespace)) {
                        return true;
                    }
                }

                return false;
            })
            ->groupBy(function ($class) {
                return (new Classifier)->classify($class);
            });
    }
218824
public function getSendStatistics()
    {
        $this->_action = 'GetSendStatistics';
        $this->_method = 'GET';
        $this->_refreshDate();

        $this->_generateSignature();
        $res = $this->_request();
        if ($res['code'] == 200) {
            $result = $res['body']->GetSendStatisticsResult->SendDataPoints->member;
            return array(
                'Complaints' => (string) $result->Complaints,
                'Rejects' => (string) $result->Rejects,
                'Bounces' => (string) $result->Bounces,
                'DeliveryAttempts' => (string) $result->DeliveryAttempts,
                'Timestamp' => (string) $result->Timestamp
            );
        } else {
            return new SimpleEmailServiceError((string) $res['body']->Error->Code);
        }
    }
586133
protected function getCollectionStats()
    {
        $database = $this->collection->getDatabase();
        $name = $this->collection->getName();

        if (!$data = $database->command(['collStats' => $name])) {
            $message = sprintf(
                'Statistics not found for collection %s',
                $name
            );
            throw new Exception($message);
        }

        if (isset($data['errmsg'])) {
            throw new Exception($data['errmsg']);
        }

        return $data;
    }
610824
public function getStats()
    {
        $result = $this->callService('GET', self::API_DOWNLOAD_STATS);

        return $result->getModel(models\Download\Stats\DownloadStats::class);
    }
728709
public String stats() {
        ICURWLock.Stats stats = factoryLock.resetStats();
        if (stats != null) {
            return stats.toString();
        }
        return "no stats";
    }
343175
protected function getStatistics() {
        if (!$this->_statistics) {
            $this->_statistics = new WorkerStatisticsList(
                $this->version,
                $this->solution['workspaceSid'],
                $this->solution['sid']
            );
        }

        return $this->_statistics;
    }