index.tsx 313 B

12345678910
  1. import {getDuration} from 'app/utils/formatters';
  2. import {Vital} from 'app/utils/performance/vitals/types';
  3. export function formattedValue(record: Vital | undefined, value: number): string {
  4. if (record && record.type === 'duration') {
  5. return getDuration(value / 1000, 3);
  6. }
  7. return value.toFixed(3);
  8. }