1 | <?php |
||
12 | class MemoryGauge implements GaugeInterface |
||
13 | { |
||
14 | const MEMINFO_PATH = '/proc/meminfo'; |
||
15 | |||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | public function getSamplingPeriod() |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | 1 | public function getCollection() |
|
44 | |||
45 | /** |
||
46 | * Only for linux/unix OS |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | protected function getSystemMemoryInfo() |
||
68 | |||
69 | /** |
||
70 | * Return used memory |
||
71 | * |
||
72 | * @param $info |
||
73 | * @return null |
||
74 | */ |
||
75 | 1 | protected function getUsedMemory($info) |
|
84 | } |
||
85 |