| @@ 50-60 (lines=11) @@ | ||
| 47 | ); |
|
| 48 | } |
|
| 49 | ||
| 50 | private function run(string $command): Str |
|
| 51 | { |
|
| 52 | $process = new Process($command); |
|
| 53 | $process->run(); |
|
| 54 | ||
| 55 | if (!$process->isSuccessful()) { |
|
| 56 | throw new MemoryUsageNotAccessible; |
|
| 57 | } |
|
| 58 | ||
| 59 | return new Str($process->getOutput()); |
|
| 60 | } |
|
| 61 | ||
| 62 | private function parse(Str $str): Bytes |
|
| 63 | { |
|
| @@ 54-64 (lines=11) @@ | ||
| 51 | ->get($pid->toInt()); |
|
| 52 | } |
|
| 53 | ||
| 54 | private function run(string $command): Str |
|
| 55 | { |
|
| 56 | $process = new SfProcess($command); |
|
| 57 | $process->run(); |
|
| 58 | ||
| 59 | if (!$process->isSuccessful()) { |
|
| 60 | throw new InformationNotAccessible; |
|
| 61 | } |
|
| 62 | ||
| 63 | return new Str($process->getOutput()); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * @return MapInterface<int, Process> |
|