Bryan Boreham
95fc032a61
scrape: add benchmark for TargetsFromGroup
...
`loadConfiguration` is made more general.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2 years ago
Bryan Boreham
ff993b279a
Merge pull request #12073 from bboreham/slices-sort2
...
labels: use slices.Sort for better performance
2 years ago
Bryan Boreham
99b3961907
Merge pull request #12072 from bboreham/stringlabels-builder-size
...
labels-as-strings: size buffer for added labels
2 years ago
Bryan Boreham
38c6d3da9f
labels: use slices.Sort for better performance
...
The difference is modest, but we've used `slices.Sort` in lots of other
places so why not here.
name old time/op new time/op delta
Builder 1.04µs ± 3% 0.95µs ± 3% -8.27% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
Builder 312B ± 0% 288B ± 0% -7.69% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
Builder 2.00 ± 0% 1.00 ± 0% -50.00% (p=0.008 n=5+5)
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2 years ago
Bryan Boreham
a07a0be024
Add benchmark for labels.Builder
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2 years ago
Bryan Boreham
30297f0d9b
stringlabels: size buffer for added labels
...
This makes the buffer the correct size for the common case that labels
have only been added. It will be too large for the case that labels are
changed, but the current buffer resize logic in `appendLabelTo` doubles
the buffer, so a small over-estimate is better.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2 years ago
Julien Pivotto
d437f0bb6b
Merge pull request #12039 from prometheus/dependabot/go_modules/go.uber.org/goleak-1.2.1
...
build(deps): bump go.uber.org/goleak from 1.2.0 to 1.2.1
2 years ago
Julien Pivotto
ac9b52db91
Merge pull request #12043 from prometheus/dependabot/go_modules/documentation/examples/remote_storage/github.com/stretchr/testify-1.8.2
...
build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /documentation/examples/remote_storage
2 years ago
Julien Pivotto
f35ac7929d
Merge pull request #12002 from hanjm/fix/jimmiehan-fix-scrape_pool_target_limit-metric
...
scrape: fix prometheus_target_scrape_pool_target_limit metric not set on creating scrape pool
2 years ago
Julien Pivotto
64f07cb887
Merge pull request #12065 from roidelapluie/svg-logo-direct
...
Directly include SVG logo in the page.
2 years ago
Julien Pivotto
631c2e9381
Merge pull request #12057 from hdost/add-parser-documentation
...
promql: Add a Makefile target for goyacc
2 years ago
Harold Dost
ba1918b6d3
promql: Add a Makefile target for goyacc
...
* Add documentation for goyacc as relevant
* Ignore the y.output since it's not needed for build process.
Signed-off-by: Harold Dost <h.dost@criteo.com>
2 years ago
Julien Pivotto
d2f5fdd17e
Merge pull request #12058 from Dup4/fix-typo
...
chore: fix ignore file_name
2 years ago
Julien Pivotto
aeb44cd15a
Merge pull request #11984 from jonatan-ivanov/exemplars-for-all-time-series
...
Add Exemplars support for all time series
2 years ago
Dup4
adac7bcd1e
chore: fix ignore file_name
...
Signed-off-by: Dup4 <lyuzhi.pan@gmail.com>
2 years ago
Jonatan Ivanov
9225d118dc
Add Exemplars support for all time series
...
This change removes restrictions to allow adding exemplars
to all time series. It also contains some improvements in test values
so that it is easier to track what is tested.
The advantage of doing this is having a little less error-prone tests:
"yy" is not really descriptive but "counter-test" can give people
a better idea about what is tested so it is harder to make mistakes.
Closes gh-11982
Signed-off-by: Jonatan Ivanov <jonatan.ivanov@gmail.com>
2 years ago
Julien Pivotto
8e4350dd59
Directly include SVG logo in the page.
...
Use HTML <svg> element to include Prometheus logo in the status page.
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2 years ago
ansalamdaniel
c1c444504e
Feat: metrics for head_chunks & wal folders ( #12013 )
...
Signed-off-by: ansalamdaniel <ansalam.daniel@infracloud.io>
2 years ago
dependabot[bot]
59cc7389fa
build(deps): bump github.com/stretchr/testify
...
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify ) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases )
- [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2 )
---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
dependabot[bot]
e1a6e6faa6
build(deps): bump go.uber.org/goleak from 1.2.0 to 1.2.1
...
Bumps [go.uber.org/goleak](https://github.com/uber-go/goleak ) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/uber-go/goleak/releases )
- [Changelog](https://github.com/uber-go/goleak/blob/master/CHANGELOG.md )
- [Commits](https://github.com/uber-go/goleak/compare/v1.2.0...v1.2.1 )
---
updated-dependencies:
- dependency-name: go.uber.org/goleak
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
Rens Groothuijsen
d33eb3ab17
Automatically remove incorrect snapshot with index that is ahead of WAL ( #11859 )
...
Signed-off-by: Rens Groothuijsen <l.groothuijsen@alumni.maastrichtuniversity.nl>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2 years ago
Renning Bruns
5ec1b4baaf
make hashmod a lot easier to read and a little faster ( #11551 )
...
Previous code was effectively doing BigEndian.Uint64, so call that and save time.
An md5.Sum result is always 16 bytes. The first 8 are not used in the result, just as before.
Signed-off-by: Renning Bruns <ren@renmail.net>
2 years ago
dependabot[bot]
53bb046d21
build(deps): bump github.com/aws/aws-sdk-go from 1.44.187 to 1.44.207 ( #12015 )
...
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go ) from 1.44.187 to 1.44.207.
- [Release notes](https://github.com/aws/aws-sdk-go/releases )
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.187...v1.44.207 )
---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
Bartlomiej Plotka
8f3b2fc9ae
Merge pull request #12020 from amrmahdi/amrh/GHSA-vvpx-j8f3-3w6h
...
Update golang.org/x/net to v0.7.0 ato address GHSA-vvpx-j8f3-3w6h
2 years ago
Amr Hanafi (MAHDI))
4126985908
Update golang.org/x/net to v0.7.0 ato address GHSA-vvpx-j8f3-3w6h
...
https://github.com/advisories/GHSA-vvpx-j8f3-3w6h
Signed-off-by: Amr Hanafi (MAHDI)) <amrh@microsoft.com>
2 years ago
Bryan Boreham
35026fb26d
Merge pull request #11746 from prometheus/remove-microbenchmarks
...
These benchmarks were testing things related to what Prometheus does, but not testing actual Prometheus code.
Moved the label-copying benchmark into the labels package.
2 years ago
Julien Pivotto
475f9984d0
Merge pull request #11787 from damnever/perf/avoid-alloc-if-no-externallabels
...
Avoid allocation during remote write if external labels is empty
2 years ago
Julien Pivotto
46f9c34d90
Merge pull request #11770 from prometheus/nexucis/fix-bump-ui-version
...
fix ui bump version on mac
2 years ago
Levi Harrison
64ff6bece6
Merge pull request #11682 from dgrisonnet/parsing-errors
...
Improve the Prometheus parser error outputs to be more comprehensive
2 years ago
Julien Pivotto
666f61a4d5
Merge pull request #10991 from bboreham/labels-as-string
...
labels.Labels: reduce memory by storing as a single string
2 years ago
Bryan Boreham
f03b8d0968
Add benchmark copying labels
...
Taken from previous tsdb/test/BenchmarkLabelsClone.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2 years ago
Bryan Boreham
f34b2cede3
Remove microbenchmarks
...
These benchmarks are all testing things related to what Prometheus does,
so perhaps have some historical interest, but we should not retain them
in the main repo.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2 years ago
Damien Grisonnet
0fee615719
model/textparse: improve openmetrics error outputs
...
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2 years ago
Bryan Boreham
4a49ec3a25
CI: additionally run tests with 'stringlabel' tag
...
This checks that no code is assuming things about `labels.Labels` which
don't work with the alternate implementation.
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2 years ago
Bryan Boreham
6136ae67e0
labels: shrink by making internals a single string
...
This commit adds an alternate implementation for `labels.Labels`, behind
a build tag `stringlabels`.
Instead of storing label names and values as individual strings, they
are all concatenated into one string in this format:
[len][name0][len][value0][len][name1][len][value1]...
The lengths are varint encoded so usually a single byte.
The previous `[]string` had 24 bytes of overhead for the slice and 16
for each label name and value; this one has 16 bytes overhead plus 1
for each name and value.
In `ScratchBuilder.Overwrite` and `Labels.Hash` we use an unsafe
conversion from string to byte slice. `Overwrite` is explicitly unsafe,
but for `Hash` this is a pure performance hack.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2 years ago
Bryan Boreham
3f7ba22bde
rules: two places need to call EmptyLabels
...
Can't assume nil is a valid value.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2 years ago
Ganesh Vernekar
66da1d51fd
Merge pull request #12003 from codesome/redundant-chunk-access
...
Remove unnecessary chunk fetch in Head queries
2 years ago
Ganesh Vernekar
d504c950a2
Remove unnecessary chunk fetch in Head queries
...
`safeChunk` is only obtained from the `headChunkReader.Chunk` call where
the chunk is already fetched and stored with the `safeChunk`. So, when
getting the iterator for the `safeChunk`, we don't need to get the chunk again.
Also removed a couple of unnecessary fields from `safeChunk` as a part of this.
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2 years ago
Ganesh Vernekar
bfcf69b4a4
Merge pull request #12004 from vishalnad/main
...
Observe delta in seconds prometheus_tsdb_sample_ooo_delta
2 years ago
Vishal N
96ba6831ae
Observe delta in seconds prometheus_tsdb_sample_ooo_delta
...
Signed-off-by: Vishal Nadagouda <vishalmn1996@gmail.com>
2 years ago
Jimmie Han
a13249a98f
scrape: fix prometheus_target_scrape_pool_target_limit metric not set on creating scrape pool ( #12001 )
...
Signed-off-by: Jimmie Han <hanjinming@outlook.com>
2 years ago
Ben Kochie
86d3d5fec6
Merge pull request #11993 from prometheus/superq/bump_golangci-lint
...
Update golangci-lint
2 years ago
SuperQ
65e743719c
Update golangci-lint
...
Update to the latest release, supports Go 1.20.
Signed-off-by: SuperQ <superq@gmail.com>
2 years ago
Shan Aminzadeh
3f6f5d3357
Scope GroupBy labels to metric ( #11914 )
...
Signed-off-by: Shan Aminzadeh <shan.aminzadeh@chronosphere.io>
2 years ago
dependabot[bot]
2d588725c1
build(deps): bump bufbuild/buf-setup-action from 1.12.0 to 1.13.1 ( #11922 )
...
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action ) from 1.12.0 to 1.13.1.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases )
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.12.0...v1.13.1 )
---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
dependabot[bot]
94e0801f9f
build(deps): bump actions/cache from 3.2.3 to 3.2.4 ( #11920 )
...
Bumps [actions/cache](https://github.com/actions/cache ) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/actions/cache/releases )
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md )
- [Commits](https://github.com/actions/cache/compare/v3.2.3...v3.2.4 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
dependabot[bot]
bb18bb3d1f
build(deps): bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 ( #11921 )
...
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action ) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases )
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.1...v3.4.0 )
---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
Julien Pivotto
259bb5c692
Merge pull request #11826 from dannykopping/dannykopping/rule-eval
...
Pass rule details in evaluation context
2 years ago
Julien Pivotto
e1679a80f3
Merge pull request #11936 from kelnage/sanitize-labels-edge-cases
...
Fix SanitizeLabelName for certain edge case invalid labels
2 years ago
Julien Pivotto
8a8f594b16
Merge pull request #11487 from FUSAKLA/fus-promtool-http-config
...
Promtool: add http config support to query commands
2 years ago