Class: OsCtl::Lib::Zfs::IOStat::PoolStats

Inherits:
Struct
  • Object
show all
Defined in:
lib/libosctl/zfs/iostat.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#allocObject

Returns the value of attribute alloc

Returns:

  • (Object)

    the current value of alloc



5
6
7
# File 'lib/libosctl/zfs/iostat.rb', line 5

def alloc
  @alloc
end

#bytes_readObject

Returns the value of attribute bytes_read

Returns:

  • (Object)

    the current value of bytes_read



5
6
7
# File 'lib/libosctl/zfs/iostat.rb', line 5

def bytes_read
  @bytes_read
end

#bytes_writtenObject

Returns the value of attribute bytes_written

Returns:

  • (Object)

    the current value of bytes_written



5
6
7
# File 'lib/libosctl/zfs/iostat.rb', line 5

def bytes_written
  @bytes_written
end

#freeObject

Returns the value of attribute free

Returns:

  • (Object)

    the current value of free



5
6
7
# File 'lib/libosctl/zfs/iostat.rb', line 5

def free
  @free
end

#io_readObject

Returns the value of attribute io_read

Returns:

  • (Object)

    the current value of io_read



5
6
7
# File 'lib/libosctl/zfs/iostat.rb', line 5

def io_read
  @io_read
end

#io_writtenObject

Returns the value of attribute io_written

Returns:

  • (Object)

    the current value of io_written



5
6
7
# File 'lib/libosctl/zfs/iostat.rb', line 5

def io_written
  @io_written
end

#poolObject

Returns the value of attribute pool

Returns:

  • (Object)

    the current value of pool



5
6
7
# File 'lib/libosctl/zfs/iostat.rb', line 5

def pool
  @pool
end

Instance Method Details

#<<(other) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/libosctl/zfs/iostat.rb', line 14

def <<(other)
  self.alloc = nil
  self.free = nil
  self.io_read += other.io_read
  self.io_written += other.io_written
  self.bytes_read += other.bytes_read
  self.bytes_written += other.bytes_written
end