support hdr_digits instead of hdr-digits in activity params

This commit is contained in:
Jonathan Shook 2020-05-21 11:09:19 -05:00
parent 9a2c045f50
commit c66e511da4
3 changed files with 8 additions and 7 deletions

View File

@ -37,7 +37,7 @@ public class ActivityMetrics {
private final static Logger logger = LoggerFactory.getLogger(ActivityMetrics.class);
public static final String HDRDIGITS_PARAM = "hdr-digits";
public static final String HDRDIGITS_PARAM = "hdr_digits";
public static final int DEFAULT_HDRDIGITS= 4;
private static int _HDRDIGITS = DEFAULT_HDRDIGITS;
@ -103,7 +103,7 @@ public class ActivityMetrics {
/**
* <p>Create a timer associated with an activity.</p>
*
* <p>If the provide ActivityDef contains a parameter "hdr-digits", then it will be used to set the number of
* <p>If the provide ActivityDef contains a parameter "hdr_digits", then it will be used to set the number of
* significant digits on the histogram's precision.</p>
*
* <p>This method ensures that if multiple threads attempt to create the same-named metric on a given activity,
@ -128,7 +128,7 @@ public class ActivityMetrics {
/**
* <p>Create an HDR histogram associated with an activity.</p>
*
* <p>If the provide ActivityDef contains a parameter "hdr-digits", then it will be used to set the number of
* <p>If the provide ActivityDef contains a parameter "hdr_digits", then it will be used to set the number of
* significant digits on the histogram's precision.</p>
*
* <p>This method ensures that if multiple threads attempt to create the same-named metric on a given activity,

View File

@ -364,9 +364,9 @@ This sequencer is most useful when you want a stable ordering of operation from
each operations is spaced as evenly as possible over time, and where it is not important to control the cycle-by-cycle
sequencing of statements.
## hdr-digits
## hdr_digits
- `hdr-digits=3`
- `hdr_digits=3`
- _default_: `4`
- _required_: no
- _dynamic_: no
@ -376,5 +376,5 @@ activity. The default of 4 allows 4 significant digits, which means *up to* 1000
metric, per histogram interval. This does not mean that there _will be_ 10000 distinct buckets, but it means there could
be if there is significant volume and variety in the measurements.
If you are running a scenario that creates many activities, then you can set `hdr-digits=1` on some of them to save
If you are running a scenario that creates many activities, then you can set `hdr_digits=1` on some of them to save
client resources.

View File

@ -160,7 +160,8 @@ you can do so this way:
The default is 4 digits, which creates 10000 equisized histogram buckets for every named metric in every reporting
interval. For longer running test or for test which do not require this level of precision in metrics, you can set this
down to 3 or 2. Note that this only sets the global default. Each activity can also override this value.
down to 3 or 2. Note that this only sets the global default. Each activity can also override this value with the
hdr_digits parameter.
Enlist engineblock to stand up your metrics infrastructure using a local docker runtime: