mlflow/server/js/src/utils/Utils.js
/**
   * Format a duration given in milliseconds.
   *
   * @param duration in milliseconds
   */
Format a duration given in milliseconds.
@param duration in milliseconds
Format a duration given in milliseconds . @param duration in milliseconds
static formatDuration(duration) {
    if (duration < 500) {
      return duration + "ms";
    } else if (duration < 1000 * 60) {
      return (duration / 1000).toFixed(1) + "s";
    } else if (duration < 1000 * 60 * 60) {
      return (duration / 1000 / 60).toFixed(1) + "min";
    } else if (duration < 1000 * 60 * 60 * 24) {
      return (duration / 1000 / 60 / 60).toFixed(1) + "h";
    } else {
      return (duration / 1000 / 60 / 60 / 24).toFixed(1) + "d";
    }
  }
static formatDuration ( duration ) { if ( duration < 500 ) { return duration + "ms" ; } else if ( duration < 1000 * 60 ) { return ( duration / 1000 ) . toFixed ( 1 ) + "s" ; } else if ( duration < 1000 * 60 * 60 ) { return ( duration / 1000 / 60 ) . toFixed ( 1 ) + "min" ; } else if ( duration < 1000 * 60 * 60 * 24 ) { return ( duration / 1000 / 60 / 60 ) . toFixed ( 1 ) + "h" ; } else { return ( duration / 1000 / 60 / 60 / 24 ) . toFixed ( 1 ) + "d" ; } }
Format a duration given in milliseconds.
Format a duration given in milliseconds .