MCPcopy Create free account
hub / github.com/bytebase/bytebase / getCommandDuration

Function getCommandDuration

frontend/src/react/components/task-run-log/model.ts:457–463  ·  view source on GitHub ↗
(entry: TaskRunLogEntry)

Source from the content-addressed store, hash-verified

455};
456
457const getCommandDuration = (entry: TaskRunLogEntry): string | undefined => {
458 if (entry.type !== TaskRunLogEntry_Type.COMMAND_EXECUTE) return undefined;
459 const startMs = getTimestampMs(entry.commandExecute?.logTime);
460 const endMs = getTimestampMs(entry.commandExecute?.response?.logTime);
461 if (startMs <= 0 || endMs <= 0) return undefined;
462 return formatDuration(endMs - startMs);
463};
464
465const buildDisplayItems = (
466 entries: TaskRunLogEntry[],

Callers 1

buildDisplayItemsFunction · 0.85

Calls 2

getTimestampMsFunction · 0.85
formatDurationFunction · 0.70

Tested by

no test coverage detected