Skip to content

Commit

Permalink
Merge pull request #24825 from storybookjs/yann/log-benchmark-error
Browse files Browse the repository at this point in the history
Build: Log benchmark task error
(cherry picked from commit 36b2baf)
  • Loading branch information
shilman authored and storybook-bot committed Nov 15, 2023
1 parent 7db212f commit 67bd6d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/tasks/bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { PORT as servePort, serve } from './serve';
// eslint-disable-next-line @typescript-eslint/no-implied-eval
const dynamicImport = new Function('specifier', 'return import(specifier)');

const logger = console;

export const bench: Task = {
description: 'Run benchmarks against a sandbox in dev mode',
dependsOn: ['build'],
Expand Down Expand Up @@ -72,6 +74,10 @@ export const bench: Task = {
}
});
} catch (e) {
logger.log(
`An error occurred while running the benchmarks for the ${details.sandboxDir} sandbox`
);
logger.error(e);
controllers.forEach((c) => c.abort());
throw e;
}
Expand Down

0 comments on commit 67bd6d5

Please sign in to comment.