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

3 commits

Author SHA1 Message Date
Aaron Lehmann
0a377b5f56 Update go-metrics to match swarmkit's dependency
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-05-12 17:40:46 -07:00
Brian Goff
e4c03623c2 Use counter for tracking container states
Container state counts are used for reporting in the `/info` endpoint.
Currently when `/info` is called, each container is iterated over and
the containers 'StateString()' is called. This is not very efficient
with lots of containers, and is also racey since `StateString()` is not
using a mutex and the mutex is not otherwise locked.

We could just lock the container mutex, but this is proven to be
problematic since there are frequent deadlock scenarios and we should
always have the `/info` endpoint available since this endpoint is used
to get general information about the docker host.

Really, these metrics on `/info` should be deprecated. But until then,
we can just keep a running tally in memory for each of the reported
states.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-04-29 17:10:14 -04:00
Alexander Morozov
f2614f2107 project: use vndr for vendoring
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-11-03 15:31:46 -07:00
Renamed from vendor/src/github.com/docker/go-metrics/namespace.go (Browse further)