mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-31 07:11:33 +00:00
add elapsed time to scripts/thumbs.js
This commit is contained in:
parent
26686298e0
commit
1eb6adea96
@ -52,6 +52,7 @@ const self = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log('Looking through existing thumbnails\u2026')
|
console.log('Looking through existing thumbnails\u2026')
|
||||||
|
const hrstart = process.hrtime()
|
||||||
const uploads = await db.table('files')
|
const uploads = await db.table('files')
|
||||||
.select('id', 'name')
|
.select('id', 'name')
|
||||||
const thumbs = await self.getFiles(paths.thumbs)
|
const thumbs = await self.getFiles(paths.thumbs)
|
||||||
@ -102,8 +103,10 @@ const self = {
|
|||||||
clearInterval(progressInterval)
|
clearInterval(progressInterval)
|
||||||
printProgress()
|
printProgress()
|
||||||
|
|
||||||
|
const hrend = process.hrtime(hrstart)
|
||||||
console.log(utils.stripIndents(`
|
console.log(utils.stripIndents(`
|
||||||
---
|
---
|
||||||
|
Done in: ${(hrend[0] + (hrend[1] / 1e9)).toFixed(4)}s
|
||||||
Success: ${succeeded.length}
|
Success: ${succeeded.length}
|
||||||
Error: ${error}
|
Error: ${error}
|
||||||
Already exists: ${exists}
|
Already exists: ${exists}
|
||||||
|
Loading…
Reference in New Issue
Block a user