Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* internal/static: remove semantic-ui * internal/static: use bootstrap v5 * internal/static: remove semantic-ui accordion config * internal/static: create plots dynamically This is a first step towards a dynamic definition of the plots we show. For this we add a Plot javascript class, which we call to create/update plotly plots. * internal/static: move plotly config/layout options in Plot class * internal/static: extract plot data dynamically (no heatmap yet) * internal/static: do not repeat plot name in scatter tooltip * internal/static: Plot.extractData handle heatmaps * Cosmetics * internal/static: another step towards dynamic stats definition This time we're preparing to tackle the stats part, or -how to extract specific stats from the raw data and assign them to specific plots-. * internal/static: split Plot configuration and creation This is necessary since the application is going to need to access (in stats.js) to the plots configuration before the plots are created. * internal/static: use dynamic plot definition in stats.js At this point, the only non-dynamic (as in non-externally configurable) point is the 'datapath' field. That's for now a function in the plot definition object where we map our raw stats object to a data point. Eventually, this won't be necessary since this will all be defined in Go. * internal/static: minor plot config adjustements, cosmetics * internal/static: in stats.js remove dead code and cosmetics * internal/static: improve ws error messages * internal/static: simplify plot discovery by storing them in a map * internal/static: fix reconnect bug: replace plots, don't add new ones * internal/static: move ui.js stuff into app.js and remove file * Cosmetics * internal/static: create plots with no data This will simplify the mini websocket-based protocol we'll have, breaking down a single do-it-all message into 2, one for the desired plots configuration - the 'init' message- and the 'data' message, that will just contain the data. * internal/static: big data rework, dynamic shapes * internal/static: move lastGC time conversion upwards Upwards, as in: closer to Go, where all data processing will eventually be performed. * internal/static: remove Plot.name() * internal/static: simplify Plot._extractData() * Generate plot definitions from Go template * s/ioutil/io * Add an atomic float64 type * internal/static: use generated plot definitions * all: milestone! plots are dynamically defined now! For now we're still plotting runtime.MemStats though * Add plot def/values for size classes heatmap * All: code cleaning after switch to generated plot defs * internal/static: bump plotly to 2.12.1 * Use runtime/metrics * all: internal/static: add tippy+popper * all: fixed/clean heatmaps with custom tooltips * Clean up definitions, split heap into heap{global,details} * _example: make goroutines count vary * internal/static: handle 'bar' plots * Convert to 'bar' and improve units in 'live objects/bytes' * More way to specify trace color. Change colors for bar plots * internal/static: use hovermode: 'x' on all but heatmaps * internal/static: link to runtime/metrics instead of Memstats * internal/static: improve plot title style * Resolve TODO in downsampleBucket * internal/static: remove refs to hoverinfo * internal/static: extend container width and place 3 plots per row. * internal/static: improve heatmap toolip - Show heatmap tooltip as a table (css). - Cleanup code installing the tooltip callbacks. * Remove unused settings in plotdef.go (TickFormat and DTick) * Improve heatmap title and axis * internal/static: cleanup Plot documentation * Ensure plot defs are always created When the Go process stops, the web UI tries to reconnect to the websocket endpoint periodically. When we start a new Go process 'plotdefs' won't be called since the web UI already has all files. On the Go side, we initialize the plot definitions when we establish the wsebsocket connection. We protect plotdefs with sync.Once to avoid concurrent accesses. * Remove subplot hover (duplicate with subplot name) * internal/static: make page larger, up to 3 plots * internal/static: show buckets intervals in heatmaps tooltips * internal/static: simplify calling createEventShape * internal/static: move createHorizontalLines to plot.js * internal/static: cosmetics * internal/static: use a grid-template css grid * internal/static: fix 'bad time formatting' warning startup * internal/static: cosmetics * internal/plot: move definitions in internal package * all: simplify plot def structures * Remove some useless color types * Simplify plot definitions * Refactor: each plot gets its own constructor function * internal/static: rename file * internal/plot: s/Definition/Config * Refactor: declare and use plotdef interface * internal/static: cosmetics change on plot titles * all: events are shown as vertical lines, not horizontal Garbage collection were indeed shown correctly as vertical lines, but they've always been described as being horizontal. Fix this once and for all I hope :-p * Wrap metrics/plots handling in plotList * internal/plot: move plot-related types there * internal/plot: pre-allocate sizeClasses slice * internal/plot: move down-sampling tests there * internal/plot: downsampleCounts allows for pre-allocated slice * Fix data race when multiple websocket tries to connect Protect calls to List.Values with a mutex. Also, to avoid having to copy the buffers, change List.Values() to List.WriteValues(w io.Writer). WriteValues now directly writes values converted to JSON into w, so that it's not necessary to copy internal buffers anymore. * internal/plot: move stuff * internal/plot: move and rename stuff * internal/plot: move and rename stuff * internal/plot: merge List and allMetrics * Move plot.List global variable to top-level package * Fix testIndex Before, the plots shown on the web page were statically defined. In testIndex, we can't look anymore for a string containing a plot title. Instead, just look for id="plots" which is the id of the <div> where plots are dynamically inserted. * Fix testWs Before, the data sent via websocket was static. Now that the set of plots is dynamic, it would be overkill to exhaustively check all time series and heatmaps we send, plus that varies from one go version to another. Instead, check that we receive 2 data points which presence are likely guarantee: - a time series: the number of goroutines - the 'size classes' heatmap * _example: rework integration tests, use testscript * _example: convert default, echo and chi examples to testscript * _example: remove debug print in work.go * _example: convert fasthttp to testscript * _example: convert fiber to testscript * _example: convert gin to testscript * _example: convert gorilla to testscript * _example: convert https to testscript * _example: convert iris to testscript * _example: convert middleware to testscript * _example: convert mux to testscript * _example: convert options to testscript * _example/testdata: cosmetics * ci: disable TestExamples verbosity * internal/plot: UnixMilli doesn't exist in go1.16 * go mod tidy * Bump minimal Go version to 1.17 * README.md: details about Go version * internal/plot: use UnixMilli (go1.17+) * ci: run go mod tidy before testing examples * ci: switch to checkout and setup-go action v3 * ci: test examples only on latest go * _example: fix iris dependabot alert (not statsviz-related) * _example: change server port on fiber example * add Test_hijack * internal/static: add modebar button showing plot info in tooltip * internal/plot: fill infoText for all plots * internal/plot+static: fix y axis ticks for heatmaps * Improve handlers tests * internal: Go-side timestamp rather than javascript * internal/plot: add CGO calls plot * internal/static: fix bad heatmaps yaxis on restarts * internal/plot: add gc stack size plot * internal/static: always show full time range on x axis * internal/static: disable zoom/drag on plots * internal/static: add font-awesome and bootstrap-toggle * internal/static: add play/pause, show/hide GC and time range * internal/static: reorganize static file tree * internal/static: improve plot title cosmetics * internal/plot: cosmetics * internal/plot: add new plot: goroutine scheduling events * internal: cosmetic ui improvement * Revert "Add an atomic float64 type" This reverts commit 9d6be37. * Update CHANGELOG.md and README.md * internal/plot: merge list.go in plots.go * internal/plot: homogenize plot names * Rework README.md * Update CHANGELOG.md * Fix TestRegister * internal/static: use broom icon instead of trashcan for GC lines * README.md: improve documentation section * internal/plot: improve plot info text style * .github: use codecov-action for coverage * codecov.yml: make coverage informational * Update README.md * Update README.md * Update CONTRIBUTING.md
- Loading branch information