* 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
promlib
Prometheus Library (a.k.a. promlib) is the foundation of the Grafana Prometheus data source backend.
How to tag/version?
- Checkout the commit you want to tag (
git checkout <COMMIT_SHA>) - Run
git tag pkg/promlib/<VERSION>(For examplegit tag pkg/promlib/v0.0.12)- NOTE: We're using Lightweight Tags, so no other options are required
- Run
git push origin pkg/promlib/<VERSION> - Verify that the tag was created successfully here
- DO NOT RELEASE anything! Tagging is enough.
- After tagging and waiting 5-10 minutes for go module registry to catch up just bump the
promlibversion ongrafana/grafana- Bumping the version on
grafana/grafanais not necessary asgrafana/grafanais using the local version of it always. - But it is a good practice to do it.
- Bumping the version on