public class PS_MetricCalculator
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.Double> |
calculate(PS_Report report,
PS_MetricDefinition md)
Calcultes the metrics' values,
given a
PS_Report object and
a PS_MetricDefinition object. |
static java.util.Map<java.lang.String,java.lang.Double> |
calculateReturnShortNames(PS_Report report,
PS_MetricDefinition md)
Calcultes the metrics' values,
given a
PS_Report object and
a PS_MetricDefinition object. |
public static java.util.Map<java.lang.String,java.lang.Double> calculate(PS_Report report, PS_MetricDefinition md)
PS_Report
object and
a PS_MetricDefinition
object.
Please note that currently only PerfSuite HWPC counting reports
are supported in metric calculation. Giving other types of PerfSuite
reports as an argument will result in
UnsupportedOperationException
.
report
- a PS_Report
objectmd
- a PS_MetricDefinition
objectjava.lang.IllegalArgumentException
- if report
or md
is null
.java.lang.UnsupportedOperationException
- if the PerfSuite report is not an HWPC counting report,
or it is but the event class is not "PAPI"
or "perfmon".public static java.util.Map<java.lang.String,java.lang.Double> calculateReturnShortNames(PS_Report report, PS_MetricDefinition md)
PS_Report
object and
a PS_MetricDefinition
object.
The only difference between this method and the calculate
method is that the keys of the returned map in this method are
the short names of the metrics (such as "PS_TIME_CPU"),
not their descriptions (such as "CPU time (seconds)").