Skip to content

Commit

Permalink
Added more stats to the summary.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleydavis committed Jun 21, 2024
1 parent f934740 commit 0bff751
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/upload/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ async function main(): Promise<void> {

numProcessed += chunk.length;
if ((numProcessed % 100) === 0) {
console.log(`Processed ${numProcessed} of ${files.length} assets.`)
console.log(`Processed ${numProcessed} of ${files.length} assets.`);
}
}

Expand All @@ -295,14 +295,16 @@ async function main(): Promise<void> {
// }

console.log(`-- Summary --`);
console.log(`Total files found: ${files.length}`);
console.log(`Processed: ${numProcessed}`);
console.log(`Uploaded: ${numUploads}`);
console.log(`Already uploaded: ${numAlreadyUploaded}`);
console.log(`Failed: ${numFailed}`);
console.log(`Not handled: ${filesNotHandled.length}`);

await fs.writeFile("./log/failures.json", JSON.stringify(failures, null, 2));
await fs.writeFile("./log/files-not-handled.json", JSON.stringify(filesNotHandled, null, 2));
await fs.writeFile("./log/summary.json", JSON.stringify({ numProcessed, numUploads, numAlreadyUploaded, numFailed, numNotHandled: filesNotHandled.length }, null, 2));
await fs.writeFile("./log/summary.json", JSON.stringify({ numFiles: files.length, numProcessed, numUploads, numAlreadyUploaded, numFailed, numNotHandled: filesNotHandled.length }, null, 2));
}

main()
Expand Down

0 comments on commit 0bff751

Please sign in to comment.