Skip to content

Commit 552fd68

Browse files
rename runOperationsWithSpinner to parallelRunWithSpinner
1 parent e7d289e commit 552fd68

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

benchmarking/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import nodeTimesPromises from "node:timers/promises";
22
import * as cloudflare from "./cloudflare";
33
import { benchmarkApplicationResponseTime, BenchmarkingResults, saveResultsToDisk } from "./benchmarking";
4-
import { runOperationsWithSpinner } from "./utils";
4+
import { parallelRunWithSpinner } from "./utils";
55

66
const 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);

benchmarking/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import 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[]> {

0 commit comments

Comments
 (0)