We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
Parsing the stats of the blkio controller is broken. According to [1], section IO Interface Files the io.stat file has the format:
IO Interface Files
io.stat
8:16 rbytes=1459200 wbytes=314773504 rios=192 wios=35 8:0 rbytes=90430464 wbytes=299008000 rios=8950 wios=1252
but the parsing code expects a : instead of a = in blk.rs
:
=
Expected behavior
Parse the correct values.
Additional context
The implementation could be easily optimised to avoid the String and Vec allocations by modifying get_value:
String
Vec
get_value
fn get_value(s: &str) -> u64 { s.split('=') .skip(1) .next() .and_then(|s| s.parse::<u64>().ok()) .unwrap_or_default() }
which is only used for the v2 parsing. Same applies for more places of the parsing code in (at least) blkio.
[1] https://www.kernel.org/doc/Documentation/cgroup-v2.txt
The text was updated successfully, but these errors were encountered:
@liubin PTAL
Sorry, something went wrong.
Hello,
This issues is open for quite a long time. Anything I can support here in order to make progress?
Thanks,
@flxo
Hi @c3d, you assigned to yourself, do you plan to fix this issue?
c3d
No branches or pull requests
Describe the bug
Parsing the stats of the blkio controller is broken. According to [1], section
IO Interface Files
theio.stat
file has the format:but the parsing code expects a
:
instead of a=
in blk.rsExpected behavior
Parse the correct values.
Additional context
The implementation could be easily optimised to avoid the
String
andVec
allocations by modifyingget_value
:which is only used for the v2 parsing. Same applies for more places of the parsing code in (at least) blkio.
[1] https://www.kernel.org/doc/Documentation/cgroup-v2.txt
The text was updated successfully, but these errors were encountered: