Skip to content

Commit

Permalink
Added total runtime stat to the end of the backup process. Upgraded W…
Browse files Browse the repository at this point in the history
…ebdriverIO to v8.0.9.
  • Loading branch information
jamesmortensen committed Dec 11, 2022
1 parent 78ccce9 commit 94264ae
Show file tree
Hide file tree
Showing 3 changed files with 1,769 additions and 622 deletions.
6 changes: 6 additions & 0 deletions keep.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@ if(fs.existsSync('./output'))
return;
}

const startTimeInMillis = new Date().getTime();

await scrollToBottom(browser);
const cards = await scrapeCardsFromBrowser(browser);
await browser.deleteSession();

const outputFolder = './output';
writeCardsToOutputFolder(cards, outputFolder);

const stopTimeInMillis = new Date().getTime();
const totalTimeInSeconds = parseInt((stopTimeInMillis - startTimeInMillis) / 1000);

console.log('Total cards processed: ' + cards.length);
console.log('Total processing time: ' + totalTimeInSeconds + ' seconds');
})().catch((e) => console.error(e));


Expand Down
Loading

0 comments on commit 94264ae

Please sign in to comment.