Commit 68bd3eda authored by nanahira's avatar nanahira

min

parent 445eac3f
Pipeline #11598 passed with stages
in 44 seconds
......@@ -3,7 +3,7 @@ import fs from 'fs';
import _ from 'lodash';
let current = parseInt(process.env.CURRENT || '0', 36);
let max = parseInt(process.env.MAX || 'ZZZZ', 36);
const max = parseInt(process.env.MAX || 'ZZZZ', 36);
const parallel = parseInt(process.env.PARALLEL) || 10;
const useCode = async (n: number) => {
......@@ -40,7 +40,7 @@ const useCode = async (n: number) => {
async function main() {
while (current <= max) {
const start = current;
const end = start + parallel;
const end = Math.min(current + parallel, max + 1);
console.log(`Running ${start} - ${end - 1}`);
const ranges = _.range(start, end);
await Promise.all(ranges.map(useCode));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment