Hui Wang
b09272ccac
app/vmalert: improve performances when rules produce large volumes of results
...
1. Avoid storing the last evaluation results outside of rules, check for
stale time series as soon as possible;
2. remove duplicated template `Clone()`.
This pull request is primarily reducing memory usage when rules produce
large volumes of results, as seen in
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6894 .
The CPU time spent on garbage collection remains high and may be
addressed in a separate PR.
2024-11-14 12:23:39 +01:00
Hui Wang
4984e71da6
vmalert-tool: add more syntax checks for input_series
and exp_samples
( #7263 )
...
address https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7224 ,
allow using
```
exp_samples:
- labels: '{}'
```
for prometheus compatibility.
---------
Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>
2024-10-17 11:00:34 +02:00
Aliaksandr Valialkin
fc98b62760
lib/promutils, app/vmalert-tool/unittest: move promutils.Duration.ParseTime() to app/vmalert-tool/unittest.durationToTime()
...
The ParseTime() function looks strange, since it converts relative duration to absolute time since Unix Epoch.
In most scenarios such a conversion is used by mistake.
It is better to do not expose such a function for public use and hide it inside the package where it is needed,
e.g. inside app/vmalert-tool/unittest.
This is a follow-up for dc28196237
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2945
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/4789
2023-10-16 14:19:31 +02:00
Haleygo
dc28196237
vmalert-tool: implement unittest ( #4789 )
...
1. split package rule under /app/vmalert, expose needed objects
2. add vmalert-tool with unittest subcmd
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2945
2023-10-13 13:54:33 +02:00