mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 06:23:52 +08:00
fix: report GA event with value to indicate failure
This commit is contained in:
14
plugin.go
14
plugin.go
@@ -35,10 +35,16 @@ func (p *parser) loadPlugin(path string) error {
|
||||
}
|
||||
|
||||
// report event for loading go plugin
|
||||
go ga.SendEvent(ga.EventTracking{
|
||||
Category: "LoadGoPlugin",
|
||||
Action: "plugin.Open",
|
||||
})
|
||||
defer func() {
|
||||
event := ga.EventTracking{
|
||||
Category: "LoadGoPlugin",
|
||||
Action: "plugin.Open",
|
||||
}
|
||||
if err != nil {
|
||||
event.Value = 1 // failed
|
||||
}
|
||||
go ga.SendEvent(event)
|
||||
}()
|
||||
|
||||
// load plugin
|
||||
plugins, err := plugin.Open(pluginPath)
|
||||
|
||||
Reference in New Issue
Block a user