andresz1 / size-limit-action

Compare the real cost to run your JS app or lib to keep good performance in every pull request
ISC License
449 stars 83 forks source link

100% increase when running time is `0 ms` #101

Open SalimBensiali opened 1 year ago

SalimBensiali commented 1 year ago

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 commented 1 year ago

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 https://github.com/andresz1/size-limit-action/pull/102. Basically the reported percentage increase will be:

SalimBensiali commented 1 year ago

@andresz1 any thoughts on this?