X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fhttp-client-pool%2Fsrc%2Fmain.ts;h=722de1e6dc200bbc535f1dfce8db4516d6c95d58;hb=394676d15b59b7013b9d95889e47a4a49860b057;hp=f307bb622ca7e5dbe549be2fffe33991e0caa547;hpb=c97a785f1274883c88a77d2bf418ba6480d20d04;p=poolifier.git diff --git a/examples/typescript/http-client-pool/src/main.ts b/examples/typescript/http-client-pool/src/main.ts index f307bb62..722de1e6 100644 --- a/examples/typescript/http-client-pool/src/main.ts +++ b/examples/typescript/http-client-pool/src/main.ts @@ -1,6 +1,7 @@ import { availableParallelism } from 'poolifier' + import { httpClientPool } from './pool.js' -import { type WorkerResponse } from './types.js' +import type { WorkerResponse } from './types.js' const parallelism = availableParallelism() * 2 const requestUrl = 'http://localhost:8080/' @@ -19,7 +20,7 @@ for (const workerFunction of ['node_fetch', 'fetch', 'axios']) { console.info( `Received in ${elapsedTime.toFixed(2)}ms an array with ${ responses.length - } responses from ${parallelism} parallel requests made with ${workerFunction} on ${requestUrl}:\n`, + } responses from ${parallelism} parallel requests made with HTTP client pool task function ${workerFunction} on ${requestUrl}:\n`, responses ) } catch (error) {