aboutsummaryrefslogtreecommitdiff
path: root/bin/reduceOverlap.js
diff options
context:
space:
mode:
authorAndrew Harvey <andrew@alantgeo.com.au>2021-05-16 18:57:07 +1000
committerAndrew Harvey <andrew@alantgeo.com.au>2021-05-16 18:57:07 +1000
commit426412dd82ac213d4427ad50591a907dc38574db (patch)
tree0da6274366e22f9ccfae0fe8eee3045801bb1332 /bin/reduceOverlap.js
parent797ea370a4f72abe9d737e737c65040cbb5e7fc5 (diff)
only log progress on TTY to avoid logging to gitlab ci
Diffstat (limited to 'bin/reduceOverlap.js')
-rwxr-xr-xbin/reduceOverlap.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/reduceOverlap.js b/bin/reduceOverlap.js
index c5da852..62ba10d 100755
--- a/bin/reduceOverlap.js
+++ b/bin/reduceOverlap.js
@@ -41,7 +41,7 @@ const index = new Transform({
sourceCount++
if (!argv.quiet) {
- if (sourceCount % 10000 === 0) {
+ if (process.stdout.isTTY && sourceCount % 10000 === 0) {
process.stdout.write(` ${sourceCount / 1000}k\r`)
}
}
@@ -67,7 +67,7 @@ const reduce = new Transform({
transform(key, encoding, callback) {
reduceIndex++
if (!argv.quiet) {
- if (reduceIndex % 10000 === 0) {
+ if (process.stdout.isTTY && reduceIndex % 10000 === 0) {
process.stdout.write(` ${reduceIndex / 1000}k / ${Math.round(sourceCount / 1000)}k (${Math.round(reduceIndex / sourceCount * 100)}%)\r`)
}
}