Search in sources :

Example 6 with LaunchStatisticsService

use of com.github.nagyesta.abortmission.strongback.rmi.service.LaunchStatisticsService in project abort-mission by nagyesta.

the class RmiBackedLaunchTelemetryDataSource method doFetchStatistics.

private SortedMap<String, ClassTelemetry> doFetchStatistics() throws RemoteException {
    final LaunchStatisticsService service = RmiServiceProvider.service(registry);
    final List<String> matcherName = service.fetchAllMatcherNames();
    final Map<String, List<StageTimeMeasurement>> measurementsPerMatcher = matcherName.stream().collect(Collectors.toMap(Function.identity(), name -> fetchByMatcherName(service, name)));
    return processFetchedRecords(measurementsPerMatcher);
}
Also used : java.util(java.util) BaseLaunchTelemetryConverter(com.github.nagyesta.abortmission.core.telemetry.converter.BaseLaunchTelemetryConverter) StageTimeMeasurement(com.github.nagyesta.abortmission.core.telemetry.StageTimeMeasurement) ClassTelemetry(com.github.nagyesta.abortmission.core.telemetry.stats.ClassTelemetry) RmiStageTimeMeasurement(com.github.nagyesta.abortmission.strongback.rmi.stats.RmiStageTimeMeasurement) Registry(java.rmi.registry.Registry) Function(java.util.function.Function) Collectors(java.util.stream.Collectors) StrongbackException(com.github.nagyesta.abortmission.strongback.base.StrongbackException) RemoteException(java.rmi.RemoteException) CLASS_ONLY(com.github.nagyesta.abortmission.core.telemetry.StageTimeMeasurement.CLASS_ONLY) LaunchStatisticsService(com.github.nagyesta.abortmission.strongback.rmi.service.LaunchStatisticsService) ClassTelemetryConverter(com.github.nagyesta.abortmission.core.telemetry.converter.ClassTelemetryConverter) RmiServiceProvider(com.github.nagyesta.abortmission.strongback.rmi.server.RmiServiceProvider) LaunchTelemetryDataSource(com.github.nagyesta.abortmission.core.telemetry.stats.LaunchTelemetryDataSource) LaunchStatisticsService(com.github.nagyesta.abortmission.strongback.rmi.service.LaunchStatisticsService)

Aggregations

LaunchStatisticsService (com.github.nagyesta.abortmission.strongback.rmi.service.LaunchStatisticsService)6 RemoteException (java.rmi.RemoteException)5 Registry (java.rmi.registry.Registry)4 MissionHealthCheckMatcher (com.github.nagyesta.abortmission.core.matcher.MissionHealthCheckMatcher)3 Test (org.junit.jupiter.api.Test)3 InOrder (org.mockito.InOrder)3 StageTimeMeasurement (com.github.nagyesta.abortmission.core.telemetry.StageTimeMeasurement)2 StrongbackException (com.github.nagyesta.abortmission.strongback.base.StrongbackException)2 RmiStageTimeMeasurement (com.github.nagyesta.abortmission.strongback.rmi.stats.RmiStageTimeMeasurement)2 CLASS_ONLY (com.github.nagyesta.abortmission.core.telemetry.StageTimeMeasurement.CLASS_ONLY)1 BaseLaunchTelemetryConverter (com.github.nagyesta.abortmission.core.telemetry.converter.BaseLaunchTelemetryConverter)1 ClassTelemetryConverter (com.github.nagyesta.abortmission.core.telemetry.converter.ClassTelemetryConverter)1 ClassTelemetry (com.github.nagyesta.abortmission.core.telemetry.stats.ClassTelemetry)1 LaunchTelemetryDataSource (com.github.nagyesta.abortmission.core.telemetry.stats.LaunchTelemetryDataSource)1 RmiServiceProvider (com.github.nagyesta.abortmission.strongback.rmi.server.RmiServiceProvider)1 java.util (java.util)1 Function (java.util.function.Function)1 Collectors (java.util.stream.Collectors)1