Skip to content

Conversation

@ZYecho
Copy link
Contributor

@ZYecho ZYecho commented Dec 27, 2018

Signed-off-by: zhangyue [email protected]

Ⅰ. Describe what this PR did

As the title desc, and fix small bugs:

  1. use IsRunningOrPaused to judge container state
  2. add container name and id into resp

Ⅱ. Does this pull request fix one issue?

ref #637 #2086

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

add API test case

Ⅳ. Describe how to verify it

wait for CI.

Ⅴ. Special notes for reviews

will patch a pr to add cli support in few days.

@codecov
Copy link

codecov bot commented Dec 27, 2018

Codecov Report

Merging #2624 into master will increase coverage by 0.58%.
The diff coverage is 37.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2624      +/-   ##
==========================================
+ Coverage    68.9%   69.49%   +0.58%     
==========================================
  Files         279      280       +1     
  Lines       18834    18844      +10     
==========================================
+ Hits        12978    13095     +117     
+ Misses       4386     4277     -109     
- Partials     1470     1472       +2
Flag Coverage Δ
#criv1alpha1test 31.24% <0%> (-0.19%) ⬇️
#criv1alpha2test 35.69% <0%> (+0.11%) ⬆️
#integrationtest 41.68% <31.25%> (+0.62%) ⬆️
#nodee2etest 32.74% <6.25%> (-0.02%) ⬇️
#unittest 26.88% <0%> (+0.09%) ⬆️
Impacted Files Coverage Δ
client/container_stats.go 0% <0%> (ø)
daemon/mgr/container_stats.go 73.45% <75%> (+60.83%) ⬆️
pkg/meta/store.go 67.44% <0%> (-1.56%) ⬇️
cri/v1alpha2/cri_wrapper.go 65.59% <0%> (-1.21%) ⬇️
cri/v1alpha1/cri.go 59.43% <0%> (-0.67%) ⬇️
daemon/mgr/container_utils.go 83.92% <0%> (-0.6%) ⬇️
ctrd/container.go 58.49% <0%> (-0.4%) ⬇️
daemon/mgr/container.go 59% <0%> (+0.21%) ⬆️
cri/v1alpha2/cri.go 67.82% <0%> (+0.37%) ⬆️
... and 9 more

@allencloud
Copy link
Collaborator

Yes, we could use stats command to get a paused container's stats. 👍
My missing work. Thanks @ZYecho

@allencloud
Copy link
Collaborator

LGTM
While I am still wondering if you could help to finish the command side of pouch stats. @ZYecho

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Dec 28, 2018
@allencloud allencloud merged commit 8c327f1 into AliyunContainerService:master Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

areas/monitoring kind/feature LGTM one maintainer or community participant agrees to merge the pull reuqest. size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants