Skip to content

Conversation

RatanRSur
Copy link
Contributor

This is required to do performance monitoring/improvement of mark duration

Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
metricsSystem.createLongGauge(
BesuMetricCategory.PRUNER,
"mark_time_duration",
"Total number of seconds spent marking the state trie",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cumulative or per marking run? Worth adding some verbiage to the help text to make it clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

@@ -94,6 +97,13 @@ public MarkSweepPruner(
BesuMetricCategory.PRUNER,
"sweep_operations_total",
"Total number of sweep operations performed");

markStopwatch = Stopwatch.createUnstarted();
metricsSystem.createLongGauge(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is MarkSweepPruner a singleton for the life of the java process? Counters can handle multiple counters, gauges will throw an exception when the second gauge is created.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, it's a singleton

RatanRSur added 2 commits June 2, 2020 11:22
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
@RatanRSur RatanRSur merged commit 091ab97 into hyperledger:master Jun 3, 2020
@RatanRSur RatanRSur deleted the pruner-time-gauge branch June 3, 2020 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants