fix: typo

change: do not add console output by default

feat: add GA for docs

refactor: move builtin to internal

refactor: relocate sentry sdk

feat: report events with ga

change: use http client session

fix: report GA events

change: sentry
This commit is contained in:
debugtalk
2021-11-26 15:39:17 +08:00
parent ae7710e9d0
commit 7fd26395ed
30 changed files with 286 additions and 42 deletions
+6 -6
View File
@@ -3,7 +3,7 @@ package cmd
import (
"time"
"github.com/getsentry/sentry-go"
"github.com/myzhan/boomer"
"github.com/spf13/cobra"
"github.com/httprunner/hrp"
@@ -19,15 +19,15 @@ var boomCmd = &cobra.Command{
$ hrp boom examples/ # run testcases in specified folder`,
Args: cobra.MinimumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
sentry.CaptureMessage("start to run load test")
var paths []hrp.ITestCase
for _, arg := range args {
paths = append(paths, &hrp.TestCasePath{Path: arg})
}
boomer := hrp.NewStandaloneBoomer(spawnCount, spawnRate)
boomer.EnableCPUProfile(cpuProfile, cpuProfileDuration)
boomer.EnableMemoryProfile(memoryProfile, memoryProfileDuration)
boomer.Run(paths...)
hrpBoomer := hrp.NewStandaloneBoomer(spawnCount, spawnRate)
hrpBoomer.AddOutput(boomer.NewConsoleOutput())
hrpBoomer.EnableCPUProfile(cpuProfile, cpuProfileDuration)
hrpBoomer.EnableMemoryProfile(memoryProfile, memoryProfileDuration)
hrpBoomer.Run(paths...)
},
}