Skip to content

Commit

Permalink
fix: only posix paths added via createMockZip
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Oct 24, 2023
1 parent 9b41af2 commit 9f3c0c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/mock/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import * as JSZip from 'jszip';
export async function createMockZip(entries: string[]): Promise<Buffer> {
const zip = JSZip();
for (const entry of entries) {
zip.file(entry, '');
// Ensure only posix paths are added to zip files
const relPosixPath = entry.replace(/\\/g, '/');
zip.file(relPosixPath, '');
}
return zip.generateAsync({
type: 'nodebuffer',
Expand Down

2 comments on commit 9f3c0c1

@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: 9f3c0c1 Previous: 9b41af2 Ratio
eda-componentSetCreate-linux 333 ms 446 ms 0.75
eda-sourceToMdapi-linux 7561 ms 9049 ms 0.84
eda-sourceToZip-linux 6140 ms 7438 ms 0.83
eda-mdapiToSource-linux 4675 ms 6402 ms 0.73
lotsOfClasses-componentSetCreate-linux 754 ms 906 ms 0.83
lotsOfClasses-sourceToMdapi-linux 10903 ms 14395 ms 0.76
lotsOfClasses-sourceToZip-linux 9157 ms 9928 ms 0.92
lotsOfClasses-mdapiToSource-linux 5566 ms 8080 ms 0.69
lotsOfClassesOneDir-componentSetCreate-linux 1061 ms 1443 ms 0.74
lotsOfClassesOneDir-sourceToMdapi-linux 15206 ms 20109 ms 0.76
lotsOfClassesOneDir-sourceToZip-linux 14828 ms 15910 ms 0.93
lotsOfClassesOneDir-mdapiToSource-linux 10582 ms 13794 ms 0.77

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: 9f3c0c1 Previous: 9b41af2 Ratio
eda-componentSetCreate-win32 784 ms 601 ms 1.30
eda-sourceToMdapi-win32 12712 ms 10376 ms 1.23
eda-sourceToZip-win32 8269 ms 8158 ms 1.01
eda-mdapiToSource-win32 11739 ms 9434 ms 1.24
lotsOfClasses-componentSetCreate-win32 1827 ms 1274 ms 1.43
lotsOfClasses-sourceToMdapi-win32 22155 ms 17604 ms 1.26
lotsOfClasses-sourceToZip-win32 12484 ms 11438 ms 1.09
lotsOfClasses-mdapiToSource-win32 14421 ms 11246 ms 1.28
lotsOfClassesOneDir-componentSetCreate-win32 3125 ms 2311 ms 1.35
lotsOfClassesOneDir-sourceToMdapi-win32 32512 ms 26570 ms 1.22
lotsOfClassesOneDir-sourceToZip-win32 19291 ms 18642 ms 1.03
lotsOfClassesOneDir-mdapiToSource-win32 26327 ms 20488 ms 1.28

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

Please sign in to comment.