Merge dependabot/npm_and_yarn/examples/typescript/http-server-pool/fastify-cluster...
[poolifier.git] / examples / typescript / http-client-pool / src / main.ts
index 41028e630fca19b8759790d8bfb5c30b5e773c9a..696671eaeb8e0e81b7b27ee1119704b289e2afd2 100644 (file)
@@ -1,4 +1,5 @@
 import { availableParallelism } from 'poolifier'
+
 import { httpClientPool } from './pool.js'
 import type { WorkerResponse } from './types.js'
 
@@ -17,9 +18,9 @@ for (const workerFunction of ['node_fetch', 'fetch', 'axios']) {
     const responses = await Promise.all(httpClientPoolPromises)
     const elapsedTime = performance.now() - now
     console.info(
-      `Received in ${elapsedTime.toFixed(2)}ms an array with ${
-        responses.length
-      } responses from ${parallelism} parallel requests made with HTTP client pool task function ${workerFunction} on ${requestUrl}:\n`,
+      `Received in ${elapsedTime.toFixed(
+        2
+      )}ms an array with ${responses.length.toString()} responses from ${parallelism.toString()} parallel requests made with HTTP client pool task function ${workerFunction} on ${requestUrl}:\n`,
       responses
     )
   } catch (error) {