Skip to content

Commit

Permalink
fix(ui/src/alerting): reduce points per check from 300 to 100
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
desa committed Mar 13, 2020
1 parent 1ce19b5 commit de252b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ui/src/alerting/utils/vis.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
],
Expand Down
2 changes: 1 addition & 1 deletion ui/src/alerting/utils/vis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit de252b3

Please sign in to comment.