Commit Graph

2 Commits

Author SHA1 Message Date
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
Brian Goff df95474885 Fixes issue with stats on start event
In situations where a client is called like `docker stats` with no
arguments or flags, if a container which was already created but not
started yet is then subsequently started it will not be added to the
stats list as expected.

Also splits some of the stats helpers to a separate file from the stats
CLI which is already quite long.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-02-29 16:34:42 -05:00