Commit 6f1bcf88 6f1bcf885f412146516ca337ac584de754fa7786 by WFLG

Fixat lite fel, getData och getMetrics funkar nu från OraMon. Graph blir

dock helt tom.
1 parent 21aac603
...@@ -128,28 +128,40 @@ public class OraMon { ...@@ -128,28 +128,40 @@ public class OraMon {
128 return cpuTime.getSeconds()*numCpus; 128 return cpuTime.getSeconds()*numCpus;
129 } 129 }
130 public double getCPUAvailableSeconds(String pdbName) throws Throwable { 130 public double getCPUAvailableSeconds(String pdbName) throws Throwable {
131 return colPdbCPU.getSeconds(pdbName + strCpuTime)*numCpus; 131 if(pdbName != null)
132 return colPdbCPU.getSeconds(pdbName + strCpuTime)*numCpus;
133 else
134 return getCPUAvailableSeconds();
132 } 135 }
133 136
134 public long getCPURawValue() throws Throwable { 137 public long getCPURawValue() throws Throwable {
135 return cpuTime.getCurrentValue(); 138 return cpuTime.getCurrentValue();
136 } 139 }
137 public long getCPURawValue(String pdbName) throws Throwable { 140 public long getCPURawValue(String pdbName) throws Throwable {
138 return colPdbCPU.getCurrentValue(pdbName + strCpuTime); 141 if(pdbName != null)
142 return colPdbCPU.getCurrentValue(pdbName + strCpuTime);
143 else
144 return getCPURawValue();
139 } 145 }
140 146
141 public long getCPURawDiff() throws Throwable { 147 public long getCPURawDiff() throws Throwable {
142 return cpuTime.getDelta(); 148 return cpuTime.getDelta();
143 } 149 }
144 public long getCPURawDiff(String pdbName) throws Throwable { 150 public long getCPURawDiff(String pdbName) throws Throwable {
145 return colPdbCPU.getDelta(pdbName + strCpuTime); 151 if(pdbName != null)
152 return colPdbCPU.getDelta(pdbName + strCpuTime);
153 else
154 return getCPURawDiff();
146 } 155 }
147 156
148 public double getCPUTimePerSecond() throws Throwable { 157 public double getCPUTimePerSecond() throws Throwable {
149 return cpuTime.getPerSecondValue(); 158 return cpuTime.getPerSecondValue();
150 } 159 }
151 public double getCPUTimePerSecond(String pdbName) throws Throwable { 160 public double getCPUTimePerSecond(String pdbName) throws Throwable {
152 return colPdbCPU.getPerSecValue(pdbName + strCpuTime); 161 if(pdbName != null)
162 return colPdbCPU.getPerSecValue(pdbName + strCpuTime);
163 else
164 return getCPUTimePerSecond();
153 } 165 }
154 166
155 public double getPerSecondValue(String name) throws Throwable { 167 public double getPerSecondValue(String name) throws Throwable {
......