feat: stuff
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Package "performance" provides a tracker to observe CPU performance during
|
||||
// Package "performance" provides a tracker to observer CPU performance during
|
||||
// execution.
|
||||
package plugins
|
||||
|
||||
@@ -19,10 +19,10 @@ type Performance struct {
|
||||
}
|
||||
|
||||
// Create a performance tracker that outputs a profile to "file".
|
||||
func NewPerformance(file string, r reducer.Reducer) *Performance {
|
||||
func NewPerformance(file string, process reducer.Reducer) *Performance {
|
||||
plugin := &Performance{File: file}
|
||||
r.On(reducer.StartEvent, plugin.Start)
|
||||
r.On(reducer.StopEvent, plugin.Stop)
|
||||
process.On(reducer.StartEvent, plugin.Start)
|
||||
process.On(reducer.StopEvent, plugin.Stop)
|
||||
|
||||
return plugin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user