@Override
public void main(String[] strings) throws HostNotFoundException, HostFailureException, TaskCancelledException {
double workload = 100E6;
@Override
public void main(String[] strings) throws HostNotFoundException, HostFailureException, TaskCancelledException {
double workload = 100E6;
- if ((new_peak_index >= nb) || (new_peak_index < 0)){
- Msg.info("Cannot set pstate "+new_peak_index+"%d, host supports only "+nb+" pstates.");
+ if ((newPstate >= nb) || (newPstate < 0)){
+ Msg.info("Cannot set pstate "+newPstate+"%d, host supports only "+nb+" pstates.");
- double peak_at = host.getPowerPeakAt(new_peak_index);
- Msg.info("Changing power peak value to "+peak_at+" (at index "+new_peak_index+")");
+ double peakAt = host.getPowerPeakAt(newPstate);
+ Msg.info("Changing power peak value to "+peakAt+" (at index "+newPstate+")");
// Verify the default pstate is set to 0
host = Host.getByName("MyHost2");
int nb2 = host.getPstatesCount();
Msg.info("Count of Processor states="+ nb2);
// Verify the default pstate is set to 0
host = Host.getByName("MyHost2");
int nb2 = host.getPstatesCount();
Msg.info("Count of Processor states="+ nb2);
- double current_peak2 = host.getCurrentPowerPeak();
- Msg.info("Current power peak=" + current_peak2);
- return ;
+ double currentPeak2 = host.getCurrentPowerPeak();
+ Msg.info("Current power peak=" + currentPeak2);
- PstateRunner(Host host, String name, String[] args) throws HostNotFoundException, NativeException {
+ PstateRunner(Host host, String name, String[] args) throws NativeException {