Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move new labels as string to their own build tag #1

Open
wants to merge 2 commits into
base: labels-as-string
Choose a base branch
from

Conversation

roidelapluie
Copy link

No description provided.

bboreham and others added 2 commits January 17, 2023 09:55
Format is:

    [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 `SimpleBuilder.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 <[email protected]>
@bboreham bboreham force-pushed the labels-as-string branch 2 times, most recently from ae3e93c to 4a49ec3 Compare February 22, 2023 15:34
bboreham pushed a commit that referenced this pull request Jun 4, 2024
…4061)

* [PATCH] Allow having evaluation delay for rule groups

Signed-off-by: Ganesh Vernekar <[email protected]>

* [PATCH] Fix lint

Signed-off-by: Ganesh Vernekar <[email protected]>

* [PATCH] Move the option to ManagerOptions

Signed-off-by: Ganesh Vernekar <[email protected]>

* [PATCH] Include evaluation_delay in the group config

Signed-off-by: Ganesh Vernekar <[email protected]>

* Fix comments

Signed-off-by: gotjosh <[email protected]>

* Add a server configuration option.

Signed-off-by: gotjosh <[email protected]>

* Appease the linter #1

Signed-off-by: gotjosh <[email protected]>

* Add the new server flag documentation

Signed-off-by: gotjosh <[email protected]>

* Improve documentation of the new flag and configuration

Signed-off-by: gotjosh <[email protected]>

* Use named parameters for clarity on the `Rule` interface

Signed-off-by: gotjosh <[email protected]>

* Add `initial` to the flag help

Signed-off-by: gotjosh <[email protected]>

* Change the CHANGELOG area from `ruler` to `rules`

Signed-off-by: gotjosh <[email protected]>

* Rename evaluation_delay to `rule_query_offset`/`query_offset` and make it a global configuration option.

Signed-off-by: gotjosh <[email protected]>

E Your branch is up to date with 'origin/gotjosh/evaluation-delay'.

* more docs

Signed-off-by: gotjosh <[email protected]>

* Improve wording on CHANGELOG

Signed-off-by: gotjosh <[email protected]>

* Add `RuleQueryOffset` to the default config in tests in case it changes

Signed-off-by: gotjosh <[email protected]>

* Update docs/configuration/recording_rules.md

Co-authored-by: Julius Volz <[email protected]>
Signed-off-by: gotjosh <[email protected]>

* Rename `RuleQueryOffset` to `QueryOffset` when in the group context.

Signed-off-by: gotjosh <[email protected]>

* Improve docstring and documentation on the `rule_query_offset`

Signed-off-by: gotjosh <[email protected]>

---------

Signed-off-by: Ganesh Vernekar <[email protected]>
Signed-off-by: gotjosh <[email protected]>
Co-authored-by: Ganesh Vernekar <[email protected]>
Co-authored-by: Julius Volz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants