mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-22 09:13:01 +00:00
wrangler: add current date to process indicator.
There's a bug that causes it to hang, but we don't know why
This commit is contained in:
parent
231c832888
commit
5880bf9020
1 changed files with 1 additions and 2 deletions
|
@ -23,7 +23,7 @@ export default async function(dirpath_source, dirpath_target) {
|
||||||
let time_start = new Date(), lines_processed = 0, files_processed = 0;
|
let time_start = new Date(), lines_processed = 0, files_processed = 0;
|
||||||
|
|
||||||
const update_progress_force = () => {
|
const update_progress_force = () => {
|
||||||
process.stdout.write(`${files_processed}/${lines_processed} files/lines complete | ${((new Date() - time_start) / lines_processed).toFixed(3)} lines/sec | ${((files_processed / files.length)*100).toFixed(2)}% complete\r`);
|
process.stdout.write(`${files_processed}/${lines_processed} files/lines complete | ${((new Date() - time_start) / lines_processed).toFixed(3)} lines/sec | ${((files_processed / files.length)*100).toFixed(2)}% complete | now: ${new Date().toISOString()}\r`);
|
||||||
};
|
};
|
||||||
const update_progress = debounce(update_progress_force, 2000);
|
const update_progress = debounce(update_progress_force, 2000);
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ export default async function(dirpath_source, dirpath_target) {
|
||||||
update_progress();
|
update_progress();
|
||||||
}
|
}
|
||||||
files_processed++;
|
files_processed++;
|
||||||
l.info(`DEBUG lines_done`, lines_done);
|
|
||||||
|
|
||||||
const time_per_line = (new Date() - time_start) / (lines_done === 0 ? 1 : lines_done);
|
const time_per_line = (new Date() - time_start) / (lines_done === 0 ? 1 : lines_done);
|
||||||
l.log(`converted ${filename}: ${lines_done} lines @ ${pretty_ms(time_per_line)}/line`);
|
l.log(`converted ${filename}: ${lines_done} lines @ ${pretty_ms(time_per_line)}/line`);
|
||||||
|
|
Loading…
Reference in a new issue