(items, size)
| 593 | // slice is the remainder (length === size when items.length is a multiple of |
| 594 | // size, otherwise items.length mod size). |
| 595 | function chunkArray(items, size) { |
| 596 | const chunks = []; |
| 597 | for (let i = 0; i < items.length; i += size) { |
| 598 | chunks.push(items.slice(i, i + size)); |
| 599 | } |
| 600 | return chunks; |
| 601 | } |
| 602 | |
| 603 | function setStatsOutputs(out, stats, batchCounters, batchSize) { |
| 604 | out("comments_total", String(stats.total)); |
no outgoing calls