1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

17 commits

Author SHA1 Message Date
Brian Goff
ff08036cc0 Do not remove containers from stats list on err
Before this patch, containers are silently removed from the stats list
on error. This patch instead will display `--` for all fields for the
container that had the error, allowing it to recover from errors.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-04-13 16:36:34 -04:00
Zhang Wei
ea86c30a4a Bug fix: stats --no-stream always print zero values
`docker stats --no-stream` always print zero values.

```
$ docker stats --no-stream
CONTAINER           CPU %               MEM USAGE / LIMIT   MEM %
NET I/O             BLOCK I/O
7f4ef234ca8c        0.00%               0 B / 0 B           0.00%
0 B / 0 B           0 B / 0 B
f05bd18819aa        0.00%               0 B / 0 B           0.00%
0 B / 0 B           0 B / 0 B

```

This commit will let docker client wait until it gets correct stat
data before print it on screen.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-03-05 13:22:26 +08:00
Tibor Vass
e80f86bce8 Skip TestStatsAllNewContainersAdded on remote daemons
This test is often failing on remote daemons. We tried many approaches
to fix it but none worked. In order to make the CI more reliable, this
will skip the test when running against a remote daemon (e.g. win2lin).

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-03-01 11:49:09 -05:00
Brian Goff
efd281d6eb Fix flakey TestStatsAllNewContainersAdded
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-02-26 16:52:36 -05:00
Tibor Vass
f4a1e3db99 Support TLS remote test daemon
This will allow us to have a windows-to-linux CI, where the linux host
can be anywhere, connecting with TLS.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-02-25 14:12:17 -05:00
John Howard
55268f4e91 Windows: Turn off stats
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-02 17:59:11 -08:00
Lei Jitang
71d6e71cff Fix flaky test TestStatsAllNewContainersAdded
Wait the new created container for running and then check if it
is in the docker stats to avoid flaky test.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-08 17:02:08 +08:00
Wen Cheng Ma
c424c8c32c Correct the message of ErrorCodeNoSuchContainer to "No such container"
Fixes issue #18424

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2015-12-04 15:00:08 +08:00
Antonio Murdaca
ae818a820f Allow docker stats without arguments
This patch adds the ability to run `docker stats` w/o arguments and get
statistics for all running containers by default. Also add a new
`--all` flag to list statistics for all containers (like `docker ps`).
New running containers are added to the list as they show up also.
Add integration tests for this new behavior.
Docs updated accordingly. Fix missing stuff in man/commandline
reference for `docker stats`.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-07 17:03:33 +01:00
Xiaoxu Chen
90a81f6af2 update integration-cli/docker_cli_stats_test.go use Assert statement
part of #16756

Signed-off-by: Xiaoxu Chen <chenxiaoxu14@otcaix.iscas.ac.cn>
2015-10-09 18:24:32 +08:00
Antonio Murdaca
66be81b148 integration-cli: add cli/api stats tests when container not found
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-17 18:20:25 +02:00
Morgan Bauer
2d5d606fd3
refactor stats to not use internal data structures
- refactor to make it easier to split the api in the future
 - addition to check the existing test case and make sure it contains
   some expected output

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-09-16 17:28:52 -07:00
John Howard
f9a3558a9d Windows: Get Integration CLI running
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-04 12:32:40 -07:00
Vincent Demeester
799d9605d6 Remove/Comment time.Sleep in integration tests
Remove what seems unnecessary time.Sleep (1 second even) and comment the
ones that seemed necessary.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-08-18 20:36:08 +02:00
Lei
eef6eda7d2 Recfactor: Use dockerCmd when possible in integration-cli tests
Part of #14603
integration-cli/docker_cli_links_test.go (coolljt0725)
integration-cli/docker_cli_links_unix_test.go (coolljt0725)
integration-cli/docker_cli_logs_test.go (coolljt0725)
integration-cli/docker_cli_nat_test.go (coolljt0725)
integration-cli/docker_cli_network_test.go (coolljt0725)
integration-cli/docker_cli_stats_test.go (coolljt0725)
integration-cli/docker_cli_tag_test.go (coolljt0725)
integration-cli/docker_cli_top_test.go (coolljt0725)
integration-cli/docker_cli_version_test.go (coolljt0725)
integration-cli/docker_cli_wait_test.go (coolljt0725

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-07-20 14:44:22 +08:00
Lei Jitang
96123a1fd5 Add docker stats --no-stream show cpu usage
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-05-31 01:25:51 +08:00
Brian Goff
f3023a93d1 Allow pulling stats once and disconnecting.
Adds a `stream` query param to the stats API which allows API users to
only collect one stats entry and disconnect instead of keeping the
connection alive to stream more stats.

Also adds a `--no-stream` flag to `docker stats` which does the same

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-05-04 10:49:13 -04:00