New issue
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
libcontainer/intelrdt: remove 'omitempty' property from CMT and MBM counters #2644
libcontainer/intelrdt: remove 'omitempty' property from CMT and MBM counters #2644
Conversation
…ounters If the values of CMT and MBM counters are zero, they will be omitted as empty items when getting Intel RDT stats. Remove 'omitempty' property from CMT and MBM counters to display zero values. Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com>
@Creatone @kolyshkin @AkihiroSuda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@AkihiroSuda @crosbymichael |
Doesn't e.g. BlkIo have the same problem? |
@eero-t From my understanding, it depends on the meaning of the value in the field. If the From https://golang.org/pkg/encoding/json/: |
@xiaochenshen For example in types/events.go all fields have "omitempty":
But it's common for minor for a device file to be zero. Minor being omitted for some of the data output by events looks IMHO pretty odd, and I can't see any advantage on it, it just makes parsing the data from "events" command harder. (I noticed this when testing my own code for some other device limits, as I had modeled that code after BlkIo.) |
@eero-t |
If the values of CMT and MBM counters are zero, they will be omitted as
empty items when getting Intel RDT stats.
Remove 'omitempty' property from CMT and MBM counters to display zero
values.
Signed-off-by: Xiaochen Shen xiaochen.shen@intel.com