Metric.java

Go to the documentation of this file.
00001 
00002 //                                                                      //
00003 //  Metric.java                                                         //
00004 //                                                                      //
00005 //  experiment.Metric -- a metric and its data in an experiment         //
00006 //  Last edited: January 15, 2002 at 12:37 am                           //
00007 //                                                                      //
00008 //  (c) Copyright 2002 Rice University. All rights reserved.            //
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 //  CLASS METRIC                                                        //
00026 
00034 public class Metric extends BaseMetric
00035 {
00036 
00037 public final static int NO_PARTNER_INDEX = -1;
00038 
00039 
00041 //  INITIALIZATION                                                      //
00043 
00044 
00045 
00046 
00047 /*************************************************************************
00048  *  Creates a Metric.
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     // creation arguments
00069     this.nativeName  = nativeName;
00070     this.sampleperiod  = this.convertSamplePeriode(samplePeriod);
00071     this.metricType     = metricType;
00072 }
00073 
00074 
00075 
00076 /*************************************************************************
00077  *  Returns the value of this metric at a given scope.
00078  ************************************************************************/  
00079 public MetricValue getValue(Scope s)
00080 {
00081     return s.getMetricValue(this);
00082 }
00083 
00084 
00085 
00086 //@Override
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 

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1