grafana/pkg/promlib/testdata/range_simple.result.golden.jsonc
ismail simsek 3fb6319d1b
Prometheus: Introduce prometheus backend library (#83952)
* Move files to prometheus-library

* refactor core prometheus to use prometheus-library

* modify client transport options

* mock

* have a type

* import aliases

* rename

* call the right method

* remove unrelated test from the library

* update codeowners

* go work sync

* update go.work.sum

* make swagger-clean && make openapi3-gen

* add promlib to makefile

* remove clilogger

* Export the function

* update unit test

* add prometheus_test.go

* fix mock type

* use mapUtil from grafana-plugin-sdk-go
2024-03-11 17:22:33 +01:00

168 lines
6.0 KiB
Plaintext

// 🌟 This was machine generated. Do not edit. 🌟
//
// Frame[0] {
// "type": "timeseries-multi",
// "typeVersion": [
// 0,
// 0
// ],
// "custom": {
// "resultType": "matrix"
// },
// "executedQueryString": "Expr: \nStep: 1s"
// }
// Name: prometheus_http_requests_total{code="200", handler="/api/v1/query_range", job="prometheus"}
// Dimensions: 2 Fields by 3 Rows
// +-----------------------------------+--------------------------------------------------------------------------------------------------------+
// | Name: Time | Name: Value |
// | Labels: | Labels: __name__=prometheus_http_requests_total, code=200, handler=/api/v1/query_range, job=prometheus |
// | Type: []time.Time | Type: []float64 |
// +-----------------------------------+--------------------------------------------------------------------------------------------------------+
// | 2022-01-11 08:25:30.123 +0000 UTC | 21 |
// | 2022-01-11 08:25:31.123 +0000 UTC | 32 |
// | 2022-01-11 08:25:32.123 +0000 UTC | 43 |
// +-----------------------------------+--------------------------------------------------------------------------------------------------------+
//
//
//
// Frame[1] {
// "type": "timeseries-multi",
// "typeVersion": [
// 0,
// 0
// ],
// "custom": {
// "resultType": "matrix"
// }
// }
// Name: prometheus_http_requests_total{code="400", handler="/api/v1/query_range", job="prometheus"}
// Dimensions: 2 Fields by 2 Rows
// +-----------------------------------+--------------------------------------------------------------------------------------------------------+
// | Name: Time | Name: Value |
// | Labels: | Labels: __name__=prometheus_http_requests_total, code=400, handler=/api/v1/query_range, job=prometheus |
// | Type: []time.Time | Type: []float64 |
// +-----------------------------------+--------------------------------------------------------------------------------------------------------+
// | 2022-01-11 08:25:29.123 +0000 UTC | 54 |
// | 2022-01-11 08:25:32.123 +0000 UTC | 76 |
// +-----------------------------------+--------------------------------------------------------------------------------------------------------+
//
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {
"name": "prometheus_http_requests_total{code=\"200\", handler=\"/api/v1/query_range\", job=\"prometheus\"}",
"meta": {
"type": "timeseries-multi",
"typeVersion": [
0,
0
],
"custom": {
"resultType": "matrix"
},
"executedQueryString": "Expr: \nStep: 1s"
},
"fields": [
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"interval": 1000
}
},
{
"name": "Value",
"type": "number",
"typeInfo": {
"frame": "float64"
},
"labels": {
"__name__": "prometheus_http_requests_total",
"code": "200",
"handler": "/api/v1/query_range",
"job": "prometheus"
},
"config": {
"displayNameFromDS": "prometheus_http_requests_total{code=\"200\", handler=\"/api/v1/query_range\", job=\"prometheus\"}"
}
}
]
},
"data": {
"values": [
[
1641889530123,
1641889531123,
1641889532123
],
[
21,
32,
43
]
]
}
},
{
"schema": {
"name": "prometheus_http_requests_total{code=\"400\", handler=\"/api/v1/query_range\", job=\"prometheus\"}",
"meta": {
"type": "timeseries-multi",
"typeVersion": [
0,
0
],
"custom": {
"resultType": "matrix"
}
},
"fields": [
{
"name": "Time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"interval": 1000
}
},
{
"name": "Value",
"type": "number",
"typeInfo": {
"frame": "float64"
},
"labels": {
"__name__": "prometheus_http_requests_total",
"code": "400",
"handler": "/api/v1/query_range",
"job": "prometheus"
},
"config": {
"displayNameFromDS": "prometheus_http_requests_total{code=\"400\", handler=\"/api/v1/query_range\", job=\"prometheus\"}"
}
}
]
},
"data": {
"values": [
[
1641889529123,
1641889532123
],
[
54,
76
]
]
}
}
]
}