mirror of
https://github.com/sbrl/terrain50-cli.git
synced 2024-11-22 06:53:01 +00:00
stream-slice: fix percentage calculation
This commit is contained in:
parent
071e46abb0
commit
80dbe4696e
1 changed files with 5 additions and 2 deletions
|
@ -41,8 +41,11 @@ export default async function(settings) {
|
|||
let is_last = i - offset >= count;
|
||||
await next.serialise(stream_out, is_last);
|
||||
|
||||
let percentage = percentage(i - offset, count);
|
||||
process.stderr.write(`Written ${i - offset} / count objects (~${count.toFixed(2)}%) \r`);
|
||||
if(is_last) break;
|
||||
|
||||
process.stderr.write(`Written ${i - offset} / count objects (~${percentage(i - offset, count).toFixed(2)}%) \r`);
|
||||
}
|
||||
l.log(`Slicing complete`);
|
||||
|
||||
stream_in.close();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue