How to profile Javascript now that JSPerf is down?

后端 未结 8 1738
傲寒
傲寒 2021-01-30 06:38

As some of you probably noticed jsperf is down for some time. But I still need to profile my Javascripts. Is there any possibility to do comparison tests ideally without the hel

8条回答
  •  遥遥无期
    2021-01-30 07:01

    jsperf is based on benchmarkjs so using an online code editor (like jsfiddle, jsbin, plunker etc...) and including benchmarkjs as a library will do.

    The only feature you won't have will be the compiled results for each browsers. This is just a temporary alternative.

    Here is a jsfiddle template : https://jsfiddle.net/533hc71h/

    But since we don't really care about html nor css I found plunker more suitable. Coupled with systemjs you can then separate your code into multiple files.

    Here is the template : https://plnkr.co/edit/pJg5LsiSNqlc6immmGsW


    Update

    You really should only use those solution as quick temporary solution. As said on the comments for optimal result you had better run it locally, nowadays you can get a webserver like express or else running in sec.


    * Tricks stackoverflow because links to inline editor must be accompanied with code

提交回复
热议问题