TestMetricFormat.java
Go to the documentation of this file.00001
00004 package edu.rice.cs.hpc.data.experiment.metric;
00005
00006 import edu.rice.cs.hpc.data.experiment.metric.BaseMetric.AnnotationType;
00007
00012 public class TestMetricFormat {
00013
00017 public static void main(String[] args) {
00018
00019 Metric baseMetric = new Metric("sn", "nn", "dn",
00020 true, null, AnnotationType.PERCENT, "", 0, MetricType.INCLUSIVE, 1);
00021
00022
00023 MetricValue mv = new MetricValue(9.999, .999);
00024
00025 MetricValue mv2 = new MetricValue(0.992, .009);
00026 MetricValue mv3 = new MetricValue(9.55, 0.0009);
00027 MetricValue mv4 = new MetricValue(9.5, -0.000005);
00028 MetricValue mv5 = new MetricValue(0.9999, -0.000005);
00029 MetricValue mv6 = new MetricValue(0.945, -0.000005);
00030 MetricValue mv7 = new MetricValue(0.95, -0.000005);
00031 MetricValue mv8 = new MetricValue(0.955, -0.095005);
00032 MetricValue mv9 = new MetricValue(0.9992, -0.095505);
00033
00034 System.out.println("test 1: "+MetricValue.getValue(mv) +"\t= '"+baseMetric.getDisplayFormat().format(mv) +"'");
00035 System.out.println("test 2: "+MetricValue.getValue(mv2)+"\t= '"+baseMetric.getDisplayFormat().format(mv2)+"'");
00036 System.out.println("test 3: "+MetricValue.getValue(mv3)+"\t= '"+baseMetric.getDisplayFormat().format(mv3)+"'");
00037 System.out.println("test 4: "+MetricValue.getValue(mv4)+"\t= '"+baseMetric.getDisplayFormat().format(mv4)+"'");
00038 System.out.println("test 5: "+MetricValue.getValue(mv5)+"\t= '"+baseMetric.getDisplayFormat().format(mv5)+"'");
00039 System.out.println("test 6: "+MetricValue.getValue(mv6)+"\t= '"+baseMetric.getDisplayFormat().format(mv6)+"'");
00040 System.out.println("test 7: "+MetricValue.getValue(mv7)+"\t= '"+baseMetric.getDisplayFormat().format(mv7)+"'");
00041 System.out.println("test 8: "+MetricValue.getValue(mv8)+"\t= '"+baseMetric.getDisplayFormat().format(mv8)+"'");
00042 System.out.println("test 9: "+MetricValue.getValue(mv9)+"\t= '"+baseMetric.getDisplayFormat().format(mv9)+"'");
00043 }
00044
00045 }