From 052a83379af2ae24f581a168306fb1313310e20c Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Tue, 18 Feb 2025 15:57:13 +0100 Subject: [PATCH] Increase GraphQL benchmark stability (#5284) --- benchmark/sirun/plugin-graphql/meta.json | 2 +- benchmark/sirun/plugin-graphql/schema.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/sirun/plugin-graphql/meta.json b/benchmark/sirun/plugin-graphql/meta.json index 0b5003978dc..ecc7c6cee61 100644 --- a/benchmark/sirun/plugin-graphql/meta.json +++ b/benchmark/sirun/plugin-graphql/meta.json @@ -3,7 +3,7 @@ "run": "node index.js", "run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node index.js\"", "cachegrind": false, - "iterations": 2, + "iterations": 30, "instructions": true, "variants": { "control": {}, diff --git a/benchmark/sirun/plugin-graphql/schema.js b/benchmark/sirun/plugin-graphql/schema.js index d7da47739b9..ea748c5bb79 100644 --- a/benchmark/sirun/plugin-graphql/schema.js +++ b/benchmark/sirun/plugin-graphql/schema.js @@ -94,7 +94,7 @@ const Human = new graphql.GraphQLObjectType({ async resolve (obj, args) { const promises = [] - for (let i = 0; i < 100; i++) { + for (let i = 0; i < 20; i++) { promises.push(await Promise.resolve({})) } @@ -115,7 +115,7 @@ const schema = new graphql.GraphQLSchema({ async resolve (obj, args) { const promises = [] - for (let i = 0; i < 100; i++) { + for (let i = 0; i < 20; i++) { promises.push(await Promise.resolve({})) }