Class StatisticRegistry<Solution_>
- java.lang.Object
-
- io.micrometer.core.instrument.MeterRegistry
-
- io.micrometer.core.instrument.simple.SimpleMeterRegistry
-
- org.optaplanner.benchmark.impl.statistic.StatisticRegistry<Solution_>
-
- All Implemented Interfaces:
EventListener
,PhaseLifecycleListener<Solution_>
,SolverLifecycleListener<Solution_>
public class StatisticRegistry<Solution_> extends io.micrometer.core.instrument.simple.SimpleMeterRegistry implements PhaseLifecycleListener<Solution_>
-
-
Constructor Summary
Constructors Constructor Description StatisticRegistry(DefaultSolver<Solution_> solver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(SolverMetric metric, BiConsumer<Long,AbstractStepScope<Solution_>> listener)
void
addListener(SolverMetric metric, Consumer<Long> listener)
void
extractConstraintSummariesFromMeters(SolverMetric metric, io.micrometer.core.instrument.Tags runId, Consumer<ConstraintSummary<?>> constraintMatchTotalConsumer)
void
extractScoreFromMeters(SolverMetric metric, io.micrometer.core.instrument.Tags runId, Consumer<Score<?>> scoreConsumer)
protected TimeUnit
getBaseTimeUnit()
void
getGaugeValue(String meterId, io.micrometer.core.instrument.Tags runId, Consumer<Number> gaugeConsumer)
void
getGaugeValue(SolverMetric metric, io.micrometer.core.instrument.Tags runId, Consumer<Number> gaugeConsumer)
Set<io.micrometer.core.instrument.Meter.Id>
getMeterIds(SolverMetric metric, io.micrometer.core.instrument.Tags runId)
void
phaseEnded(AbstractPhaseScope<Solution_> phaseScope)
void
phaseStarted(AbstractPhaseScope<Solution_> phaseScope)
void
solvingEnded(SolverScope<Solution_> solverScope)
void
solvingStarted(SolverScope<Solution_> solverScope)
void
stepEnded(AbstractStepScope<Solution_> stepScope)
void
stepStarted(AbstractStepScope<Solution_> stepScope)
-
Methods inherited from class io.micrometer.core.instrument.simple.SimpleMeterRegistry
defaultHistogramConfig, getMetersAsString, newCounter, newDistributionSummary, newFunctionCounter, newFunctionTimer, newGauge, newLongTaskTimer, newMeter, newTimer
-
Methods inherited from class io.micrometer.core.instrument.MeterRegistry
clear, close, config, counter, counter, find, forEachMeter, gauge, gauge, gauge, gauge, gaugeCollectionSize, gaugeMapSize, get, getConventionName, getConventionTags, getMeters, isClosed, meterRegistrationFailed, more, newLongTaskTimer, newTimeGauge, remove, remove, removeByPreFilterId, summary, summary, timer, timer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.optaplanner.core.impl.solver.event.SolverLifecycleListener
solvingError
-
-
-
-
Constructor Detail
-
StatisticRegistry
public StatisticRegistry(DefaultSolver<Solution_> solver)
-
-
Method Detail
-
addListener
public void addListener(SolverMetric metric, Consumer<Long> listener)
-
addListener
public void addListener(SolverMetric metric, BiConsumer<Long,AbstractStepScope<Solution_>> listener)
-
getMeterIds
public Set<io.micrometer.core.instrument.Meter.Id> getMeterIds(SolverMetric metric, io.micrometer.core.instrument.Tags runId)
-
extractScoreFromMeters
public void extractScoreFromMeters(SolverMetric metric, io.micrometer.core.instrument.Tags runId, Consumer<Score<?>> scoreConsumer)
-
extractConstraintSummariesFromMeters
public void extractConstraintSummariesFromMeters(SolverMetric metric, io.micrometer.core.instrument.Tags runId, Consumer<ConstraintSummary<?>> constraintMatchTotalConsumer)
-
getGaugeValue
public void getGaugeValue(SolverMetric metric, io.micrometer.core.instrument.Tags runId, Consumer<Number> gaugeConsumer)
-
getGaugeValue
public void getGaugeValue(String meterId, io.micrometer.core.instrument.Tags runId, Consumer<Number> gaugeConsumer)
-
getBaseTimeUnit
protected TimeUnit getBaseTimeUnit()
- Overrides:
getBaseTimeUnit
in classio.micrometer.core.instrument.simple.SimpleMeterRegistry
-
stepEnded
public void stepEnded(AbstractStepScope<Solution_> stepScope)
- Specified by:
stepEnded
in interfacePhaseLifecycleListener<Solution_>
-
phaseStarted
public void phaseStarted(AbstractPhaseScope<Solution_> phaseScope)
- Specified by:
phaseStarted
in interfacePhaseLifecycleListener<Solution_>
-
stepStarted
public void stepStarted(AbstractStepScope<Solution_> stepScope)
- Specified by:
stepStarted
in interfacePhaseLifecycleListener<Solution_>
-
phaseEnded
public void phaseEnded(AbstractPhaseScope<Solution_> phaseScope)
- Specified by:
phaseEnded
in interfacePhaseLifecycleListener<Solution_>
-
solvingStarted
public void solvingStarted(SolverScope<Solution_> solverScope)
- Specified by:
solvingStarted
in interfaceSolverLifecycleListener<Solution_>
-
solvingEnded
public void solvingEnded(SolverScope<Solution_> solverScope)
- Specified by:
solvingEnded
in interfaceSolverLifecycleListener<Solution_>
-
-