max*_*son 7 javascript performance google-chrome
我想performance.mark(...)
在Chrome的开发工具“性能”标签上看到我的来电。我在网上可以找到的所有文档似乎都指向不再存在的“时间轴”选项卡,而新的“性能 ”选项卡上的文档则无话可说。
在我的代码中,我只是在做performance.mark('my mark name')
。我也尝试过这样做,console.timeStamp('my mark name')
因为我在一些旧文档中也看到了这一点。
如何performance.mark()
在效果标签上看到这些调用?
ali*_*iry 13
在新的性能标签中,标记显示在“用户计时”中。您需要使用
性能指标()
像这样标记您的标记的开始和结束:
performance.mark('myMark-start');
// your code
performance.mark('myMark-end');
performance.measure('myPerfMarker', 'myMark-start', 'myMark-end');
Run Code Online (Sandbox Code Playgroud)