Adopt config to use policy based resampler configuration

Entire-Checkpoint: 7536f551d548
This commit is contained in:
2026-03-20 08:03:34 +01:00
parent 0069c86e81
commit 0c56591e4b
11 changed files with 139 additions and 112 deletions

View File

@@ -511,9 +511,9 @@ func (r *queryResolver) JobMetrics(ctx context.Context, id string, metrics []str
}
if resolution == nil {
if config.Keys.EnableResampling != nil {
defaultRes := slices.Max(config.Keys.EnableResampling.Resolutions)
resolution = &defaultRes
} else {
resolution = resolveResolutionFromDefaultPolicy(int64(job.Duration), job.Cluster, metrics)
}
if resolution == nil {
defaultRes := 0
resolution = &defaultRes
}
@@ -886,9 +886,9 @@ func (r *queryResolver) NodeMetricsList(ctx context.Context, cluster string, sub
}
if resolution == nil {
if config.Keys.EnableResampling != nil {
defaultRes := slices.Max(config.Keys.EnableResampling.Resolutions)
resolution = &defaultRes
} else {
resolution = resolveResolutionFromDefaultPolicy(duration, cluster, metrics)
}
if resolution == nil {
defaultRes := 0
resolution = &defaultRes
}