Class: ManageEngine::APMMetricsCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/agent/metrics/am_metricscollector.rb

Instance Method Summary collapse

Constructor Details

#initializeAPMMetricsCollector

Returns a new instance of APMMetricsCollector.



6
7
8
# File 'lib/agent/metrics/am_metricscollector.rb', line 6

def initialize
	@obj = ManageEngine::APMObjectHolder.instance
end

Instance Method Details

#getTransactionsObject



10
11
12
# File 'lib/agent/metrics/am_metricscollector.rb', line 10

def getTransactions
	@obj.store.metrics_dup
end

#transactionmetricskeysObject



25
26
27
# File 'lib/agent/metrics/am_metricscollector.rb', line 25

def transactionmetricskeys
	@obj.store.keys
end

#updateTransaction(id, values) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/agent/metrics/am_metricscollector.rb', line 14

def updateTransaction( id ,values)
	if(@obj.store.metrics.has_key?(id))
		temp = @obj.store.metrics[id]
		temp.push(values);
	else
		temp = Array.new
		temp.push(values);
		@obj.store.metrics[id]=temp
	end				
end