Method: Docker::API::Container#stats
- Defined in:
- lib/docker/api/container.rb
#stats(name, params = {}, &block) ⇒ Object
Get container stats based on resource usage.
Docker API: GET /containers/id/stats
246 247 248 249 250 251 252 253 254 |
# File 'lib/docker/api/container.rb', line 246 def stats name, params = {}, &block path = "/containers/#{name}/stats" if [true, 1 ].include? params[:stream] request(method: :get, path: path, params: params, response_block: block_given? ? block : default_streamer) else get(path, params) end end |