import {DurationPill, RowRectangle} from 'sentry/components/performance/waterfall/rowBar'; import { getDurationDisplay, getHumanDuration, toPercent, } from 'sentry/components/performance/waterfall/utils'; import {EnhancedSpan} from './types'; import {getSpanGroupTimestamps, SpanViewBoundsType} from './utils'; export function SpanRectangleOverlay({ bounds, spanGrouping, }: { bounds: SpanViewBoundsType; spanGrouping: EnhancedSpan[]; }) { const {startTimestamp, endTimestamp} = getSpanGroupTimestamps(spanGrouping); const duration = Math.abs(endTimestamp - startTimestamp); const durationDisplay = getDurationDisplay(bounds); const durationString = getHumanDuration(duration); return ( {durationString} ); }