From 02895e287e4af2672316a07103307b1bd1b7354c Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Fri, 20 Jan 2023 10:48:16 -0700 Subject: [PATCH] fix: await SVS promises to write to manifest (#824) * fix: await SVS promises to write to manifest * test: record perf Co-authored-by: svc-cli-bot --- src/resolve/connectionResolver.ts | 4 ++-- .../eda.json | 10 +++++----- .../lotsOfClasses.json | 10 +++++----- .../lotsOfClassesOneDir.json | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/resolve/connectionResolver.ts b/src/resolve/connectionResolver.ts index 893dab08a4..1aa674bce4 100644 --- a/src/resolve/connectionResolver.ts +++ b/src/resolve/connectionResolver.ts @@ -43,7 +43,7 @@ export class ConnectionResolver { for (const type of Object.values(defaultRegistry.types)) { componentPromises.push(this.listMembers({ type: type.name })); } - for await (const componentResult of componentPromises) { + (await Promise.all(componentPromises)).map((componentResult) => { for (const component of componentResult) { let componentType: MetadataType; if (typeof component.type === 'string' && component.type.length) { @@ -65,7 +65,7 @@ export class ConnectionResolver { ); } } - } + }); for (const componentType of componentTypes) { const childTypes = componentType.children?.types; diff --git a/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/eda.json b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/eda.json index 733e7d9381..261c132428 100644 --- a/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/eda.json +++ b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/eda.json @@ -1,18 +1,18 @@ [ { "name": "componentSetCreate", - "duration": 205.9563119999948 + "duration": 198.92172899999423 }, { "name": "sourceToMdapi", - "duration": 4378.968104 + "duration": 5480.34475400002 }, { "name": "sourceToZip", - "duration": 4546.189135999972 + "duration": 4789.906298000016 }, { "name": "mdapiToSource", - "duration": 3211.6969230000104 + "duration": 3239.999051999999 } -] +] \ No newline at end of file diff --git a/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/lotsOfClasses.json b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/lotsOfClasses.json index a376bf6e32..160ad816fe 100644 --- a/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/lotsOfClasses.json +++ b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/lotsOfClasses.json @@ -1,18 +1,18 @@ [ { "name": "componentSetCreate", - "duration": 400.98173400000087 + "duration": 399.53083800000604 }, { "name": "sourceToMdapi", - "duration": 7388.940780999983 + "duration": 7351.337771999999 }, { "name": "sourceToZip", - "duration": 6964.524367000005 + "duration": 6310.047179999994 }, { "name": "mdapiToSource", - "duration": 4194.718434999988 + "duration": 4046.419279999973 } -] +] \ No newline at end of file diff --git a/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/lotsOfClassesOneDir.json b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/lotsOfClassesOneDir.json index d153372c46..f2bc89ea82 100644 --- a/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/lotsOfClassesOneDir.json +++ b/test/nuts/perfResults/x64-linux-2xIntel-Xeon-Platinum-8370C-CPU-2-80GHz/lotsOfClassesOneDir.json @@ -1,18 +1,18 @@ [ { "name": "componentSetCreate", - "duration": 671.8695390000066 + "duration": 671.900335000013 }, { "name": "sourceToMdapi", - "duration": 10004.596346000035 + "duration": 10744.23318500002 }, { "name": "sourceToZip", - "duration": 8548.78807000001 + "duration": 9120.372635999986 }, { "name": "mdapiToSource", - "duration": 7116.019726000028 + "duration": 7370.606044000015 } -] +] \ No newline at end of file