mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-23 08:56:31 +01:00
162 lines
6.8 KiB
Go
162 lines
6.8 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/querytracer"
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/storage"
|
|
)
|
|
|
|
// TSDBStatusResponse generates response for /api/v1/status/tsdb .
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
import (
|
|
qtio422016 "io"
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
)
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
var (
|
|
_ = qtio422016.Copy
|
|
_ = qt422016.AcquireByteBuffer
|
|
)
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
func StreamTSDBStatusResponse(qw422016 *qt422016.Writer, isPartial bool, status *storage.TSDBStatus, qt *querytracer.Tracer) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:8
|
|
qw422016.N().S(`{"status":"success","isPartial":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:11
|
|
if isPartial {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:11
|
|
qw422016.N().S(`true`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:11
|
|
} else {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:11
|
|
qw422016.N().S(`false`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:11
|
|
}
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:11
|
|
qw422016.N().S(`,"data":{"totalSeries":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:13
|
|
qw422016.N().DUL(status.TotalSeries)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:13
|
|
qw422016.N().S(`,"totalLabelValuePairs":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:14
|
|
qw422016.N().DUL(status.TotalLabelValuePairs)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:14
|
|
qw422016.N().S(`,"seriesCountByMetricName":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:15
|
|
streamtsdbStatusEntries(qw422016, status.SeriesCountByMetricName)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:15
|
|
qw422016.N().S(`,"seriesCountByLabelName":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:16
|
|
streamtsdbStatusEntries(qw422016, status.SeriesCountByLabelName)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:16
|
|
qw422016.N().S(`,"seriesCountByFocusLabelValue":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
streamtsdbStatusEntries(qw422016, status.SeriesCountByFocusLabelValue)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:17
|
|
qw422016.N().S(`,"seriesCountByLabelValuePair":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:18
|
|
streamtsdbStatusEntries(qw422016, status.SeriesCountByLabelValuePair)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:18
|
|
qw422016.N().S(`,"labelValueCountByLabelName":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:19
|
|
streamtsdbStatusEntries(qw422016, status.LabelValueCountByLabelName)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:19
|
|
qw422016.N().S(`}`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:21
|
|
qt.Done()
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:22
|
|
streamdumpQueryTrace(qw422016, qt)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:22
|
|
qw422016.N().S(`}`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
func WriteTSDBStatusResponse(qq422016 qtio422016.Writer, isPartial bool, status *storage.TSDBStatus, qt *querytracer.Tracer) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
StreamTSDBStatusResponse(qw422016, isPartial, status, qt)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
func TSDBStatusResponse(isPartial bool, status *storage.TSDBStatus, qt *querytracer.Tracer) string {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
WriteTSDBStatusResponse(qb422016, isPartial, status, qt)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
qs422016 := string(qb422016.B)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
return qs422016
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:24
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:26
|
|
func streamtsdbStatusEntries(qw422016 *qt422016.Writer, a []storage.TopHeapEntry) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:26
|
|
qw422016.N().S(`[`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:28
|
|
for i, e := range a {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:28
|
|
qw422016.N().S(`{"name":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:30
|
|
qw422016.N().Q(e.Name)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:30
|
|
qw422016.N().S(`,"value":`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:31
|
|
qw422016.N().D(int(e.Count))
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:31
|
|
qw422016.N().S(`}`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:33
|
|
if i+1 < len(a) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:33
|
|
qw422016.N().S(`,`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:33
|
|
}
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:34
|
|
}
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:34
|
|
qw422016.N().S(`]`)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
func writetsdbStatusEntries(qq422016 qtio422016.Writer, a []storage.TopHeapEntry) {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
streamtsdbStatusEntries(qw422016, a)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
}
|
|
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
func tsdbStatusEntries(a []storage.TopHeapEntry) string {
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
writetsdbStatusEntries(qb422016, a)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
qs422016 := string(qb422016.B)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
return qs422016
|
|
//line app/vmselect/prometheus/tsdb_status_response.qtpl:36
|
|
}
|