Documentation
¶
Overview ¶
Package plot defines and builds the plots available in Statsviz.
Index ¶
- Variables
- func IsReservedPlotName(name string) bool
- func RGBString(r, g, b uint8) string
- type Config
- type HeapmapHover
- type Heatmap
- type HeatmapLayout
- type HeatmapUserPlot
- type HeatmapYaxis
- type List
- type Scatter
- type ScatterLayout
- type ScatterUserPlot
- type ScatterYAxis
- type Subplot
- type UserPlot
- type WeightedColor
Constants ¶
This section is empty.
Variables ¶
View Source
var BlueShades = []WeightedColor{ {Value: 0.0, Color: color.RGBA{0xea, 0xf8, 0xfd, 1}}, {Value: 0.1, Color: color.RGBA{0xbf, 0xeb, 0xfa, 1}}, {Value: 0.2, Color: color.RGBA{0x94, 0xdd, 0xf6, 1}}, {Value: 0.3, Color: color.RGBA{0x69, 0xd0, 0xf2, 1}}, {Value: 0.4, Color: color.RGBA{0x3f, 0xc2, 0xef, 1}}, {Value: 0.5, Color: color.RGBA{0x14, 0xb5, 0xeb, 1}}, {Value: 0.6, Color: color.RGBA{0x10, 0x94, 0xc0, 1}}, {Value: 0.7, Color: color.RGBA{0x0d, 0x73, 0x96, 1}}, {Value: 0.8, Color: color.RGBA{0x09, 0x52, 0x6b, 1}}, {Value: 0.9, Color: color.RGBA{0x05, 0x31, 0x40, 1}}, {Value: 1.0, Color: color.RGBA{0x02, 0x10, 0x15, 1}}, }
View Source
var GreenShades = []WeightedColor{ {Value: 0.0, Color: color.RGBA{0xed, 0xf7, 0xf2, 0}}, {Value: 0.1, Color: color.RGBA{0xc9, 0xe8, 0xd7, 0}}, {Value: 0.2, Color: color.RGBA{0xa5, 0xd9, 0xbc, 0}}, {Value: 0.3, Color: color.RGBA{0x81, 0xca, 0xa2, 0}}, {Value: 0.4, Color: color.RGBA{0x5e, 0xbb, 0x87, 0}}, {Value: 0.5, Color: color.RGBA{0x44, 0xa1, 0x6e, 0}}, {Value: 0.6, Color: color.RGBA{0x35, 0x7e, 0x55, 0}}, {Value: 0.7, Color: color.RGBA{0x26, 0x5a, 0x3d, 0}}, {Value: 0.8, Color: color.RGBA{0x17, 0x36, 0x25, 0}}, {Value: 0.9, Color: color.RGBA{0x08, 0x12, 0x0c, 0}}, {Value: 1.0, Color: color.RGBA{0x00, 0x00, 0x00, 0}}, }
View Source
var PinkShades = []WeightedColor{ {Value: 0.0, Color: color.RGBA{0xfe, 0xe7, 0xf3, 1}}, {Value: 0.1, Color: color.RGBA{0xfc, 0xb6, 0xdc, 1}}, {Value: 0.2, Color: color.RGBA{0xf9, 0x85, 0xc5, 1}}, {Value: 0.3, Color: color.RGBA{0xf7, 0x55, 0xae, 1}}, {Value: 0.4, Color: color.RGBA{0xf5, 0x24, 0x96, 1}}, {Value: 0.5, Color: color.RGBA{0xdb, 0x0a, 0x7d, 1}}, {Value: 0.6, Color: color.RGBA{0xaa, 0x08, 0x61, 1}}, {Value: 0.7, Color: color.RGBA{0x7a, 0x06, 0x45, 1}}, {Value: 0.8, Color: color.RGBA{0x49, 0x03, 0x2a, 1}}, {Value: 0.9, Color: color.RGBA{0x18, 0x01, 0x0e, 1}}, {Value: 1.0, Color: color.RGBA{0x00, 0x00, 0x00, 1}}, }
Functions ¶
func IsReservedPlotName ¶ added in v0.6.0
IsReservedPlotName reports whether that name is reserved for Statsviz plots and thus can't be used for a user plot.
Types ¶
type Config ¶
type Config struct {
// Series contains the plots we want to show and how we want to show them.
Series []any `json:"series"`
// Events contains a list of 'events time series' names. Series with
// these names must be sent alongside other series. An event time series
// is just made of timestamps with no associated value, each of which
// gets plotted as a vertical line over another plot.
Events []string `json:"events"`
}
type HeapmapHover ¶
type Heatmap ¶
type Heatmap struct {
Name string `json:"name"`
Tags []string `json:"tags"`
Title string `json:"title"`
Type string `json:"type"`
UpdateFreq int `json:"updateFreq"`
InfoText string `json:"infoText"`
Events string `json:"events"`
Layout HeatmapLayout `json:"layout"`
Colorscale []WeightedColor `json:"colorscale"`
Buckets []float64 `json:"buckets"`
CustomData []float64 `json:"custom_data"`
Hover HeapmapHover `json:"hover"`
Metrics []string `json:"metrics"`
}
type HeatmapLayout ¶ added in v0.6.0
type HeatmapLayout struct {
YAxis HeatmapYaxis `json:"yaxis"`
}
type HeatmapUserPlot ¶ added in v0.6.0
type HeatmapUserPlot struct {
Plot Heatmap
}
type HeatmapYaxis ¶ added in v0.6.0
type List ¶
type List struct {
// contains filtered or unexported fields
}
List holds all the plots that statsviz knows about. Some plots might be disabled, if they rely on metrics that are unknown to the current Go version.
type Scatter ¶
type Scatter struct {
Name string `json:"name"`
Tags []string `json:"tags"`
Title string `json:"title"`
Type string `json:"type"`
UpdateFreq int `json:"updateFreq"`
InfoText string `json:"infoText"`
Events string `json:"events"`
Layout ScatterLayout `json:"layout"`
Subplots []Subplot `json:"subplots"`
Metrics []string `json:"metrics"`
}
type ScatterLayout ¶ added in v0.6.0
type ScatterLayout struct {
Yaxis ScatterYAxis `json:"yaxis"`
BarMode string `json:"barmode"`
}
type ScatterUserPlot ¶ added in v0.6.0
type ScatterYAxis ¶ added in v0.6.0
type UserPlot ¶ added in v0.6.0
type UserPlot struct {
Scatter *ScatterUserPlot
Heatmap *HeatmapUserPlot
}
type WeightedColor ¶
func (WeightedColor) MarshalJSON ¶
func (c WeightedColor) MarshalJSON() ([]byte, error)
Source Files
¶
- color.go
- helpers.go
- hist.go
- indices_pre_go1.26.go
- list.go
- plot_cgo.go
- plot_cpu_gc.go
- plot_cpu_overall.go
- plot_cpu_scavenger.go
- plot_gc.go
- plot_gc_cycles.go
- plot_gc_scan.go
- plot_goroutines_pre_go1.26.go
- plot_gs_stack_size.go
- plot_heap_allocs.go
- plot_heap_details.go
- plot_live_bytes.go
- plot_live_objects.go
- plot_memory_classes.go
- plot_mspan_mcache.go
- plot_mutex_wait.go
- plot_runnable_time.go
- plot_size_classes.go
- plot_stopping_pauses_gc.go
- plot_stopping_pauses_other.go
- plot_total_pauses_gc.go
- plot_total_pauses_other.go
- registry.go
- types.go
- user.go
Click to show internal directories.
Click to hide internal directories.