Esempio n. 1
0
func readMetrics() {

	tail := probe.Load(fileName)
	line := tail.OutChannel(true)

loop:
	for {
		select {
		case s, ok := <-line:
			if !ok {
				break loop
			}
			jvm := new(JVMMetric)
			amon.LoadAttributes(jvm, []byte(s))
			probe.PostStats(jvm)
		}
	}

}
Esempio n. 2
0
func (t *task) Run() {
	stats := new(probe.Stats)
	probe.GetAllStats(stats)
	probe.PostStats(Stats{*stats, scenario, workload})
}