Merge pull request #11706 from dannystaple/patch-1

Docs [unit-testing]: Add an explanation to the expanding notation
This commit is contained in:
Julien Pivotto 2022-12-21 09:21:12 +01:00 committed by GitHub
commit b2226258bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,14 +77,17 @@ series: <string>
# This uses expanding notation. # This uses expanding notation.
# Expanding notation: # Expanding notation:
# 'a+bxc' becomes 'a a+b a+(2*b) a+(3*b) … a+(c*b)' # 'a+bxc' becomes 'a a+b a+(2*b) a+(3*b) … a+(c*b)'
# Read this as series starts at a, then c further samples incrementing by b.
# 'a-bxc' becomes 'a a-b a-(2*b) a-(3*b) … a-(c*b)' # 'a-bxc' becomes 'a a-b a-(2*b) a-(3*b) … a-(c*b)'
# Read this as series starts at a, then c further samples decrementing by b (or incrementing by negative b).
# There are special values to indicate missing and stale samples: # There are special values to indicate missing and stale samples:
# '_' represents a missing sample from scrape # '_' represents a missing sample from scrape
# 'stale' indicates a stale sample # 'stale' indicates a stale sample
# Examples: # Examples:
# 1. '-2+4x3' becomes '-2 2 6 10' # 1. '-2+4x3' becomes '-2 2 6 10' - series starts at -2, then 3 further samples incrementing by 4.
# 2. ' 1-2x4' becomes '1 -1 -3 -5 -7' # 2. ' 1-2x4' becomes '1 -1 -3 -5 -7' - series starts at 1, then 4 further samples decrementing by 2.
# 3. ' 1 _x3 stale' becomes '1 _ _ _ stale' # 3. ' 1x4' becomes '1 1 1 1 1' - shorthand for '1+0x4', series starts at 1, then 4 further samples incrementing by 0.
# 4. ' 1 _x3 stale' becomes '1 _ _ _ stale' - the missing sample cannot increment, so 3 missing samples are produced by the '_x3' expression.
values: <string> values: <string>
``` ```