cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudsimplus/examples/listeners/CloudletListenersExample2_ResourceUsageAlongTime.java
private void onUpdateCloudletProcessingListener(CloudletVmEventInfo eventInfo) {
        Cloudlet c = eventInfo.getCloudlet();
        double cpuUsage = c.getUtilizationModelCpu().getUtilization(eventInfo.getTime())*100;
        double ramUsage = c.getUtilizationModelRam().getUtilization(eventInfo.getTime())*100;
        double bwUsage  = c.getUtilizationModelBw().getUtilization(eventInfo.getTime())*100;
        Log.printFormattedLine(
                "\t#EventListener: Time %.0f: Updated Cloudlet %d execution inside Vm %d",
                eventInfo.getTime(), c.getId(), eventInfo.getVm().getId());
        Log.printFormattedLine(
                "\tCurrent Cloudlet resource usage: CPU %3.0f%%, RAM %3.0f%%, BW %3.0f%%\n",
                cpuUsage,  ramUsage, bwUsage);
    }
/**
     * A Listener function that will be called everytime when a the processing of a cloudlet
     * is updated into a VM. All cloudlets will use this same listener.
     *
     * @param eventInfo information about the happened event
     * @see #createCloudlet(int, Vm, long)
     */
A Listener function that will be called everytime when a the processing of a cloudlet
is updated into a VM. All cloudlets will use this same listener.

@param eventInfo information about the happened event
@see #createCloudlet(int, Vm, long)
A Listener function that will be called everytime when a the processing of a cloudlet is updated into a VM . All cloudlets will use this same listener . @param eventInfo information about the happened event @see #createCloudlet ( int Vm long )
private void onUpdateCloudletProcessingListener(CloudletVmEventInfo eventInfo) {
        Cloudlet c = eventInfo.getCloudlet();
        double cpuUsage = c.getUtilizationModelCpu().getUtilization(eventInfo.getTime())*100;
        double ramUsage = c.getUtilizationModelRam().getUtilization(eventInfo.getTime())*100;
        double bwUsage  = c.getUtilizationModelBw().getUtilization(eventInfo.getTime())*100;
        Log.printFormattedLine(
                "\t#EventListener: Time %.0f: Updated Cloudlet %d execution inside Vm %d",
                eventInfo.getTime(), c.getId(), eventInfo.getVm().getId());
        Log.printFormattedLine(
                "\tCurrent Cloudlet resource usage: CPU %3.0f%%, RAM %3.0f%%, BW %3.0f%%\n",
                cpuUsage,  ramUsage, bwUsage);
    }
private void onUpdateCloudletProcessingListener ( CloudletVmEventInfo eventInfo ) { Cloudlet c = eventInfo . getCloudlet ( ) ; double cpuUsage = c . getUtilizationModelCpu ( ) . getUtilization ( eventInfo . getTime ( ) ) * 100 ; double ramUsage = c . getUtilizationModelRam ( ) . getUtilization ( eventInfo . getTime ( ) ) * 100 ; double bwUsage = c . getUtilizationModelBw ( ) . getUtilization ( eventInfo . getTime ( ) ) * 100 ; Log . printFormattedLine ( "\t#EventListener: Time %.0f: Updated Cloudlet %d execution inside Vm %d" , eventInfo . getTime ( ) , c . getId ( ) , eventInfo . getVm ( ) . getId ( ) ) ; Log . printFormattedLine ( "\tCurrent Cloudlet resource usage: CPU %3.0f%%, RAM %3.0f%%, BW %3.0f%%\n" , cpuUsage , ramUsage , bwUsage ) ; }
A Listener function that will be called everytime when a the processing of a cloudlet
 is updated into a VM.
A Listener function that will be called everytime when a the processing of a cloudlet is updated into a VM .