Interface PerformanceManager
-
- All Implemented Interfaces:
-
com.pointrlabs.core.management.interfaces.Advertiser
public interface PerformanceManager implements Advertiser<PerformanceManager.Listener>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
PerformanceManager.Listener
public class
PerformanceManager.Companion
-
Method Summary
Modifier and Type Method Description abstract PerformanceMeasurementResult
getMeasurement(PerformanceMeasurementParams measurementParams)
This method is to get the result of a measurement after it has ended. abstract Unit
beginMeasurement(PerformanceMeasurementParams measurementParams)
This method should be invoked when a native functionality needs to be measured. abstract PerformanceMeasurementResult
endMeasurement(PerformanceMeasurementParams measurementParams)
This method should be invoked after beginMeasurement with the same params in order to conclude a measurement. abstract Unit
setLogsEnabled(Boolean isEnabled)
This method toggles the availability of logs from Performance Manager abstract Unit
clear()
Clears the performance manager -
-
Method Detail
-
getMeasurement
abstract PerformanceMeasurementResult getMeasurement(PerformanceMeasurementParams measurementParams)
This method is to get the result of a measurement after it has ended.
- Parameters:
measurementParams
-the PerformanceMeasurementParams to specify the measurement of which the method will return the results of.
-
beginMeasurement
abstract Unit beginMeasurement(PerformanceMeasurementParams measurementParams)
This method should be invoked when a native functionality needs to be measured. i.e. map load time It simply starts a timer which is then stopped when endMeasurement is invoked.
- Parameters:
measurementParams
-information related to the measurement. The parameters here do not define what is to be measured. i.e. if the siteId in the params is 1, it does not mean the call will measure only site 1. !!!Also, the same params need to be supplied to endMeasurement call.
-
endMeasurement
abstract PerformanceMeasurementResult endMeasurement(PerformanceMeasurementParams measurementParams)
This method should be invoked after beginMeasurement with the same params in order to conclude a measurement. After this is invoked, the PerformanceMeasurementResult is returned synchronously and also the Listener.onPerformanceManagerMeasurementEnd callback is to be triggered.
- Parameters:
measurementParams
-information related to the measurement. This argument needs to be the same as the one supplied to the initial beginMeasurement call.
-
setLogsEnabled
abstract Unit setLogsEnabled(Boolean isEnabled)
This method toggles the availability of logs from Performance Manager
- Parameters:
isEnabled
-signifies whether or not Performance Manager should print logs.
-
-
-
-