mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
change: update ga events
This commit is contained in:
@@ -40,7 +40,7 @@ type UserTimingTracking struct {
|
|||||||
HitType string `form:"t"` // Timing hit type
|
HitType string `form:"t"` // Timing hit type
|
||||||
Category string `form:"utc"` // Required. user timing category. e.g. jsonLoader
|
Category string `form:"utc"` // Required. user timing category. e.g. jsonLoader
|
||||||
Variable string `form:"utv"` // Required. timing variable. e.g. load
|
Variable string `form:"utv"` // Required. timing variable. e.g. load
|
||||||
Duration string `form:"utt"` // Required. time took duration. Required.
|
Duration string `form:"utt"` // Required. time took duration.
|
||||||
Label string `form:"utl"` // Optional. user timing label. e.g jQuery
|
Label string `form:"utl"` // Optional. user timing label. e.g jQuery
|
||||||
startTime time.Time
|
startTime time.Time
|
||||||
duration time.Duration // time took duration
|
duration time.Duration // time took duration
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ func (h *har) SetOutputDir(dir string) {
|
|||||||
|
|
||||||
func (h *har) GenJSON() (jsonPath string, err error) {
|
func (h *har) GenJSON() (jsonPath string, err error) {
|
||||||
event := ga.EventTracking{
|
event := ga.EventTracking{
|
||||||
Category: "har2case",
|
Category: "ConvertTests",
|
||||||
Action: "hrp har2case --to-json",
|
Action: "hrp har2case --to-json",
|
||||||
}
|
}
|
||||||
// report start event
|
// report start event
|
||||||
@@ -62,7 +62,7 @@ func (h *har) GenJSON() (jsonPath string, err error) {
|
|||||||
|
|
||||||
func (h *har) GenYAML() (yamlPath string, err error) {
|
func (h *har) GenYAML() (yamlPath string, err error) {
|
||||||
event := ga.EventTracking{
|
event := ga.EventTracking{
|
||||||
Category: "har2case",
|
Category: "ConvertTests",
|
||||||
Action: "hrp har2case --to-yaml",
|
Action: "hrp har2case --to-yaml",
|
||||||
}
|
}
|
||||||
// report start event
|
// report start event
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ func initPlugin(path string, logOn bool) (plugin funplugin.IPlugin, err error) {
|
|||||||
event := ga.EventTracking{
|
event := ga.EventTracking{
|
||||||
Category: "InitPlugin",
|
Category: "InitPlugin",
|
||||||
Action: fmt.Sprintf("Init %s plugin", plugin.Type()),
|
Action: fmt.Sprintf("Init %s plugin", plugin.Type()),
|
||||||
|
Value: 0, // success
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
event.Value = 1 // failed
|
event.Value = 1 // failed
|
||||||
|
|||||||
Reference in New Issue
Block a user