- Timestamp:
- 01/15/13 10:17:40 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/ui/ProcessorPowerInterface.java
r512 r782 21 21 super(resource, pp); 22 22 currentPowerState = StandardPowerStateName.ON; 23 currentPState = get SupportedPStates().get("P0");23 currentPState = getLowestPState(); 24 24 } 25 25 … … 100 100 } 101 101 } 102 } 103 else throw new NoSuchFieldException(); 104 return powerConsumption; 105 } 106 107 public PState getLowestPState(){ 108 PState lowPState = null; 109 double highestFreq = Double.MIN_VALUE; 110 for(String key: getSupportedPStates() .keySet()){ 111 PState pState = getSupportedPStates().get(key); 112 if(pState.getFrequency() > highestFreq){ 113 highestFreq = pState.getFrequency(); 114 lowPState = pState; 115 } 102 116 } 103 return powerConsumption; 117 return lowPState; 118 } 119 120 public PState getHighestPState(){ 121 PState highPState = null; 122 double lowestFreq = Double.MAX_VALUE; 123 for(String key: getSupportedPStates() .keySet()){ 124 PState pState = getSupportedPStates().get(key); 125 if(pState.getFrequency() < lowestFreq){ 126 lowestFreq = pState.getFrequency(); 127 highPState = pState; 128 } 129 } 130 return highPState; 104 131 } 105 132
Note: See TracChangeset
for help on using the changeset viewer.