使用方法很簡單,在要計算的地方開始和結尾使用 console.time 及 console.timeEnd

開始計時
console.time($timer_name);
結束計時
console.timeEnd($timer_name);

更多 console 用法請參考
https://developers.google.com/chrome-developer-tools/docs/console-api#consoletimestamplabel

arrow
arrow
    全站熱搜

    wbkuo 發表在 痞客邦 留言(0) 人氣()