This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add NFT bundler * chore: add benchmark for NFT * chore: fix usage of `basePath` in tests * refactor: add `basePath` to `listFunctionsFiles` * chore: add `repositoryRoot` test * chore: remove docs for `repositoryRoot` This property will likely get deprecated in a future version * feat: use `repositoryRoot` in NFT * refactor: use `repositoryRoot` in `getSrcFiles` * chore: increase maximum number of open files * chore: increase open file limit in MacOS
- Loading branch information
1 parent
7fe58f1
commit 8e09e87
Showing
23 changed files
with
1,686 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const { join } = require('path') | ||
|
||
const { zipFunctions } = require('../dist/main') | ||
|
||
const { timeFunction } = require('./helpers/main') | ||
|
||
const BENCHMARK_OUTPUT = 'benchmarks/output' | ||
const RUNS = 3 | ||
|
||
const runBenchmarks = async function () { | ||
const func = join(__dirname, 'fixtures') | ||
|
||
const largeDepsNft = await timeFunction( | ||
() => | ||
zipFunctions(func, BENCHMARK_OUTPUT, { | ||
config: { '*': { nodeBundler: 'nft' } }, | ||
}), | ||
RUNS, | ||
) | ||
|
||
console.log(`${largeDepsNft}ms`) | ||
} | ||
|
||
runBenchmarks() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/usr/bin/env bash | ||
npm ci --prefix benchmarks/fixtures | ||
npm run build | ||
node benchmarks/nft.js > .delta.largeDepsNft | ||
node benchmarks/zisi.js > .delta.largeDepsZisi | ||
node benchmarks/esbuild.js > .delta.largeDepsEsbuild |
Oops, something went wrong.
8e09e87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⏱ Benchmark results
largeDepsEsbuild: 13.4s
largeDepsNft: 1m
largeDepsZisi: 1m 17.4s