Adding time_ prefix to all CPU time measurements
This commit is contained in:
8
agent.go
8
agent.go
@@ -363,7 +363,7 @@ func (a *Agent) Test() error {
|
||||
acc.Prefix = plugin.name + "_"
|
||||
acc.Config = plugin.config
|
||||
|
||||
fmt.Printf("* Plugin: %s\n", plugin.name)
|
||||
fmt.Printf("* Plugin: %s Collection 1\n", plugin.name)
|
||||
if plugin.config.Interval != 0 {
|
||||
fmt.Printf("* Internal: %s\n", plugin.config.Interval)
|
||||
}
|
||||
@@ -371,6 +371,12 @@ func (a *Agent) Test() error {
|
||||
if err := plugin.plugin.Gather(&acc); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
fmt.Printf("* Plugin: %s Collection 2\n", plugin.name)
|
||||
if err := plugin.plugin.Gather(&acc); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user