You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* TDD config range from/to for date type
* config range from/to for date type
* TDD generator range from/to for date type
* generator range from/to for date type
* update docs
* fix milliseconds resolution in custom template tests
* cr fixes
* fix tests
* fix tests
* fix docs
* fix for real
Copy file name to clipboardExpand all lines: docs/fields-configuration.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,9 @@ For each config entry the following fields are available:
12
12
-`name`*mandatory*: dotted path field, matching an entry in [Fields definition](./glossary.md#fields-definition)
13
13
-`fuzziness`*optional (`long` and `double` type only)*: when generating data you could want generated values to change in a known interval. Fuzziness allow to specify the maximum delta a generated value can have from the previous value (for the same field), as a delta percentage; value must be between 0.0 and 1.0, where 0 is 0% and 1 is 100%. When not specified there is no constraint on the generated values, boundaries will be defined by the underlying field type
14
14
-`range`*optional (`long` and `double` type only)*: value will be generated between `min` and `max`
15
+
-`range`*optional (`date` type only)*: value will be generated between `from` and `to`. Only one between `from` and `to` can be set, in this case the dates will be generated between `from`/`to` and `time.Now()`. Progressive order of the generated dates is always assured regardless the interval involving `from`, `to` and `time.Now()` is positive or negative. If both at least one of `from` or `to` and `period` settings are defined an error will be returned and the generator will stop. The format of the date must be parsable by the following golang date format: `2006-01-02T15:04:05.999999999-07:00`.
15
16
-`cardinality`*optional*: number of different values for the field; note that this value may not be respected if not enough events are generated. Es `cardinality: 1000` with `100` generated events would produce `100` different values, not `1000`.
16
-
-`period`*optional (`date` type only)*: values will be evenly generated between `time.Now()` and `time.Now().Add(period)`, where period is expressed as `time.Duration`. It accepts also a negative duration: in this case values will be evenly generated between `time.Now().Add(period)` and `time.Now()`.
17
+
-`period`*optional (`date` type only)*: values will be evenly generated between `time.Now()` and `time.Now().Add(period)`, where period is expressed as `time.Duration`. It accepts also a negative duration: in this case values will be evenly generated between `time.Now().Add(period)` and `time.Now()`. If both `period` and at least one of `from` or `to` settings are defined an error will be returned and the generator will stop.
17
18
-`object_keys`*optional (`object` type only)*: list of field names to generate in a object field type; if not specified a random number of field names will be generated in the object filed type
18
19
-`value`*optional*: hardcoded value to set for the field (any `cardinality` will be ignored)
19
20
-`enum`*optional (`keyword` type only)*: list of strings to randomly chose from a value to set for the field (any `cardinality` will be applied limited to the size of the `enum` values)
@@ -26,6 +27,10 @@ If you have an `object` type field that you defined one or multiple `object_keys
26
27
fields:
27
28
- name: timestamp
28
29
period: "1h"
30
+
- name: lastSnapshot
31
+
range:
32
+
from: "2023-11-23T11:29:48-00:00"
33
+
to: "2023-12-13T01:39:58-00:00"
29
34
- name: aws.dynamodb.metrics.AccountMaxReads.max
30
35
fuzziness: 0.1
31
36
range:
@@ -61,6 +66,8 @@ Related [fields definition](./writing-templates.md#fieldsyml---fields-definition
// NOTE: we want to distinguish when Min/Max are explicitly set to zero value or are not set at all. We use a pointer, such that when not set will be `nil`.
18
-
Min*float64`config:"min"`
19
-
Max*float64`config:"max"`
29
+
// NOTE: we want to distinguish when Min/Max/From/To are explicitly set to zero value or are not set at all. We use a pointer, such that when not set will be `nil`.
0 commit comments