diff --git a/packages/trace-viewer/src/ui/callTab.tsx b/packages/trace-viewer/src/ui/callTab.tsx index 6c1547a9a3f36..1c78920f86e0f 100644 --- a/packages/trace-viewer/src/ui/callTab.tsx +++ b/packages/trace-viewer/src/ui/callTab.tsx @@ -27,10 +27,9 @@ import type { ActionTraceEventInContext } from './modelUtil'; export const CallTab: React.FunctionComponent<{ action: ActionTraceEventInContext | undefined, - executionStartTime: number, - executionStartWallTime: number, + startTimeOffset: number, sdkLanguage: Language | undefined, -}> = ({ action, executionStartTime, executionStartWallTime, sdkLanguage }) => { +}> = ({ action, startTimeOffset, sdkLanguage }) => { // We never need the waitForEventInfo (`info`). const paramKeys = React.useMemo(() => Object.keys(action?.params ?? {}).filter(name => name !== 'info'), [action]); @@ -38,12 +37,9 @@ export const CallTab: React.FunctionComponent<{ return ; // Calculate execution time relative to the test runner's start time - const startTimeMillis = action.startTime - executionStartTime; + const startTimeMillis = action.startTime - startTimeOffset; const startTime = msToString(startTimeMillis); - const wallTimeMillis = startTimeMillis + executionStartWallTime; - const wallTime = new Date(wallTimeMillis).toLocaleString(undefined, { timeZoneName: 'short' }); - const duration = action.endTime ? msToString(action.endTime - action.startTime) : 'Timed Out'; return ( @@ -52,7 +48,6 @@ export const CallTab: React.FunctionComponent<{ { <>
Time
- diff --git a/packages/trace-viewer/src/ui/networkResourceDetails.tsx b/packages/trace-viewer/src/ui/networkResourceDetails.tsx index f39fe9127fdff..aaa78d17860a0 100644 --- a/packages/trace-viewer/src/ui/networkResourceDetails.tsx +++ b/packages/trace-viewer/src/ui/networkResourceDetails.tsx @@ -65,8 +65,6 @@ const RequestTab: React.FunctionComponent<{ }> = ({ resource, sdkLanguage, startTimeOffset }) => { const [requestBody, setRequestBody] = React.useState<{ text: string, mimeType?: string } | null>(null); - const wallTimeString = React.useMemo(() => resource.startedDateTime.length > 0 ? new Date(resource.startedDateTime).toLocaleString(undefined, { timeZoneName: 'short' }) : '-', [resource.startedDateTime]); - React.useEffect(() => { const readResources = async () => { if (resource.request.postData) { @@ -102,7 +100,6 @@ const RequestTab: React.FunctionComponent<{
Request Headers
{resource.request.headers.map(pair => `${pair.name}: ${pair.value}`).join('\n')}
Time
-
{`Wall Time: ${wallTimeString}`}
{`Start: ${msToString(startTimeOffset)}`}
{`Duration: ${msToString(resource.time)}`}
diff --git a/packages/trace-viewer/src/ui/workbench.tsx b/packages/trace-viewer/src/ui/workbench.tsx index deb325d271ece..7a14d495c69a6 100644 --- a/packages/trace-viewer/src/ui/workbench.tsx +++ b/packages/trace-viewer/src/ui/workbench.tsx @@ -176,7 +176,7 @@ export const Workbench: React.FunctionComponent<{ const callTab: TabbedPaneTabModel = { id: 'call', title: 'Call', - render: () => + render: () => }; const logTab: TabbedPaneTabModel = { id: 'log',