Class: VBox::PerformanceCollector

Inherits:
Base
  • Object
show all
Defined in:
lib/virtualbox/classes/performance_collector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#_this, #delete!, #ensure_hash, #initialize, #vbox_class

Constructor Details

This class inherits a constructor from VBox::Base

Instance Attribute Details

#refObject (readonly)

Returns the value of attribute ref.



4
5
6
# File 'lib/virtualbox/classes/performance_collector.rb', line 4

def ref
  @ref
end

Instance Method Details

#disable_metrics(args = {}) ⇒ Object

Methods



14
15
16
17
18
19
20
# File 'lib/virtualbox/classes/performance_collector.rb', line 14

def disable_metrics(args={})
  ensure_hash(args)
  performance_metrics = VBox::WebService.send_request(:i_performance_collector_disable_metrics, _this.merge(args))
  performance_metrics.map do |performance_metric|
    VBox::PerformanceMatric.new(performance_metric)
  end
end

#enable_metrics(args = {}) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/virtualbox/classes/performance_collector.rb', line 22

def enable_metrics(args={})
  ensure_hash(args)
  performance_metrics = VBox::WebService.send_request(:i_performance_collector_enable_metrics, _this.merge(args))
  performance_metrics.map do |performance_metric|
    VBox::PerformanceMatric.new(performance_metric)
  end
end

#get_metrics(args = {}) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/virtualbox/classes/performance_collector.rb', line 30

def get_metrics(args={})
  ensure_hash(args)
  performance_metrics = VBox::WebService.send_request(:i_performance_collector_get_metrics, _this.merge(args))
  performance_metrics.map do |performance_metric|
    VBox::PerformanceMatric.new(performance_metric)
  end
end

#metric_namesObject

Attributes



8
9
10
# File 'lib/virtualbox/classes/performance_collector.rb', line 8

def metric_names
  VBox::WebService.send_request(:i_performance_collector_get_metric_names, _this)
end

#query_metrics_data(args = {}) ⇒ Object



38
39
40
41
# File 'lib/virtualbox/classes/performance_collector.rb', line 38

def query_metrics_data(args={})
  ensure_hash(args)
  VBox::WebService.send_request(:i_performance_collector_query_metrics_data, _this.merge(args))
end

#setup_metrics(args = {}) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/virtualbox/classes/performance_collector.rb', line 43

def setup_metrics(args={})
  ensure_hash(args)
  performance_metrics = VBox::WebService.send_request(:i_performance_collector_setup_metrics, _this.merge(args))
  performance_metrics.map do |performance_metric|
    VBox::PerformanceMatric.new(performance_metric)
  end
end