Skip to content

Commit

Permalink
make wallTime mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed May 14, 2024
1 parent 69a9297 commit db0cd1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 2 additions & 5 deletions packages/trace-viewer/src/ui/callTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ export const CallTab: React.FunctionComponent<{
// Strip down the waitForEventInfo data, we never need it.
delete params.info;
const paramKeys = Object.keys(params);
let wallTime = null;
if (action.context.wallTime) {
const timeMillis = action.startTime + (action.context.wallTime - action.context.startTime);
wallTime = new Date(timeMillis).toLocaleString();
}
const timeMillis = action.startTime + (action.context.wallTime - action.context.startTime);
const wallTime = new Date(timeMillis).toLocaleString();
const duration = action.endTime ? msToString(action.endTime - action.startTime) : 'Timed Out';

return <div className='call-tab'>
Expand Down
3 changes: 1 addition & 2 deletions packages/trace-viewer/src/ui/logTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ export const LogTab: React.FunctionComponent<{
if (!action || !action.log.length)
return [];
const log = action.log;
// TODO: store context metadata for test runner context.
const wallTimeOffset = (action.context.wallTime || action.context.startTime) - action.context.startTime;
const wallTimeOffset = action.context.wallTime - action.context.startTime;
const entries: { message: string, time: string }[] = [];
for (let i = 0; i < log.length; ++i) {
let time = '';
Expand Down

0 comments on commit db0cd1d

Please sign in to comment.