To make sure that Benchmark tests are good, we run them with -short flag, eg:
```
go test -short -run=BenchmarkDurabilityProcess
```
Durability benchmark already supports this, but we can make it slightly more faster with
using less sgements and pieces during the `-short` run.
Change-Id: I9547ca1e3cd0178eb395a7a388f2e7936a9862d7
Classifier of durability is sg. like "net:1.3.4.1" or "country:HU".
To make the calculation faster we use arrays instead of maps, which means that we assign a uinique index to all of these strings (classes).
As Egon suggested earlier, we can do this mapping only once (per process), not for each fork.
Not a big deal performance-wise, as we have limited number of forks, which are initialized once per 5-10 hours, but the code is more readable and clean.
Change-Id: Id081846b5d97dae8009aeeecbcc63cb713bed294
Exemplars are representative elements for the stat. For example if a stat min is `30`, we can save one example with that value.
More details about the concept is here: https://grafana.com/docs/grafana/latest/fundamentals/exemplars/
In our context, which save the segment + position in case of min is updated, to make it easier to look after the segment in danger.
Change-Id: I19be482f1ddc7f1711e722c7b17480366d2c8312
To get better performance, we pre-load all nodealias/node information at the beginning of the segment loop.
It's possible that we receive a new node alias from the segment table what we are not fully aware of (yet).
The easiest solution is just ignoring. New risks/threats can be detected by a new execution cycle.
Change-Id: Ib54f7edc46eedbab6d13b4d651aaac1425994940