【问题标题】:Automating/replaying on Chrome devtools timeline在 Chrome devtools 时间线上自动/重播
【发布时间】:2015-03-19 04:04:40
【问题描述】:

我有一个网页,如果应用了某些样式,它滚动起来会很卡。我的问题是如何系统地测试个人风格的效果。我不想每次都手动向下滚动页面,我想执行一些可复制的操作,以便轻松比较两个不同样式表的效果。是否可以录制和回放序列?

【问题讨论】:

    标签: performance google-chrome profiling rendering google-chrome-devtools


    【解决方案1】:

    在 Chrome 中你可以尝试使用:

    console.timeline('description');
    // your code
    console.timelineEnd('description');
    

    您会收到弃用警告,但它可以记录时间线。

    您可以使用 The Intern http://theintern.io/ 自动执行您想要执行的重复任务,例如向下滚动页面。 在这种情况下,您将为每个样式更改编写一个测试用例,在使用 Frame Timing API 测量时滚动页面 https://github.com/GoogleChrome/frame-timing-polyfill

    每个测试都期望帧速率高于某个值。

    【讨论】:

      猜你喜欢
      • 2016-08-30
      • 2016-02-17
      • 2015-11-13
      • 2014-11-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-27
      • 1970-01-01
      • 2021-07-20
      相关资源
      最近更新 更多