ReportJSON

This commit is contained in:
Tomás Senart
2013-09-10 13:45:01 +01:00
parent 6e9f34846b
commit ee9a1a0954
4 changed files with 42 additions and 15 deletions

View File

@@ -17,7 +17,7 @@ func main() {
targetsf = flag.String("targets", "targets.txt", "Targets file")
ordering = flag.String("ordering", "random", "Attack ordering [sequential, random]")
duration = flag.Duration("duration", 10*time.Second, "Duration of the test")
reporter = flag.String("reporter", "text", "Reporter to use [text, plot:timings]")
reporter = flag.String("reporter", "text", "Reporter to use [text, json, plot:timings]")
output = flag.String("output", "stdout", "Reporter output file")
cpus = flag.Int("cpus", runtime.NumCPU(), "Number of CPUs to use")
)
@@ -72,6 +72,8 @@ func run(rate uint64, duration time.Duration, targetsf, ordering, reporter, outp
switch reporter {
case "text":
rep = vegeta.ReportText
case "json":
rep = vegeta.ReportJSON
case "plot:timings":
rep = vegeta.ReportTimingsPlot
default: