mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 16:30:55 +01:00
f2754c3e90
* Cardinality explorer * vmui, vmselect: updated field name, added description to spinner * make vmui-update * updated const name, make vmui-update * lib/storage: changes calculation for totalSeries values * added static files * wip * wip * wip * wip * docs/CHANGELOG.md: document cardinality explorer feature See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2233 Co-authored-by: f41gh7 <nik@victoriametrics.com> Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
144 lines
6.0 KiB
Go
144 lines
6.0 KiB
Go
// Code generated by qtc from "tsdb_status_response.qtpl". DO NOT EDIT.
|
|
// See https://github.com/valyala/quicktemplate for details.
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:1
|
|
package prometheus
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:1
|
|
import "github.com/VictoriaMetrics/VictoriaMetrics/lib/storage"
|
|
|
|
// TSDBStatusResponse generates response for /api/v1/status/tsdb .
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:5
|
|
import (
|
|
qtio422016 "io"
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
)
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:5
|
|
var (
|
|
_ = qtio422016.Copy
|
|
_ = qt422016.AcquireByteBuffer
|
|
)
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:5
|
|
func StreamTSDBStatusResponse(qw422016 *qt422016.Writer, isPartial bool, status *storage.TSDBStatus) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:5
|
|
qw422016.N().S(`{"status":"success","isPartial":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
if isPartial {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
qw422016.N().S(`true`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
} else {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
qw422016.N().S(`false`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
}
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
qw422016.N().S(`,"data":{"totalSeries":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:10
|
|
qw422016.N().DUL(status.TotalSeries)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:10
|
|
qw422016.N().S(`,"totalLabelValuePairs":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:11
|
|
qw422016.N().DUL(status.TotalLabelValuePairs)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:11
|
|
qw422016.N().S(`,"seriesCountByMetricName":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:12
|
|
streamtsdbStatusEntries(qw422016, status.SeriesCountByMetricName)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:12
|
|
qw422016.N().S(`,"seriesCountByLabelValuePair":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:13
|
|
streamtsdbStatusEntries(qw422016, status.SeriesCountByLabelValuePair)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:13
|
|
qw422016.N().S(`,"labelValueCountByLabelName":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:14
|
|
streamtsdbStatusEntries(qw422016, status.LabelValueCountByLabelName)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:14
|
|
qw422016.N().S(`}}`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
func WriteTSDBStatusResponse(qq422016 qtio422016.Writer, isPartial bool, status *storage.TSDBStatus) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
StreamTSDBStatusResponse(qw422016, isPartial, status)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
func TSDBStatusResponse(isPartial bool, status *storage.TSDBStatus) string {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
WriteTSDBStatusResponse(qb422016, isPartial, status)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
qs422016 := string(qb422016.B)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
return qs422016
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:19
|
|
func streamtsdbStatusEntries(qw422016 *qt422016.Writer, a []storage.TopHeapEntry) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:19
|
|
qw422016.N().S(`[`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:21
|
|
for i, e := range a {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:21
|
|
qw422016.N().S(`{"name":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:23
|
|
qw422016.N().Q(e.Name)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:23
|
|
qw422016.N().S(`,"value":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
qw422016.N().D(int(e.Count))
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
qw422016.N().S(`}`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:26
|
|
if i+1 < len(a) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:26
|
|
qw422016.N().S(`,`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:26
|
|
}
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:27
|
|
}
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:27
|
|
qw422016.N().S(`]`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
func writetsdbStatusEntries(qq422016 qtio422016.Writer, a []storage.TopHeapEntry) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
streamtsdbStatusEntries(qw422016, a)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
func tsdbStatusEntries(a []storage.TopHeapEntry) string {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
writetsdbStatusEntries(qb422016, a)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
qs422016 := string(qb422016.B)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
return qs422016
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:29
|
|
}
|