fix scripts, support SAMPLE_COUNT
This commit is contained in:
parent
e079404f7c
commit
e07236c22d
|
@ -13,7 +13,7 @@ export const measure = (cb, times = 1) => {
|
||||||
export const red = (str) => `\x1b[31m${str}\x1b[0m`;
|
export const red = (str) => `\x1b[31m${str}\x1b[0m`;
|
||||||
export const green = (str) => `\x1b[32m${str}\x1b[0m`;
|
export const green = (str) => `\x1b[32m${str}\x1b[0m`;
|
||||||
|
|
||||||
export const run = (src, { output, sampleCount }) => {
|
export const run = (src, { output, sampleCount } = {}) => {
|
||||||
const project = SqProject.create();
|
const project = SqProject.create();
|
||||||
if (sampleCount) {
|
if (sampleCount) {
|
||||||
project.setEnvironment({
|
project.setEnvironment({
|
||||||
|
|
|
@ -7,4 +7,6 @@ if (!src) {
|
||||||
}
|
}
|
||||||
console.log(`Running ${src}`);
|
console.log(`Running ${src}`);
|
||||||
|
|
||||||
run(src);
|
const sampleCount = process.env.SAMPLE_COUNT;
|
||||||
|
|
||||||
|
run(src, { output: true, sampleCount });
|
||||||
|
|
Loading…
Reference in New Issue
Block a user