diff --git a/promql/functions.go b/promql/functions.go index 8e9e6f9654..d481cb7358 100644 --- a/promql/functions.go +++ b/promql/functions.go @@ -302,7 +302,7 @@ func funcHoltWinters(vals []parser.Value, args parser.Expressions, enh *EvalNode // The trend factor argument. tf := vals[2].(Vector)[0].V - // Sanity check the input. + // Check that the input parameters are valid. if sf <= 0 || sf >= 1 { panic(fmt.Errorf("invalid smoothing factor. Expected: 0 < sf < 1, got: %f", sf)) } diff --git a/promql/parser/parse.go b/promql/parser/parse.go index 7a0e48464b..6c37ce6fc6 100644 --- a/promql/parser/parse.go +++ b/promql/parser/parse.go @@ -432,7 +432,7 @@ func (p *parser) expectType(node Node, want ValueType, context string) { } } -// checkAST checks the sanity of the provided AST. This includes type checking. +// checkAST checks the validity of the provided AST. This includes type checking. func (p *parser) checkAST(node Node) (typ ValueType) { // For expressions the type is determined by their Type function. // Lists do not have a type but are not invalid either. diff --git a/promql/test.go b/promql/test.go index 41526ccdc5..ab2a159c4e 100644 --- a/promql/test.go +++ b/promql/test.go @@ -491,8 +491,8 @@ func atModifierTestCases(exprStr string, evalTime time.Time) ([]atModifierTestCa }) if containsNonStepInvariant { - // Since there is a step invariant function, we cannot automatically - // generate step invariant test cases for it sanely. + // Expression contains a function whose result can vary with evaluation + // time, even though its arguments are step invariant: skip it. return nil, nil } diff --git a/tsdb/agent/db.go b/tsdb/agent/db.go index 9574c4b8a0..0675d5a287 100644 --- a/tsdb/agent/db.go +++ b/tsdb/agent/db.go @@ -77,7 +77,7 @@ type Options struct { NoLockfile bool } -// DefaultOptions used for the WAL storage. They are sane for setups using +// DefaultOptions used for the WAL storage. They are reasonable for setups using // millisecond-precision timestamps. func DefaultOptions() *Options { return &Options{ diff --git a/tsdb/db.go b/tsdb/db.go index d18f4fee63..7a165e431b 100644 --- a/tsdb/db.go +++ b/tsdb/db.go @@ -66,7 +66,7 @@ const ( // ErrNotReady is returned if the underlying storage is not ready yet. var ErrNotReady = errors.New("TSDB not ready") -// DefaultOptions used for the DB. They are sane for setups using +// DefaultOptions used for the DB. They are reasonable for setups using // millisecond precision timestamps. func DefaultOptions() *Options { return &Options{ diff --git a/tsdb/head_append.go b/tsdb/head_append.go index 8de71114fb..d5003188d2 100644 --- a/tsdb/head_append.go +++ b/tsdb/head_append.go @@ -440,7 +440,7 @@ func (s *memSeries) appendableHistogram(t int64, h *histogram.Histogram) error { } // AppendExemplar for headAppender assumes the series ref already exists, and so it doesn't -// use getOrCreate or make any of the lset sanity checks that Append does. +// use getOrCreate or make any of the lset validity checks that Append does. func (a *headAppender) AppendExemplar(ref storage.SeriesRef, lset labels.Labels, e exemplar.Exemplar) (storage.SeriesRef, error) { // Check if exemplar storage is enabled. if !a.head.opts.EnableExemplarStorage || a.head.opts.MaxExemplars.Load() <= 0 { diff --git a/web/ui/react-app/src/utils/utils.test.ts b/web/ui/react-app/src/utils/utils.test.ts index 99a72d7b83..4db3e28a64 100644 --- a/web/ui/react-app/src/utils/utils.test.ts +++ b/web/ui/react-app/src/utils/utils.test.ts @@ -190,7 +190,7 @@ describe('Utils', () => { it('renders never for pre-beginning-of-time strings', () => { expect(formatRelative('0001-01-01T00:00:00Z', now())).toEqual('Never'); }); - it('renders a humanized duration for sane durations', () => { + it('renders a humanized duration for durations', () => { expect(formatRelative('2019-11-04T09:15:29.578701-07:00', parseTime('2019-11-04T09:15:35.8701-07:00'))).toEqual( '6.292s ago' );