Metric.java
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013
00014
00015 package edu.rice.cs.hpc.data.experiment.metric;
00016
00017
00018 import edu.rice.cs.hpc.data.experiment.metric.MetricType;
00019 import edu.rice.cs.hpc.data.experiment.scope.Scope;
00020
00021
00022
00024
00026
00034 public class Metric extends BaseMetric
00035 {
00036
00037 public final static int NO_PARTNER_INDEX = -1;
00038
00039
00041
00043
00044
00045
00046
00047
00048
00049
00050
00063 public Metric(String shortName, String nativeName, String displayName, boolean displayed,
00064 String format, AnnotationType annotationType, String samplePeriod,
00065 int index, MetricType metricType, int partnerIndex)
00066 {
00067 super(shortName, displayName, displayed, format, annotationType, index, partnerIndex, metricType);
00068
00069 this.nativeName = nativeName;
00070 this.sampleperiod = this.convertSamplePeriode(samplePeriod);
00071 this.metricType = metricType;
00072 }
00073
00074
00075
00076
00077
00078
00079 public MetricValue getValue(Scope s)
00080 {
00081 return s.getMetricValue(this);
00082 }
00083
00084
00085
00086
00087 public BaseMetric duplicate() {
00088 return new Metric(shortName, nativeName, displayName, displayed, null, annotationType,
00089 String.valueOf(sampleperiod), index, metricType, partner_index);
00090 }
00091
00092 }
00093
00094
00095
00096
00097
00098
00099
00100