MetricRaw.java

Go to the documentation of this file.
00001 package edu.rice.cs.hpc.data.experiment.metric;
00002 
00003 import edu.rice.cs.hpc.data.experiment.scope.Scope;
00004 
00005 /****************************************
00006  * Raw metric class
00007  * @author laksonoadhianto
00008  *
00009  ****************************************/
00010 public class MetricRaw  extends BaseMetric {
00011 
00012     private int ID;
00013     private String db_glob;
00014     private int db_id;
00015     private int num_metrics;
00016     
00017     public MetricRaw(String sID, String sDisplayName, boolean displayed, String format, AnnotationType annotationType, int index) {
00018         super(sID, sDisplayName, displayed, format, annotationType, index, index,  MetricType.EXCLUSIVE);
00019     }
00020     
00021     
00022     public MetricRaw(int id, String title, String db_pattern, 
00023             int db_num, int metrics) {
00024         // raw metric has no partner
00025         super( String.valueOf(id), title, true, null, AnnotationType.NONE, db_num, db_num, MetricType.EXCLUSIVE);
00026         this.ID = id;
00027         this.db_glob = db_pattern;
00028         this.db_id = db_num;
00029         this.num_metrics = metrics;
00030     }
00031         
00032     
00033     /***
00034      * return the glob pattern of files of this raw metric
00035      * @return
00036      */
00037     public String getGlob() {
00038         return this.db_glob;
00039     }
00040     
00041     
00042     /***
00043      * retrieve the "local" ID of the raw metric
00044      * This ID is unique among raw metrics in the same experiment 
00045      * @return
00046      */
00047     public int getRawID() {
00048         return this.db_id;
00049     }
00050     
00051     
00052     /***
00053      * retrieve the number of raw metrics in this experiment
00054      * @return
00055      */
00056     public int getSize() {
00057         return this.num_metrics;
00058     }
00059     
00060     
00061     /***
00062      * return the ID of the raw metric
00063      * The ID is unique for all raw metric across experiments 
00064      * @return
00065      */
00066     public int getID() {
00067         return this.ID;
00068     }
00069 
00070 
00071     //@Override
00072     public MetricValue getValue(Scope s) {
00073         return null;
00074     }
00075 
00076 
00077     //@Override
00078     public BaseMetric duplicate() {
00079         return new MetricRaw(ID, this.displayName, this.db_glob, this.db_id, this.num_metrics);
00080     }
00081     
00082 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1