org.apache.hadoop.mapred.gridmix.emulators.resourceusage
Interface CumulativeCpuUsageEmulatorPlugin.CpuUsageEmulatorCore

All Known Implementing Classes:
CumulativeCpuUsageEmulatorPlugin.DefaultCpuUsageEmulator
Enclosing class:
CumulativeCpuUsageEmulatorPlugin

public static interface CumulativeCpuUsageEmulatorPlugin.CpuUsageEmulatorCore

This is the core CPU usage emulation algorithm. This is the core engine which actually performs some CPU intensive operations to consume some amount of CPU. Multiple calls of compute() should help the plugin emulate the desired level of CPU usage. This core engine can be calibrated using the calibrate(ResourceCalculatorPlugin, long) API to suit the underlying hardware better. It also can be used to optimize the emulation cycle.


Method Summary
 void calibrate(org.apache.hadoop.mapreduce.util.ResourceCalculatorPlugin monitor, long totalCpuUsage)
          Allows the core to calibrate itself.
 void compute()
          Performs some computation to use up some CPU.
 

Method Detail

compute

void compute()
Performs some computation to use up some CPU.


calibrate

void calibrate(org.apache.hadoop.mapreduce.util.ResourceCalculatorPlugin monitor,
               long totalCpuUsage)
Allows the core to calibrate itself.



Copyright © 2012 Apache Software Foundation. All Rights Reserved.