Skip to content

Commit

Permalink
test: update test for presetMap's existence
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Jun 28, 2024
1 parent 4f93223 commit 003a2c8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/registry/presetTesting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ type RegistryIterator = {
registry: MetadataRegistry;
};

const registriesFromPresets = fs.readdirSync(presetFolder, { withFileTypes: true }).map((file) => ({
name: file.name,
registry: JSON.parse(fs.readFileSync(path.join(file.path, file.name), 'utf-8')) as MetadataRegistry,
}));
const registriesFromPresets = fs
.readdirSync(presetFolder, { withFileTypes: true })
.filter((file) => file.name.endsWith('.json'))
.map((file) => ({
name: file.name,
registry: JSON.parse(fs.readFileSync(path.join(file.path, file.name), 'utf-8')) as MetadataRegistry,
}));

const allMerged = registriesFromPresets.reduce<MetadataRegistry>(
(acc, { registry }) => firstLevelMerge(acc, registry),
Expand Down

2 comments on commit 003a2c8

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 003a2c8 Previous: ff9c8d0 Ratio
eda-componentSetCreate-linux 185 ms 181 ms 1.02
eda-sourceToMdapi-linux 1981 ms 2006 ms 0.99
eda-sourceToZip-linux 1829 ms 1832 ms 1.00
eda-mdapiToSource-linux 2850 ms 2892 ms 0.99
lotsOfClasses-componentSetCreate-linux 406 ms 420 ms 0.97
lotsOfClasses-sourceToMdapi-linux 3807 ms 3888 ms 0.98
lotsOfClasses-sourceToZip-linux 3138 ms 3268 ms 0.96
lotsOfClasses-mdapiToSource-linux 3504 ms 3609 ms 0.97
lotsOfClassesOneDir-componentSetCreate-linux 629 ms 640 ms 0.98
lotsOfClassesOneDir-sourceToMdapi-linux 6519 ms 6702 ms 0.97
lotsOfClassesOneDir-sourceToZip-linux 5758 ms 6016 ms 0.96
lotsOfClassesOneDir-mdapiToSource-linux 6324 ms 6590 ms 0.96

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 003a2c8 Previous: ff9c8d0 Ratio
eda-componentSetCreate-win32 413 ms 425 ms 0.97
eda-sourceToMdapi-win32 3747 ms 3694 ms 1.01
eda-sourceToZip-win32 2948 ms 2875 ms 1.03
eda-mdapiToSource-win32 6145 ms 6093 ms 1.01
lotsOfClasses-componentSetCreate-win32 920 ms 924 ms 1.00
lotsOfClasses-sourceToMdapi-win32 8137 ms 8033 ms 1.01
lotsOfClasses-sourceToZip-win32 5147 ms 5307 ms 0.97
lotsOfClasses-mdapiToSource-win32 8255 ms 8139 ms 1.01
lotsOfClassesOneDir-componentSetCreate-win32 1623 ms 1633 ms 0.99
lotsOfClassesOneDir-sourceToMdapi-win32 14611 ms 14516 ms 1.01
lotsOfClassesOneDir-sourceToZip-win32 8773 ms 9238 ms 0.95
lotsOfClassesOneDir-mdapiToSource-win32 13464 ms 13608 ms 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.