@@ -7,7 +7,7 @@ |
||
7 | 7 | use ComposerUnused\ComposerUnused\Configuration\PatternFilter; |
8 | 8 | use Webmozart\Glob\Glob; |
9 | 9 | |
10 | -return static function (Configuration $config): Configuration { |
|
10 | +return static function(Configuration $config): Configuration { |
|
11 | 11 | return $config; |
12 | 12 | // ->addNamedFilter(NamedFilter::fromString('wyrihaximus/phpstan-rules-wrapper')); |
13 | 13 | }; |
@@ -15,17 +15,17 @@ |
||
15 | 15 | |
16 | 16 | final class MemoryUsage |
17 | 17 | { |
18 | - private const DEFAULT_INTERVAL = 1.337; |
|
19 | - private const PERSPECTIVE_INTERNAL = false; |
|
20 | - private const PERSPECTIVE_EXTERNAL = true; |
|
18 | + private const DEFAULT_INTERVAL=1.337; |
|
19 | + private const PERSPECTIVE_INTERNAL=false; |
|
20 | + private const PERSPECTIVE_EXTERNAL=true; |
|
21 | 21 | |
22 | 22 | /** @var array<int, TimerInterface> */ |
23 | - private array $registries = []; |
|
23 | + private array $registries=[]; |
|
24 | 24 | |
25 | - public function register(Registry $registry, float $interval = self::DEFAULT_INTERVAL): void |
|
25 | + public function register(Registry $registry, float $interval=self::DEFAULT_INTERVAL): void |
|
26 | 26 | { |
27 | - $gauges = $registry->gauge('reactphp_memory', 'Process Memmory usage', new Label\Name('perspective'), new Label\Name('peak')); |
|
28 | - $this->registries[spl_object_id($registry)] = Loop::addPeriodicTimer($interval, static function () use ($gauges): void { |
|
27 | + $gauges=$registry->gauge('reactphp_memory', 'Process Memmory usage', new Label\Name('perspective'), new Label\Name('peak')); |
|
28 | + $this->registries[spl_object_id($registry)]=Loop::addPeriodicTimer($interval, static function() use ($gauges): void { |
|
29 | 29 | $gauges->gauge(new Label('perspective', 'external'), new Label('peak', 'false'))->set(memory_get_usage(self::PERSPECTIVE_EXTERNAL)); |
30 | 30 | $gauges->gauge(new Label('perspective', 'external'), new Label('peak', 'true'))->set(memory_get_peak_usage(self::PERSPECTIVE_EXTERNAL)); |
31 | 31 | $gauges->gauge(new Label('perspective', 'internal'), new Label('peak', 'false'))->set(memory_get_usage(self::PERSPECTIVE_INTERNAL)); |