Class: Vmstator::DiskSummary
- Inherits:
-
Object
- Object
- Vmstator::DiskSummary
- Defined in:
- lib/vmstator/disk_summary.rb
Instance Attribute Summary collapse
-
#disks ⇒ Object
readonly
Returns the value of attribute disks.
-
#inprogress_io ⇒ Object
readonly
Returns the value of attribute inprogress_io.
-
#merged_reads ⇒ Object
readonly
Returns the value of attribute merged_reads.
-
#merged_writes ⇒ Object
readonly
Returns the value of attribute merged_writes.
-
#milli_reading ⇒ Object
readonly
Returns the value of attribute milli_reading.
-
#milli_spent_io ⇒ Object
readonly
Returns the value of attribute milli_spent_io.
-
#milli_writing ⇒ Object
readonly
Returns the value of attribute milli_writing.
-
#partitions ⇒ Object
readonly
Returns the value of attribute partitions.
-
#read_sectors ⇒ Object
readonly
Returns the value of attribute read_sectors.
-
#total_reads ⇒ Object
readonly
Returns the value of attribute total_reads.
-
#writes ⇒ Object
readonly
Returns the value of attribute writes.
-
#written_sectors ⇒ Object
readonly
Returns the value of attribute written_sectors.
Instance Method Summary collapse
-
#initialize(data = false) ⇒ DiskSummary
constructor
A new instance of DiskSummary.
- #update(data) ⇒ Object
Constructor Details
#initialize(data = false) ⇒ DiskSummary
Returns a new instance of DiskSummary.
17 18 19 20 21 22 |
# File 'lib/vmstator/disk_summary.rb', line 17 def initialize(data=false) if data update(data) end true end |
Instance Attribute Details
#disks ⇒ Object (readonly)
Returns the value of attribute disks.
4 5 6 |
# File 'lib/vmstator/disk_summary.rb', line 4 def disks @disks end |
#inprogress_io ⇒ Object (readonly)
Returns the value of attribute inprogress_io.
14 15 16 |
# File 'lib/vmstator/disk_summary.rb', line 14 def inprogress_io @inprogress_io end |
#merged_reads ⇒ Object (readonly)
Returns the value of attribute merged_reads.
7 8 9 |
# File 'lib/vmstator/disk_summary.rb', line 7 def merged_reads @merged_reads end |
#merged_writes ⇒ Object (readonly)
Returns the value of attribute merged_writes.
11 12 13 |
# File 'lib/vmstator/disk_summary.rb', line 11 def merged_writes @merged_writes end |
#milli_reading ⇒ Object (readonly)
Returns the value of attribute milli_reading.
9 10 11 |
# File 'lib/vmstator/disk_summary.rb', line 9 def milli_reading @milli_reading end |
#milli_spent_io ⇒ Object (readonly)
Returns the value of attribute milli_spent_io.
15 16 17 |
# File 'lib/vmstator/disk_summary.rb', line 15 def milli_spent_io @milli_spent_io end |
#milli_writing ⇒ Object (readonly)
Returns the value of attribute milli_writing.
13 14 15 |
# File 'lib/vmstator/disk_summary.rb', line 13 def milli_writing @milli_writing end |
#partitions ⇒ Object (readonly)
Returns the value of attribute partitions.
5 6 7 |
# File 'lib/vmstator/disk_summary.rb', line 5 def partitions @partitions end |
#read_sectors ⇒ Object (readonly)
Returns the value of attribute read_sectors.
8 9 10 |
# File 'lib/vmstator/disk_summary.rb', line 8 def read_sectors @read_sectors end |
#total_reads ⇒ Object (readonly)
Returns the value of attribute total_reads.
6 7 8 |
# File 'lib/vmstator/disk_summary.rb', line 6 def total_reads @total_reads end |
#writes ⇒ Object (readonly)
Returns the value of attribute writes.
10 11 12 |
# File 'lib/vmstator/disk_summary.rb', line 10 def writes @writes end |
#written_sectors ⇒ Object (readonly)
Returns the value of attribute written_sectors.
12 13 14 |
# File 'lib/vmstator/disk_summary.rb', line 12 def written_sectors @written_sectors end |
Instance Method Details
#update(data) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/vmstator/disk_summary.rb', line 24 def update(data) if data @disks = data[:disks] @partitions = data[:partitions] @total_reads = data[:total_reads] @merged_reads = data[:merged_reads] @read_sectors = data[:read_sectors] @milli_reading = data[:milli_reading] @writes = data[:writes] @merged_writes = data[:merged_writes] @written_sectors = data[:written_sectors] @milli_writing = data[:milli_writing] @inprogress_io = data[:inprogress_io] @milli_spent_io = data[:milli_spent_io] else return false end true end |