private static MetricValue duration_to_metricvalue_(Duration duration){
  return MetricValue.fromIntValue(duration.getMillis());
}

private static MetricValue duration_to_metricvalue_ ( Duration duration ) { return MetricValue . fromIntValue ( duration . getMillis ( ) ) ; }
convert a duration to a metric value . the returned metric value is expressed as the duration in milliseconds .
