cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudsimplus/faultinjection/HostFaultInjection.java
private double totalVmsRecoveryTimeInMinutes(DatacenterBroker broker) {
        final Stream<Double> stream = broker == null ?
                vmRecoveryTimeSecsMap.values().stream() :
                vmRecoveryTimeSecsMap.entrySet().stream()
                    .filter(entry -> broker.equals(entry.getKey().getBroker()))
                    .map(Map.Entry::getValue);

        /**
         * See the method {@link #createVmCloneIfAllVmsDestroyed(DatacenterBroker, Vm)}
         * to understand the logic of the values in the recovery times map.
         */
        final double seconds = stream.map(rt -> rt >= 0 ? rt : getSimulation().clock() - Math.abs(rt)).reduce(0.0, Double::sum);

        return (long)(seconds/60.0);
    }
/**
     * Gets the average of the time (in minutes) all failed VMs belonging to a broker took to recovery
     * from failure.
     * @return
     */
Gets the average of the time (in minutes) all failed VMs belonging to a broker took to recovery
from failure.
@return
Gets the average of the time ( in minutes ) all failed VMs belonging to a broker took to recovery from failure . @return
private double totalVmsRecoveryTimeInMinutes(DatacenterBroker broker) {
        final Stream<Double> stream = broker == null ?
                vmRecoveryTimeSecsMap.values().stream() :
                vmRecoveryTimeSecsMap.entrySet().stream()
                    .filter(entry -> broker.equals(entry.getKey().getBroker()))
                    .map(Map.Entry::getValue);
        /**
         * See the method {@link #createVmCloneIfAllVmsDestroyed(DatacenterBroker, Vm)}
         * to understand the logic of the values in the recovery times map.
         */
        final double seconds = stream.map(rt -> rt >= 0 ? rt : getSimulation().clock() - Math.abs(rt)).reduce(0.0, Double::sum);
        return (long)(seconds/60.0);
    }
private double totalVmsRecoveryTimeInMinutes ( DatacenterBroker broker ) { final Stream < Double > stream = broker == null ? vmRecoveryTimeSecsMap . values ( ) . stream ( ) : vmRecoveryTimeSecsMap . entrySet ( ) . stream ( ) . filter ( entry -> broker . equals ( entry . getKey ( ) . getBroker ( ) ) ) . map ( Map . Entry :: getValue ) ; /**
         * See the method {@link #createVmCloneIfAllVmsDestroyed(DatacenterBroker, Vm)}
         * to understand the logic of the values in the recovery times map.
         */ final double seconds = stream . map ( rt -> rt >= 0 ? rt : getSimulation ( ) . clock ( ) - Math . abs ( rt ) ) . reduce ( 0.0 , Double :: sum ) ; return ( long ) ( seconds / 60.0 ) ; }
Gets the average of the time (in minutes) all failed VMs belonging to a broker took to recovery
 from failure.
Gets the average of the time ( in minutes ) all failed VMs belonging to a broker took to recovery from failure .