Skip to content

Fixed problem with broken results of --advanced-benchmark

Andrzej Lisak requested to merge abw_advanced_benchmark_fix into develop

Benchmark measurements broken by nested ones are no longer stored giving false reports, they are only counted to indicate such situation occurred (see broken_measurements counter). Added warning at the start when some plugin registers pre/post operation handlers that cause nested measurements.

Note that it would be possible to further reduce amount of time this happens if we introduced separate signal/notifier for virtual operations. It would also reduce unnecessary notifications (since most plugins don't care about vops), however plugins that actually need to observe vops would need to be adapted (f.e. account history). If such change was done, nested measurements would only happen if plugin registered for new notification... or we could even decide to not automatically measure vops at all (meaning only if plugin itself included benchmark code we would run into broken measurements).

The changes also include numerous new measurements:

  • on operation validations
  • on tapos check, merkle check, transaction duplication check, verification of signatures
  • actions performed during block processing that could be associated with operations (f.e. conversion processing or comment payouts)

Note that first two require use of --validate-during-replay if you plan on getting those readings during replay.

Benchmark collector had to be extended to store context separately instead of as part of the tag name, collect number of measurements and calculate average time per measurement (done during dump only).

Benchmark measurements are now collected in nanoseconds to reduce rounding errors.

One more fix that influences results: measurements of operations no longer incorrectly include demangling of operation name.

Merge request reports