Interface ConsumerProfiler
- All Known Implementing Classes:
DefaultConsumerProfiler,NoOpConsumerProfiler
public interface ConsumerProfiler
-
Method Summary
Modifier and TypeMethodDescriptionvoidflushMeasurements(ConsumerRun consumerRun) voidMeasures the execution time of a specific piece of code.voidsaveRetryDelay(long retryDelay) voidstartMeasurements(String measurement) voidstartPartialMeasurement(String measurement) Measures the same piece of code several times, for example, a method call in the middle of a loop.void
-
Method Details
-
startMeasurements
-
measure
Measures the execution time of a specific piece of code. The measurement starts with a call to this method, and is terminated by another call to the same method with a different parameter (to keep the measurement continuity), or by calling theflushMeasurementsmethod. -
startPartialMeasurement
Measures the same piece of code several times, for example, a method call in the middle of a loop. Default implementation stores individual measurements, as well as their sum.stopPartialMeasurementsshould be called before measuring again. -
stopPartialMeasurement
void stopPartialMeasurement() -
saveRetryDelay
void saveRetryDelay(long retryDelay) -
flushMeasurements
-