fix scripts, support SAMPLE_COUNT

This commit is contained in:
Vyacheslav Matyukhin 2022-09-20 20:54:26 +04:00
parent e079404f7c
commit e07236c22d
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,7 @@ export const measure = (cb, times = 1) => {
export const red = (str) => `\x1b[31m${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();
if (sampleCount) {
project.setEnvironment({

View File

@ -7,4 +7,6 @@ if (!src) {
}
console.log(`Running ${src}`);
run(src);
const sampleCount = process.env.SAMPLE_COUNT;
run(src, { output: true, sampleCount });