Class: DockerEngineRuby::Models::StatsResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine_ruby/models/stats_response.rb

Overview

Defined Under Namespace

Classes: BlkioStats, CPUStats, MemoryStats, Network, PidsStats, PrecpuStats, StorageStats

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(periods: nil, throttled_periods: nil, throttled_time: nil) ⇒ Object

CPU throttling stats of the container.

This type is Linux-specific and omitted for Windows containers.

Parameters:

  • periods (Integer) (defaults to: nil)

    Number of periods with throttling active.

  • throttled_periods (Integer) (defaults to: nil)

    Number of periods when the container hit its throttling limit.

  • throttled_time (Integer) (defaults to: nil)

    Aggregated time (in nanoseconds) the container was throttled for.



# File 'lib/docker_engine_ruby/models/stats_response.rb', line 110


Instance Attribute Details

#blkio_statsDockerEngineRuby::Models::StatsResponse::BlkioStats?

BlkioStats stores all IO service stats for data read and write.

This type is Linux-specific and holds many fields that are specific to cgroups v1. On a cgroup v2 host, all fields other than io_service_bytes_recursive are omitted or null.

This type is only populated on Linux and omitted for Windows containers.



23
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 23

optional :blkio_stats, -> { DockerEngineRuby::StatsResponse::BlkioStats }

#cpu_statsDockerEngineRuby::Models::StatsResponse::CPUStats?

CPU related info of the container



29
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 29

optional :cpu_stats, -> { DockerEngineRuby::StatsResponse::CPUStats }

#idString?

ID of the container for which the stats were collected.

Returns:

  • (String, nil)


11
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 11

optional :id, String, nil?: true

#memory_statsDockerEngineRuby::Models::StatsResponse::MemoryStats?

Aggregates all memory stats since container inception on Linux. Windows returns stats for commit and private working set only.



36
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 36

optional :memory_stats, -> { DockerEngineRuby::StatsResponse::MemoryStats }

#nameString?

Name of the container for which the stats were collected.

Returns:

  • (String, nil)


42
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 42

optional :name, String, nil?: true

#networksHash{Symbol=>DockerEngineRuby::Models::StatsResponse::Network}?

Network statistics for the container per interface.

This field is omitted if the container has no networking enabled.

Returns:



50
51
52
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 50

optional :networks,
-> { DockerEngineRuby::Internal::Type::HashOf[DockerEngineRuby::StatsResponse::Network] },
nil?: true

#num_procsInteger?

The number of processors on the system.

This field is Windows-specific and always zero for Linux containers.

Returns:

  • (Integer, nil)


60
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 60

optional :num_procs, Integer

#os_typeString?

OSType is the OS of the container (“linux” or “windows”) to allow platform-specific handling of stats.

Returns:

  • (String, nil)


67
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 67

optional :os_type, String, nil?: true

#pids_statsDockerEngineRuby::Models::StatsResponse::PidsStats?

PidsStats contains Linux-specific stats of a container’s process-IDs (PIDs).

This type is Linux-specific and omitted for Windows containers.



75
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 75

optional :pids_stats, -> { DockerEngineRuby::StatsResponse::PidsStats }

#precpu_statsDockerEngineRuby::Models::StatsResponse::PrecpuStats?

CPU related info of the container



81
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 81

optional :precpu_stats, -> { DockerEngineRuby::StatsResponse::PrecpuStats }

#prereadTime?

Date and time at which this first sample was collected. This field is not propagated if the “one-shot” option is set. If the “one-shot” option is set, this field may be omitted, empty, or set to a default date (0001-01-01T00:00:00Z).

The value is formatted as [RFC 3339](www.ietf.org/rfc/rfc3339.txt) with nano-seconds.

Returns:

  • (Time, nil)


93
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 93

optional :preread, Time

#readTime?

Date and time at which this sample was collected. The value is formatted as [RFC 3339](www.ietf.org/rfc/rfc3339.txt) with nano-seconds.

Returns:

  • (Time, nil)


100
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 100

optional :read, Time

#storage_statsDockerEngineRuby::Models::StatsResponse::StorageStats?

StorageStats is the disk I/O stats for read/write on Windows.

This type is Windows-specific and omitted for Linux containers.



108
# File 'lib/docker_engine_ruby/models/stats_response.rb', line 108

optional :storage_stats, -> { DockerEngineRuby::StatsResponse::StorageStats }