Skip to content

m-radzikowski/aws-lambda-minification-test

Repository files navigation

Lambda performance testing of bundling variations

Testing Lambda performance with and without code minification.

See the blog post for more information.

Install:

pnpm install

Install packages directly in the lambda-packages and lambda-packages-unused directories:

cd lambda-packages
npm install
cd ../lambda-packages-unused
npm install

Deploy:

cdk deploy

Run Artillery:

pnpm tsx ./runArtillery.ts

Logs Insights query (wait a few minutes after running Artillery):

filter @type = "REPORT"
| parse @log /\d+:\/\w+\/(?<function>[\w\d-]+)/
| stats
count(*) as invocations,
pct(@initDuration, 50) as init.p50,
pct(@initDuration, 95) as init.p95,
pct(@duration, 50) as dur.p50,
pct(@duration, 95) as dur.p95
group by function, ispresent(@initDuration) as coldstart
| sort by function desc, coldstart desc

About

Testing Lambda performance with and without code minification.

Resources

Stars

Watchers

Forks