zouhir / jarvis

A very intelligent browser based Webpack dashboard
5.44k stars 191 forks source link

Fixes #97: Correctly calculate download times #103

Closed TimoStaudinger closed 6 years ago

TimoStaudinger commented 6 years ago

See #97 for an exact description of the problem. Changed the formula used to calculate download times to fix unit conversions.

Additionally moved the calculation results out of the state, instead calculating them while rendering. Results are memoized to avoid duplicate calculations.

zouhir commented 6 years ago

Fantastic!!!!!! 😻 I'll pull this tomorrow morning, try and then merge.. looks great tho! Thank you!

zouhir commented 6 years ago

hmmm I think we have a problem here, the calculations are bit more far off still on my end after pulling your branch :(

screen shot 2018-02-01 at 10 33 54
TimoStaudinger commented 6 years ago

Yep, looks like we're getting the asset size in bytes, not kB. Thanks for testing that! :+1: Fixed:

image