The format used to display values of a metric. More...
Classes | |
class | Style |
Public Member Functions | |
MetricValueFormat (boolean showValue, int valueKind, int valueFieldWidth, int valueFractionDigits, boolean showAnnotation, int annotationKind, int annotationFieldWidth, int annotationFractionDigits, String annotationFormatPattern, int separatorWidth) | |
void | setShowValue (boolean showValue) |
boolean | getShowValue () |
void | setValueKind (int kind) |
int | getValueKind () |
void | setValueFieldWidth (int fieldWidth) |
int | getValueFieldWidth () |
void | setValueFractionDigits (int fractionDigits) |
int | getValueFractionDigits () |
void | setShowAnnotation (boolean showAnnotation) |
boolean | getShowAnnotation () |
void | setAnnotationKind (int kind) |
int | getAnnotationKind () |
void | setAnnotationFieldWidth (int fieldWidth) |
int | getAnnotationFieldWidth () |
void | setAnnotationFractionDigits (int fractionDigits) |
int | getAnnotationFractionDigits () |
void | setSeparatorWidth (int separatorWidth) |
int | getSeparatorWidth () |
int | getFormattedLength () |
String | format (MetricValue value) |
format the value without the information from MetricValue. | |
Static Public Attributes | |
static int | FIXED = 1 |
Indicates that a number should be displayed in fixed point format. | |
static int | FLOAT = 2 |
Indicates that a number should be displayed in floating point ("scientific") format. | |
Protected Member Functions | |
String | formatDouble (double d, DecimalFormat formatter, Style style) |
void | clearFormatters () |
void | ensureFormatters () |
Protected Attributes | |
boolean | showValue |
Whether to show the actual value. | |
boolean | showAnnotation |
Whether to show the annotation value. | |
Style | valueStyle |
The number format to be used for the actual value. | |
Style | annotationStyle |
The number format to be used for the annotation value. | |
String | annotationFormatPattern |
The pattern to use when formatting annotation values. | |
int | separatorWidth |
How many space characters separate the metric value and its annotation. | |
DecimalFormat | valueFormatter |
A Java formatter implementing the format specified for actual values. | |
DecimalFormat | annotationFormatter |
A Java formatter implementing the format specified for the metrics annotation. | |
String | separator |
A sequence of spaces used to separate the metric value and its annotation. |
The format used to display values of a metric.
Definition at line 35 of file MetricValueFormat.java.
edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.MetricValueFormat | ( | boolean | showValue, | |
int | valueKind, | |||
int | valueFieldWidth, | |||
int | valueFractionDigits, | |||
boolean | showAnnotation, | |||
int | annotationKind, | |||
int | annotationFieldWidth, | |||
int | annotationFractionDigits, | |||
String | annotationFormatPattern, | |||
int | separatorWidth | |||
) |
Definition at line 108 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationStyle, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.clearFormatters(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.fieldWidth, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.fractionDigits, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.kind, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueStyle.
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.clearFormatters | ( | ) | [protected] |
Definition at line 556 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationFormatter, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.separator, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueFormatter.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.MetricValueFormat(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setAnnotationFieldWidth(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setAnnotationFractionDigits(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setAnnotationKind(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setSeparatorWidth(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setShowAnnotation(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setShowValue(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setValueFieldWidth(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setValueFractionDigits(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setValueKind().
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.ensureFormatters | ( | ) | [protected] |
Definition at line 570 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationFormatPattern, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationFormatter, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getValueFractionDigits(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.separator, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.separatorWidth, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueFormatter.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format().
String edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format | ( | MetricValue | value | ) |
format the value without the information from MetricValue.
This method is need to compute the derived metrics on the fly without instantiating or creating new class which will consume more memory (I guess ---laks).
value |
String
the text format. Implements edu.rice.cs.hpc.data.experiment.metric.IMetricValueFormat.
Definition at line 439 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationFormatPattern, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationFormatter, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationStyle, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.ensureFormatters(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.formatDouble(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.separator, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.showAnnotation, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.showValue, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueFormatter, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueStyle.
String edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.formatDouble | ( | double | d, | |
DecimalFormat | formatter, | |||
Style | style | |||
) | [protected] |
Definition at line 502 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.fieldWidth, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.FLOAT, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.kind.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format().
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getAnnotationFieldWidth | ( | ) |
Definition at line 337 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationStyle, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.fieldWidth.
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getAnnotationFractionDigits | ( | ) |
Definition at line 364 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationStyle, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.fractionDigits.
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getAnnotationKind | ( | ) |
Definition at line 312 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationStyle, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.kind.
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getFormattedLength | ( | ) |
Definition at line 410 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationStyle, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.fieldWidth, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.separatorWidth, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.showAnnotation, edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.showValue, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueStyle.
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getSeparatorWidth | ( | ) |
Definition at line 391 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.separatorWidth.
boolean edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getShowAnnotation | ( | ) |
Definition at line 279 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.showAnnotation.
boolean edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getShowValue | ( | ) |
Definition at line 169 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.showValue.
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getValueFieldWidth | ( | ) |
Definition at line 227 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.fieldWidth, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueStyle.
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getValueFractionDigits | ( | ) |
Definition at line 254 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.fractionDigits, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueStyle.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.ensureFormatters().
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getValueKind | ( | ) |
Definition at line 202 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.Style.kind, and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueStyle.
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setAnnotationFieldWidth | ( | int | fieldWidth | ) |
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setAnnotationFractionDigits | ( | int | fractionDigits | ) |
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setAnnotationKind | ( | int | kind | ) |
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setSeparatorWidth | ( | int | separatorWidth | ) |
Definition at line 377 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.clearFormatters().
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setShowAnnotation | ( | boolean | showAnnotation | ) |
Definition at line 266 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.clearFormatters().
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setShowValue | ( | boolean | showValue | ) |
Definition at line 156 of file MetricValueFormat.java.
References edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.clearFormatters().
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setValueFieldWidth | ( | int | fieldWidth | ) |
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setValueFractionDigits | ( | int | fractionDigits | ) |
void edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setValueKind | ( | int | kind | ) |
The pattern to use when formatting annotation values.
Definition at line 64 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.ensureFormatters(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format().
DecimalFormat edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.annotationFormatter [protected] |
A Java formatter implementing the format specified for the metrics annotation.
Definition at line 73 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.clearFormatters(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.ensureFormatters(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format().
The number format to be used for the annotation value.
Definition at line 61 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getAnnotationFieldWidth(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getAnnotationFractionDigits(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getAnnotationKind(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getFormattedLength(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.MetricValueFormat(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setAnnotationFieldWidth(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setAnnotationFractionDigits(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setAnnotationKind().
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.FIXED = 1 [static] |
Indicates that a number should be displayed in fixed point format.
Definition at line 89 of file MetricValueFormat.java.
int edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.FLOAT = 2 [static] |
Indicates that a number should be displayed in floating point ("scientific") format.
Definition at line 92 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.formatDouble().
String edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.separator [protected] |
A sequence of spaces used to separate the metric value and its annotation.
Definition at line 76 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.clearFormatters(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.ensureFormatters(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format().
How many space characters separate the metric value and its annotation.
Definition at line 67 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.ensureFormatters(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getFormattedLength(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getSeparatorWidth().
boolean edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.showAnnotation [protected] |
Whether to show the annotation value.
Definition at line 55 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getFormattedLength(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getShowAnnotation().
boolean edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.showValue [protected] |
Whether to show the actual value.
Definition at line 48 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getFormattedLength(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getShowValue().
DecimalFormat edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.valueFormatter [protected] |
A Java formatter implementing the format specified for actual values.
Definition at line 70 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.clearFormatters(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.ensureFormatters(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format().
The number format to be used for the actual value.
Definition at line 58 of file MetricValueFormat.java.
Referenced by edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.format(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getFormattedLength(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getValueFieldWidth(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getValueFractionDigits(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.getValueKind(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.MetricValueFormat(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setValueFieldWidth(), edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setValueFractionDigits(), and edu.rice.cs.hpc.data.experiment.metric.MetricValueFormat.setValueKind().