vegeta: github.com/tsenart/vegeta/lib/plot Index | Files

package plot

import "github.com/tsenart/vegeta/lib/plot"

Index

Package Files

assets_vfsdata.go plot.go timeseries.go

Variables

var Assets = func() http.FileSystem {
    fs := vfsgen۰FS{
        "/": &vfsgen۰DirInfo{
            name:    "/",
            modTime: time.Date(2018, 8, 13, 15, 32, 56, 947383985, time.UTC),
        },
        "/VERSIONS": &vfsgen۰FileInfo{
            name:    "VERSIONS",
            modTime: time.Date(2018, 8, 13, 15, 0, 41, 923198933, time.UTC),
            content: []byte("" /* 174 byte string literal not displayed */),
        },
        "/dygraph.css": &vfsgen۰CompressedFileInfo{
            name:             "dygraph.css",
            modTime:          time.Date(2017, 12, 12, 22, 27, 49, 0, time.UTC),
            uncompressedSize: 2642,

            compressedContent: []byte("" /* 3374 byte string literal not displayed */),
        },
        "/dygraph.min.js": &vfsgen۰CompressedFileInfo{
            name:             "dygraph.min.js",
            modTime:          time.Date(2017, 12, 12, 22, 27, 49, 0, time.UTC),
            uncompressedSize: 123954,

            compressedContent: []byte("" /* 148202 byte string literal not displayed */),
        },
        "/html2canvas.min.js": &vfsgen۰CompressedFileInfo{
            name:             "html2canvas.min.js",
            modTime:          time.Date(2018, 8, 13, 14, 28, 13, 35498020, time.UTC),
            uncompressedSize: 166138,

            compressedContent: []byte("" /* 161422 byte string literal not displayed */),
        },
        "/plot.html.tpl": &vfsgen۰CompressedFileInfo{
            name:             "plot.html.tpl",
            modTime:          time.Date(2018, 8, 13, 15, 32, 56, 947476959, time.UTC),
            uncompressedSize: 958,

            compressedContent: []byte("" /* 2186 byte string literal not displayed */),
        },
    }
    fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
        fs["/VERSIONS"].(os.FileInfo),
        fs["/dygraph.css"].(os.FileInfo),
        fs["/dygraph.min.js"].(os.FileInfo),
        fs["/html2canvas.min.js"].(os.FileInfo),
        fs["/plot.html.tpl"].(os.FileInfo),
    }

    return fs
}()

Assets statically implements the virtual filesystem provided to vfsgen.

func ErrorLabeler Uses

func ErrorLabeler(r *vegeta.Result) (label string)

ErrorLabeler is an HTMLPlotLabeler which labels a result with an OK or ERROR label based on whether it has an error set.

type Labeler Uses

type Labeler func(*vegeta.Result) (label string)

An Labeler is a function that returns a label to partition and represent Results in separate (but overlaid) line charts in the rendered plot.

type Opt Uses

type Opt func(*Plot)

Opt is a functional option type for Plot.

func Downsample Uses

func Downsample(threshold int) Opt

Downsample returns an Opt that enables downsampling to the given threshold number of data points per labeled series.

func Label Uses

func Label(l Labeler) Opt

Label returns an Opt that sets the given Labeler to be used to partition results into multiple overlaid line charts.

func Title Uses

func Title(title string) Opt

Title returns an Opt that sets the title of a Plot.

type Plot Uses

type Plot struct {
    // contains filtered or unexported fields
}

An Plot represents an interactive HTML time series plot of Result latencies over time.

func New Uses

func New(opts ...Opt) *Plot

New returns a Plot with the given Opts applied. If no Label opt is given, ErrorLabeler will be used as default.

func (*Plot) Add Uses

func (p *Plot) Add(r *vegeta.Result) error

Add adds the given Result to the Plot time series.

func (*Plot) Close Uses

func (p *Plot) Close()

Close closes the HTML plot for writing.

func (Plot) WriteTo Uses

func (p Plot) WriteTo(w io.Writer) (n int64, err error)

WriteTo writes the HTML plot to the give io.Writer.

Package plot imports 19 packages (graph) and is imported by 2 packages. Updated 2020-03-16. Refresh now. Tools for package owners.