File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import nodeTimesPromises from "node:timers/promises" ;
22import * as cloudflare from "./cloudflare" ;
33import { benchmarkApplicationResponseTime , BenchmarkingResults , saveResultsToDisk } from "./benchmarking" ;
4- import { runOperationsWithSpinner } from "./utils" ;
4+ import { parallelRunWithSpinner } from "./utils" ;
55
66const appPathsToBenchmark = await cloudflare . collectAppPathsToBenchmark ( ) ;
77
8- const benchmarkingResults : BenchmarkingResults = await runOperationsWithSpinner (
8+ const benchmarkingResults : BenchmarkingResults = await parallelRunWithSpinner (
99 "Benchmarking Apps" ,
1010 appPathsToBenchmark . map ( ( { name, path } , i ) => async ( ) => {
1111 await nodeTimesPromises . setTimeout ( i * 1_000 ) ;
Original file line number Diff line number Diff line change 11import ora from "ora" ;
22
33/**
4- * Runs a list of operations while presenting a loading spinner with some text
4+ * Runs a list of operations in parallel while presenting a loading spinner with some text
55 *
66 * @param spinnerText The text to add to the spinner
77 * @param operations The operations to run
88 * @returns The operations results
99 */
10- export async function runOperationsWithSpinner < T > (
10+ export async function parallelRunWithSpinner < T > (
1111 spinnerText : string ,
1212 operations : ( ( ) => Promise < T > ) [ ]
1313) : Promise < T [ ] > {
You can’t perform that action at this time.
0 commit comments