Completed
Push — master ( 717b1b...de6dfe )
by Dmitry
06:37
created

Metrics::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 1
Metric Value
dl 0
loc 10
ccs 0
cts 10
cp 0
rs 9.4285
c 2
b 0
f 1
cc 1
eloc 7
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Basis\Jobs\Service;
4
5
use Basis\Application;
6
7
/**
8
 * Get Metrics information
9
 */
10
class Metrics
11
{
12
    public function run(Application $app)
13
    {
14
        return [
15
            'memory_usage' => memory_get_usage(),
16
            'memory_usage_real' => memory_get_usage(true),
17
            'memory_peak_usage' => memory_get_peak_usage(),
18
            'memory_peak_usage_real' => memory_get_peak_usage(true),
19
            'uptime' => round($app->getRunningTime()),
0 ignored issues
show
Bug introduced by
The method getRunningTime() does not seem to exist on object<Basis\Application>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
20
        ];
21
    }
22
}