Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: compare bundle size #3661

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

EdamAme-x
Copy link
Contributor

@EdamAme-x EdamAme-x commented Nov 12, 2024

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

@EdamAme-x
Copy link
Contributor Author

if this pr is merged, before.js will also be output to show the change in bundle size.

image

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.70%. Comparing base (7e17b76) to head (3dcaf41).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3661   +/-   ##
=======================================
  Coverage   91.69%   91.70%           
=======================================
  Files         159      159           
  Lines       10138    10145    +7     
  Branches     2976     2908   -68     
=======================================
+ Hits         9296     9303    +7     
  Misses        840      840           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EdamAme-x
Copy link
Contributor Author

Hi @m-shaka, could you please check this?

@yusukebe
Copy link
Member

Hi @k2tzumi! Can you review this, you too?

Comment on lines +229 to +232
perf-measures-bundle-check-on-pr:
name: 'Bundle Check on PR'
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
Copy link

Choose a reason for hiding this comment

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

q: Does the bundle size change every time?
Or does it change only when a specific file is changed?

Should I integrate workflow jobs when importing into #3491? Should we keep them separate? I am pondering.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

q: Does the bundle size change every time?
Or does it change only when a specific file is changed?

it change only when a specific file is changed is right.

Only when a core file is changed.

Should I integrate workflow jobs when importing into #3491? Should we keep them separate? I am pondering.

I have limited knowledge about it, sorry.

- run: |
{
echo 'COMPARISON<<EOF'
ls -l ./generated | column -s '|' -t
Copy link

Choose a reason for hiding this comment

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

It seems that it is not enough to simply parse the result of the ls command to get output like the following
https://github.com/honojs/hono/actions/runs/11818332808/job/32925651835?pr=3665#step:9:24

The column -s '|' -t command formats | delimited characters, so you need to pipe at least | delimited output

ex)

| | Current | Previous |
| --- | --- | --- |
| Files | 256 | 256 |
| Lines | 115024 | 115024 |
| Identifiers | 112049 | 112049 |
| Symbols | 243346 | 243346 |
| Types | 204684 | 204684 |
| Instantiations | 3044052 | 3044052 |
| Memory used | 422387K | 422692K |
| I/O read | 0.01s | 0.02s |
| I/O write | 0.00s | 0.00s |
| Parse time | 0.28s | 0.28s |
| Bind time | 0.11s | 0.11s |
| Check time | 2.40s | 2.42s |
| Emit time | 0.00s | 0.00s |
| Total time | 2.79s | 2.81s |

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, any idea to format the output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants