From de252b30174dacbf21772b4d43ad12e94aebddd3 Mon Sep 17 00:00:00 2001 From: Michael Desa Date: Thu, 12 Mar 2020 15:33:46 -0700 Subject: [PATCH] fix(ui/src/alerting): reduce points per check from 300 to 100 This was done to reduce amount of data returned to the client. This is problematic when there are a large number of series that get returned from a query. Long term we will want to limit the topN tables so that this is not an issue. --- ui/src/alerting/utils/vis.test.ts | 6 +++--- ui/src/alerting/utils/vis.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/alerting/utils/vis.test.ts b/ui/src/alerting/utils/vis.test.ts index e1423102b6e..80793b22e29 100644 --- a/ui/src/alerting/utils/vis.test.ts +++ b/ui/src/alerting/utils/vis.test.ts @@ -2,13 +2,13 @@ import {getCheckVisTimeRange} from 'src/alerting/utils/vis' const duration = 'duration' as 'duration' const TESTS = [ - ['5s', {type: duration, lower: 'now() - 1500s', upper: null}], - ['1m', {type: duration, lower: 'now() - 300m', upper: null}], + ['5s', {type: duration, lower: 'now() - 500s', upper: null}], + ['1m', {type: duration, lower: 'now() - 100m', upper: null}], [ '1m5s', { type: duration, - lower: 'now() - 300m1500s', + lower: 'now() - 100m500s', upper: null, }, ], diff --git a/ui/src/alerting/utils/vis.ts b/ui/src/alerting/utils/vis.ts index d5dec502fdc..4a6b7474037 100644 --- a/ui/src/alerting/utils/vis.ts +++ b/ui/src/alerting/utils/vis.ts @@ -11,7 +11,7 @@ import {flatMap} from 'lodash' // Types import {Threshold, DurationTimeRange} from 'src/types' -const POINTS_PER_CHECK_PLOT = 300 +const POINTS_PER_CHECK_PLOT = 100 /* Given the duration in a check's `every` field, return a `TimeRange` suitable