Skip to content

cmd/containerd-shim-runhcs-v1: fix UserTime_100Ns incorrectly reporting kernel time - #2832

Open
Harshal Patel (HarshalPatel1972) wants to merge 1 commit into
microsoft:mainfrom
HarshalPatel1972:fix-usertime-metrics
Open

cmd/containerd-shim-runhcs-v1: fix UserTime_100Ns incorrectly reporting kernel time#2832
Harshal Patel (HarshalPatel1972) wants to merge 1 commit into
microsoft:mainfrom
HarshalPatel1972:fix-usertime-metrics

Conversation

@HarshalPatel1972

Copy link
Copy Markdown

hcsTask.Pids() incorrectly assigned UserTime_100Ns the value of KernelTime100ns.

This updates the assignment to use the correct UserTime100ns field from the underlying schema1.ProcessListItem struct and adds a unit test to verify the mapping.

…ng kernel time

When querying process metrics via containerd's task Pids API, the UserTime_100Ns metric was incorrectly being assigned the value of KernelTime100ns. This updates the assignment to use the correct UserTime100ns field from the underlying HCS ProcessListItem struct.

This change includes a unit test verifying the correct mapping of properties from the schema1 ProcessListItem to the runhcsopts.ProcessDetails structure.

Signed-off-by: Harshal Patel <hp842484@gmail.com>
@jterry75

Copy link
Copy Markdown
Contributor

Harsh Rawat (@rawahars) - PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants