diff --git a/frontend/src/scenes/session-recordings/player/inspector/v2/components/ItemPerformanceEvent.tsx b/frontend/src/scenes/session-recordings/player/inspector/v2/components/ItemPerformanceEvent.tsx index 7431cc2aa75be..9b34d4c3c580a 100644 --- a/frontend/src/scenes/session-recordings/player/inspector/v2/components/ItemPerformanceEvent.tsx +++ b/frontend/src/scenes/session-recordings/player/inspector/v2/components/ItemPerformanceEvent.tsx @@ -7,7 +7,6 @@ import { SimpleKeyValueList } from './SimpleKeyValueList' import { Tooltip } from 'lib/components/Tooltip' import { Fragment } from 'react' import { CodeSnippet, Language } from 'lib/components/CodeSnippet' -import { IconInfo } from 'lib/components/icons' export interface ItemPerformanceEvent { item: PerformanceEvent @@ -158,30 +157,27 @@ export function ItemPerformanceEvent({ {performanceSummaryCards.map(({ label, description, key, scoreBenchmarks }, index) => ( {index !== 0 && } -
-
- {label} - - - + +
+
{label}
+
+ {item?.[key] === undefined ? ( + '-' + ) : ( + = scoreBenchmarks[1], + 'text-warning-dark': + item[key] >= scoreBenchmarks[0] && + item[key] < scoreBenchmarks[1], + })} + > + {humanFriendlyMilliseconds(item[key])} + + )} +
-
- {item?.[key] === undefined ? ( - '-' - ) : ( - = scoreBenchmarks[1], - 'text-warning-dark': - item[key] >= scoreBenchmarks[0] && - item[key] < scoreBenchmarks[1], - })} - > - {humanFriendlyMilliseconds(item[key])} - - )} -
-
+ ))}
@@ -211,23 +207,54 @@ export function ItemPerformanceEvent({ {item.name} -

- Request started at {humanFriendlyMilliseconds(item.start_time || item.fetch_start)} and - took {humanFriendlyMilliseconds(item.duration)} - {item.decoded_body_size ? ( - <> - {' '} - to load {humanizeBytes(item.decoded_body_size)} of data - - ) : null} - {compressionPercentage && item.encoded_body_size ? ( - <> - , compressed to {humanizeBytes(item.encoded_body_size)} saving{' '} - {compressionPercentage.toFixed(1)}% - - ) : null} - . -

+ + {item.entry_type === 'navigation' ? ( + <> + {performanceSummaryCards.map(({ label, description, key, scoreBenchmarks }) => ( +
+
+ {label} + + {item?.[key] === undefined ? ( + '-' + ) : ( + = scoreBenchmarks[1], + 'text-warning-dark': + item[key] >= scoreBenchmarks[0] && + item[key] < scoreBenchmarks[1], + })} + > + {humanFriendlyMilliseconds(item[key])} + + )} + +
+ +

{description}

+
+ ))} + + ) : ( +

+ Request started at {humanFriendlyMilliseconds(item.start_time || item.fetch_start)}{' '} + and took {humanFriendlyMilliseconds(item.duration)} + {item.decoded_body_size ? ( + <> + {' '} + to load {humanizeBytes(item.decoded_body_size)} of data + + ) : null} + {compressionPercentage && item.encoded_body_size ? ( + <> + , compressed to {humanizeBytes(item.encoded_body_size)} saving{' '} + {compressionPercentage.toFixed(1)}% + + ) : null} + . +

+ )}