lib/docker/metrics/container.rb
# Initialize a new Docker::Metrics::Container instance
# @param [String] name container name
# @return [Docker::Metrics::Container] container instance
Initialize a new Docker::Metrics::Container instance
Initialize a new Docker :: Metrics :: Container instance
def empty_docker_metrics(require_details)
        emtpy_metric = {"Metrics" => {
                                      "cpu_usage" =>{
                                                     "usage_in_kernelmode" => 0,
                                                     "usage_in_usermode" =>0,
                                                     "percpu_usage"=>[],
                                                     "total_usage"=> 0
                                      },
                                      "memory_usage"=>{
                                                       "usage" => 0,
                                                       "max_usage" =>0,
                                                       "limit" => 0,
                                                       "memory_failcnt" => 0,
                                                       "stats" => {
                                                                    "rss"=>0,
                                                                    "cache" => 0
                                                       }
                                      },
                                      "network_usage"=>{
                                                        "rx_bytes"=>0,
                                                        "rx_errors"=>0,
                                                        "tx_bytes"=>0,
                                                        "tx_errors"=>0}
                                      },
                                      "diskio_usage"=>{
                                                      "io_service_bytes"=>{},
                                                      "io_serviced"=>{}
                                      }
                        }
         return emtpy_metric
      end
def empty_docker_metrics ( require_details ) emtpy_metric = { "Metrics" => { "cpu_usage" => { "usage_in_kernelmode" => 0 , "usage_in_usermode" => 0 , "percpu_usage" => [ ] , "total_usage" => 0 } , "memory_usage" => { "usage" => 0 , "max_usage" => 0 , "limit" => 0 , "memory_failcnt" => 0 , "stats" => { "rss" => 0 , "cache" => 0 } } , "network_usage" => { "rx_bytes" => 0 , "rx_errors" => 0 , "tx_bytes" => 0 , "tx_errors" => 0 } } , "diskio_usage" => { "io_service_bytes" => { } , "io_serviced" => { } } } return emtpy_metric end
Initialize a new Docker::Metrics::Container instance
Initialize a new Docker :: Metrics :: Container instance
None
Docker::Metrics::Container
require_details
name container name
name container name