Andrey Smirnov 5532867b05
refactor: rewrite the implementation of Processes API
Fixes #4688

Instead of using generic library, build some handcrafted code to
reuse buffers, do partial parsing of the data we need for the processes
API.

Benchmark (it runs with significant number of processes on the host):

```
name                 time/op
PrometheusProcfs-16  3.42ms ± 8%
Processes-16         2.36ms ± 5%

name                 alloc/op
PrometheusProcfs-16   366kB ± 0%
Processes-16          255kB ± 0%

name                 allocs/op
PrometheusProcfs-16   6.76k ± 0%
Processes-16          3.83k ± 0%
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
2021-12-17 13:39:08 +03:00

2 lines
370 B
Plaintext

1920080 (fish) S 1920079 1920080 1920080 34817 497247 4194304 290636 24169180 15 32793 1888 426 1313442 30669 20 0 2 0 127957791 465002496 5805 18446744073709551615 93935540826112 93935542596848 140726024906784 0 0 0 0 2625540 135356435 0 0 0 17 15 0 0 7 0 0 93935542601152 93935542624320 93935548821504 140726024912137 140726024912143 140726024912143 140726024912874 0