mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
adding init to non experiment too #299
This commit is contained in:
parent
ca16ce0c83
commit
b4c64d1247
@ -87,10 +87,8 @@ export class Benchmark {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(RUNS: number): Promise<BenchmarkResult[]> {
|
async run(RUNS: number): Promise<BenchmarkResult[]> {
|
||||||
const ret = [await this.runAnExperiment(RUNS)];
|
const ret: BenchmarkResult[] = [];
|
||||||
for (const exp of Object.values(Experiments)) {
|
const r = async (): Promise<void> => {
|
||||||
for (const group of Object.values(exp.groups)) {
|
|
||||||
ActiveExperiments[exp.name] = group;
|
|
||||||
if (this.beforeAll) {
|
if (this.beforeAll) {
|
||||||
await this.beforeAll();
|
await this.beforeAll();
|
||||||
}
|
}
|
||||||
@ -98,6 +96,13 @@ export class Benchmark {
|
|||||||
if (this.afterAll) {
|
if (this.afterAll) {
|
||||||
await this.afterAll();
|
await this.afterAll();
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
await r();
|
||||||
|
for (const exp of Object.values(Experiments)) {
|
||||||
|
for (const group of Object.values(exp.groups)) {
|
||||||
|
ActiveExperiments[exp.name] = group;
|
||||||
|
await r();
|
||||||
ret[ret.length - 1].experiment = exp.name + '=' + group;
|
ret[ret.length - 1].experiment = exp.name + '=' + group;
|
||||||
}
|
}
|
||||||
delete ActiveExperiments[exp.name];
|
delete ActiveExperiments[exp.name];
|
||||||
|
Loading…
Reference in New Issue
Block a user