Skip to content

Comments

Container Stats for LCOW/WCOW#719

Merged
katiewasnothere merged 1 commit intomicrosoft:masterfrom
katiewasnothere:finish_container_stats
Oct 18, 2019
Merged

Container Stats for LCOW/WCOW#719
katiewasnothere merged 1 commit intomicrosoft:masterfrom
katiewasnothere:finish_container_stats

Conversation

@katiewasnothere
Copy link

Implements WCOW/LCOW V2 container statistics queries on the shim stats calls.

  • update hcs api with correct field types
  • update stats retrieval
  • add tests for container stats

@katiewasnothere katiewasnothere requested a review from a team October 17, 2019 20:54
@katiewasnothere
Copy link
Author

Related PR: microsoft/opengcs#352

return ""
}

// should only be called if hcs task is WCOW
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont run lint like we should on this repo but this would fail. A comment needs to say "// ..."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the method actually? I figured it was for code reuse but there is only one caller.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just to make the code clearer in the Stats function.

@katiewasnothere katiewasnothere force-pushed the finish_container_stats branch 2 times, most recently from 0b095e9 to 1aad565 Compare October 18, 2019 17:30

message VirtualMachineMemoryStatistics {
uint64 working_set_bytes = 1;
int32 virtual_node_count = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess as long as were at it: uint8

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protobuild doesn't seem to like uint8. Should I change to uint32 or would you prefer this not be changed then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lame. uint32 it is. No byte type it looks like

message VirtualMachineMemory {
int32 available_memory = 1;
int32 available_memory_buffer = 2;
int32 reserved_memory = 3;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reserved, assigned should be uint64

Copy link
Contributor

@jterry75 jterry75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Minor change to the proto for types

* update hcs api with correct field types
* refactor stats retrieval
* add tests for container stats

Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
@katiewasnothere katiewasnothere merged commit e3ec4b1 into microsoft:master Oct 18, 2019
@katiewasnothere katiewasnothere deleted the finish_container_stats branch October 18, 2019 17:55
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
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