Skip to content

Commit

Permalink
fix up benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxu committed Feb 2, 2025
1 parent adc238b commit 007598c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bench/tunes.bench.mjs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { queryCode, testCycles } from '../test/runtime.mjs';
import * as tunes from '../website/src/repl/tunes.mjs';
import { describe, bench } from 'vitest';
import { calculateTactus } from '../packages/core/index.mjs';
import { calculateSteps } from '../packages/core/index.mjs';

const tuneKeys = Object.keys(tunes);

describe('renders tunes', () => {
tuneKeys.forEach((key) => {
describe(key, () => {
calculateTactus(true);
bench(`+tactus`, async () => {
calculateSteps(true);
bench(`+steps`, async () => {
await queryCode(tunes[key], testCycles[key] || 1);
});
calculateTactus(false);
bench(`-tactus`, async () => {
calculateSteps(false);
bench(`-steps`, async () => {
await queryCode(tunes[key], testCycles[key] || 1);
});
calculateTactus(true);
calculateSteps(true);
});
});
});

0 comments on commit 007598c

Please sign in to comment.