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

100% increase when running time is 0 ms #101

Open
SalimBensiali opened this issue Jan 19, 2023 · 2 comments
Open

100% increase when running time is 0 ms #101

SalimBensiali opened this issue Jan 19, 2023 · 2 comments

Comments

@SalimBensiali
Copy link

First of all thanks for this action and the cli tool.

I am noticing a consistent 0 ms (+100% 🔺). Is this expected?

See screen grab below

image

SalimBensiali added a commit to SalimBensiali/size-limit-action that referenced this issue Jan 22, 2023
@SalimBensiali
Copy link
Author

I found this is due to the case of comparing against an initial value of 0, where coming up with a percentage increase value is tricky. Currently the code reports +100% 🔺. I have raised a PR fix where I think the suggested resolution is an improvement See #102. Basically the reported percentage increase will be:

  • 0% if the both the previous and current values are 0, or
  • +∞% 🔺 if the previous value is 0 and the current is not 0

@SalimBensiali
Copy link
Author

@andresz1 any thoughts on this?

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

No branches or pull requests

1 participant