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

0 lines
0 B
Plaintext

The file is empty.