MCPcopy
hub / github.com/tsenart/vegeta / plotCmd

Function plotCmd

plot.go:43–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41`
42
43func plotCmd() command {
44 fs := flag.NewFlagSet("vegeta plot", flag.ExitOnError)
45 title := fs.String("title", "Vegeta Plot", "Title and header of the resulting HTML page")
46 threshold := fs.Int("threshold", 4000, "Threshold of data points above which series are downsampled.")
47 output := fs.String("output", "stdout", "Output file")
48
49 fs.Usage = func() {
50 fmt.Fprintf(os.Stderr, "%s\n", plotUsage)
51 }
52
53 return command{fs, func(args []string) error {
54 fs.Parse(args)
55 files := fs.Args()
56 if len(files) == 0 {
57 files = append(files, "stdin")
58 }
59 return plotRun(files, *threshold, *title, *output)
60 }}
61}
62
63func plotRun(files []string, threshold int, title, output string) error {
64 dec, mc, err := decoder(files)

Callers 1

mainFunction · 0.85

Calls 2

plotRunFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected