From 6e9a916a18e576a7f79d9dd45c7fefe32173d487 Mon Sep 17 00:00:00 2001 From: Lou Knauer Date: Thu, 7 Apr 2022 12:28:09 +0200 Subject: [PATCH] Update frontend --- frontend | 2 +- metricdata/metricdata.go | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend b/frontend index 3f3d1fa..e8d82a0 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit 3f3d1fac6b2ea88964ba357ad35688e204d82037 +Subproject commit e8d82a00a4215457a57735c7d7db7076daca5643 diff --git a/metricdata/metricdata.go b/metricdata/metricdata.go index 9d47664..24b44bc 100644 --- a/metricdata/metricdata.go +++ b/metricdata/metricdata.go @@ -66,7 +66,7 @@ func Init(jobArchivePath string, disableArchive bool) error { return nil } -var cache *lrucache.Cache = lrucache.New(512 * 1024 * 1024) +var cache *lrucache.Cache = lrucache.New(128 * 1024 * 1024) // Fetches the metric data for a job. func LoadData(job *schema.Job, metrics []string, scopes []schema.MetricScope, ctx context.Context) (schema.JobData, error) { @@ -126,7 +126,10 @@ func LoadData(job *schema.Job, metrics []string, scopes []schema.MetricScope, ct subset[scope] = jm } } - perscope = subset + + if len(subset) > 0 { + perscope = subset + } } res[metric] = perscope