Skip to content

Commit

Permalink
fix automatic merge
Browse files Browse the repository at this point in the history
  • Loading branch information
reimda committed May 27, 2022
1 parent 9df103b commit 26e291f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
29 changes: 10 additions & 19 deletions plugins/processors/noise/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Noise Processor Plugin

The _Noise_ processor is used to add noise to numerical field values. For each field a noise is generated using a defined probability densitiy function and added to the value. The function type can be configured as _Laplace_, _Gaussian_ or _Uniform_.
Depending on the function, various parameters need to be configured:

## Configuration

Depending on the choice of the distribution function, the respective parameters must be set. Default settings are `noise_type = "laplacian"` with `mu = 0.0` and `scale = 1.0`:

```toml @sample.conf
The *Noise* processor is used to add noise to numerical field values. For each
field a noise is generated using a defined probability densitiy function and
added to the value. The function type can be configured as _Laplace_, _Gaussian_
Expand All @@ -16,7 +8,7 @@ configured:

## Configuration

```toml
```toml @sample.conf
# Adds noise to numerical fields
[[processors.noise]]
## Specified the type of the random distribution.
Expand Down Expand Up @@ -51,7 +43,9 @@ distribution functions are available.
### Laplacian

- `noise_type = laplacian`
- `scale`: also referred to as _diversity_ parameter, regulates the width & height of the function, a bigger `scale` value means a higher probability of larger noise, default set to 1.0
- `scale`: also referred to as _diversity_ parameter, regulates the width &
height of the function, a bigger `scale` value means a higher probability of
larger noise, default set to 1.0
- `mu`: location of the curve, default set to 0.0
* `noise_type = laplacian`
* `scale`: also referred to as _diversity_ parameter, regulates the width &
Expand All @@ -73,10 +67,12 @@ distribution functions are available.

## Example

Add noise to each value the _inputs.cpu_ plugin generates, except for the _usage\_steal_, _usage\_user_, _uptime\_format_, _usage\_idle_ field and all fields of the metrics _swap_, _disk_ and _net_:
Add noise to each value the *Inputs.CPU* plugin generates, except for the
Add noise to each value the _inputs.cpu_ plugin generates, except for the
_usage\_steal_, _usage\_user_, _uptime\_format_, _usage\_idle_ field and all
fields of the metrics _swap_, _disk_ and _net_:
fields of the metrics _swap_, _disk_ and _net_: Add noise to each value the
*Inputs.CPU* plugin generates, except for the _usage\_steal_, _usage\_user_,
_uptime\_format_, _usage\_idle_ field and all fields of the metrics _swap_,
_disk_ and _net_:

```toml
[[inputs.cpu]]
Expand All @@ -98,10 +94,5 @@ Result of noise added to the _cpu_ metric:

```diff
- cpu map[cpu:cpu11 host:98d5b8dbad1c] map[usage_guest:0 usage_guest_nice:0 usage_idle:94.3999999994412 usage_iowait:0 usage_irq:0.1999999999998181 usage_nice:0 usage_softirq:0.20000000000209184 usage_steal:0 usage_system:1.2000000000080036 usage_user:4.000000000014552]
+ cpu map[cpu:cpu11 host:98d5b8dbad1c] map[usage_guest:1.0078071583066057
usage_guest_nice:0.523063861602435 usage_idle:95.53920223476884
usage_iowait:0.5162661526251292 usage_irq:0.7138529816101375
usage_nice:0.6119678488887954 usage_softirq:0.5573585443688622
usage_steal:0.2006120911289802 usage_system:1.2954475820198437
usage_user:6.885664792615023]
+ cpu map[cpu:cpu11 host:98d5b8dbad1c] map[usage_guest:1.0078071583066057 usage_guest_nice:0.523063861602435 usage_idle:95.53920223476884 usage_iowait:0.5162661526251292 usage_irq:0.7138529816101375 usage_nice:0.6119678488887954 usage_softirq:0.5573585443688622 usage_steal:0.2006120911289802 usage_system:1.2954475820198437 usage_user:6.885664792615023]
```
3 changes: 0 additions & 3 deletions plugins/processors/starlark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,6 @@ def apply(metric):

Open a Pull Request to add any other useful Starlark examples.

[Starlark specification]: https://github.com/google/starlark-go/blob/d1966c6b9fcd/doc/spec.md
[string]: https://github.com/google/starlark-go/blob/d1966c6b9fcd/doc/spec.md#strings
[dict]: https://github.com/google/starlark-go/blob/d1966c6b9fcd/doc/spec.md#dictionaries
[Starlark specification]: https://github.com/google/starlark-go/blob/master/doc/spec.md

[string]: https://github.com/google/starlark-go/blob/master/doc/spec.md#strings
Expand Down

0 comments on commit 26e291f

Please sign in to comment.