a4d98e465f
Chore: Remove dataplane as option from prom converter ( #102320 )
...
remove dataplane as option from prom converter
2025-03-18 13:10:22 +01:00
dcba71a0b0
Prometheus: Improve native histogram response parsing performance ( #102024 )
...
* introduce tests
* improve allocation by %61
* ~%27 improvement
goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/promlib/converter
cpu: Apple M1 Pro
│ pmem.0.txt │ pmem.2.txt │
│ sec/op │ sec/op vs base │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10 117.72µ ± 6% 82.90µ ± 4% -29.57% (p=0.002 n=6)
│ pmem.0.txt │ pmem.2.txt │
│ B/op │ B/op vs base │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10 104.34Ki ± 0% 76.09Ki ± 0% -27.08% (p=0.002 n=6)
│ pmem.0.txt │ pmem.2.txt │
│ allocs/op │ allocs/op vs base │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10 2463.0 ± 0% 899.0 ± 0% -63.50% (p=0.002 n=6)
* add more tests
* remove comment lines
* read string as slice to prevent type conversion
* golang lint
* revert appendValueFromString improvement
* fix merging issues
* improve native histogram response parsing
2025-03-12 14:12:24 +01:00
f64be062c4
Prometheus: Improve response parser performance ( #101517 )
...
* introduce tests
* improve allocation by %61
* ~%27 improvement
goos: darwin
goarch: arm64
pkg: github.com/grafana/grafana/pkg/promlib/converter
cpu: Apple M1 Pro
│ pmem.0.txt │ pmem.2.txt │
│ sec/op │ sec/op vs base │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10 117.72µ ± 6% 82.90µ ± 4% -29.57% (p=0.002 n=6)
│ pmem.0.txt │ pmem.2.txt │
│ B/op │ B/op vs base │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10 104.34Ki ± 0% 76.09Ki ± 0% -27.08% (p=0.002 n=6)
│ pmem.0.txt │ pmem.2.txt │
│ allocs/op │ allocs/op vs base │
ReadPrometheusStyleResult_FromFile/prom-query-range.json-10 2463.0 ± 0% 899.0 ± 0% -63.50% (p=0.002 n=6)
* add more tests
* remove comment lines
* read string as slice to prevent type conversion
* golang lint
* revert appendValueFromString improvement
* fix merging issues
2025-03-12 13:16:19 +01:00
dacb25ec2a
Prometheus: Add labels to all native histogram fields ( #101812 )
...
add labels to all histogram fields
2025-03-12 12:34:23 +01:00
6b227bb374
Prometheus: Handle non-json errors in a better way ( #99342 )
...
* handle json errors in a better way
* update comments
* update unit tests
* Update pkg/promlib/converter/prom.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/promlib/querydata/response_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/promlib/querydata/response_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/promlib/querydata/response_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* update import
---------
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2025-01-23 18:05:23 +01:00
d3a27a8c73
Chore: Remove redundant test files ( #99293 )
...
remove redundant test files
2025-01-21 07:17:38 +03:00
5a2315dabf
Plugins: Capture error source from grpc status errors ( #97471 )
...
* capture errorsource from grpc error
* apply PR feedback
* update comment
* update comment
* use SDK logic
* update SDK commit
* update sdk
* update golden files
2025-01-08 17:05:28 +00:00
e3e51f6e3b
Prometheus datasource: Show info annotations in the UI ( #97978 )
...
* Show info annotations from Prometheus datasources in the UI
* Add test data for backend
2025-01-03 20:09:19 +01:00
0d60a026e9
Chore: Use slices from standard library in promlib ( #98350 )
...
use slices from standard library
2025-01-02 17:24:17 +01:00
297ccfc52c
Prometheus: Show notice when there is no data ( #93936 )
...
Show notice when there is no data
2024-11-05 08:25:28 +01:00
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