statsviz
statsviz copied to clipboard
statsviz.TimeSeries.GetValue is called multiple times per second
Open 2 or more pages and you will see the phenomenon
code like this:
statsviz.NewServer(statsviz.TimeseriesPlot(func() statsviz.TimeSeriesPlot {
plot, _ := statsviz.TimeSeriesPlotConfig{
Name: "testCall",
Title: "testCall",
Type: statsviz.Scatter,
Series: []statsviz.TimeSeries{{
Name: "call",
GetValue: func() float64 {
println("call",time.Now().Format(time.DateTime))
return float64(0)
},
}},
}.Build()
return plot
}()))
Here's the log with 3 pages opened