Skip to content

Support per-benchmark-suite setup and teardown #58488

Open
@joyeecheung

Description

@joyeecheung

Currently with the benchmark utility, if a benchmark needs to perform setup and tear down, it can only be done on a per-run basis. A good example would be:

createEntryPoint(n);

This benchmark needs to create 10K files per-run, so for 60 runs * 3 configurations, it needs to create and delete 60 * 3 * 10K files, so the majority of the time spent on running the benchmark come from this process instead of the actual benchmarking that's done in between.

If for example we support setup and teardown on a per-suite basis (it doesn't necessarily have to be config-specific, a benchmark can do a setup for all the configs in one setup/teardown pair), then this would be reduced to only creating/deleting 3 * 10K files.

The setup/teardown should probably be done somewhere around here - before starting the queue and after executing the last job in the queue:

node/benchmark/common.js

Lines 234 to 241 in 7178588

if (queueIndex + 1 < this.queue.length) {
recursive(queueIndex + 1);
}
});
};
recursive(0);

Metadata

Metadata

Assignees

No one assigned

    Labels

    benchmarkIssues and PRs related to the benchmark subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions