15 lines
574 B
JavaScript
15 lines
574 B
JavaScript
export function createRunSummary(program, runtime = {}, snapshot = null) {
|
|
const metadata = snapshot?.metadata ?? {};
|
|
return {
|
|
runStatus: runtime.runStatus ?? "ok",
|
|
programSource: program.source,
|
|
snapshotLabel: runtime.snapshotLabel ?? metadata.snapshotLabel ?? null,
|
|
workflow: metadata.workflow ?? null,
|
|
programOpfsPath: program.opfsPath,
|
|
programWasmPath: program.wasmPath,
|
|
iniWasmPath: runtime.iniWasmPath ?? null,
|
|
canonicalEventCount: runtime.canonicalEventCount ?? 0,
|
|
motionSnapshotCount: runtime.motionSnapshotCount ?? 0,
|
|
};
|
|
}
|