javascript - 网页性能分析
问题描述
我建立了一个 Hbbtv 应用程序。
我想分析应用程序在电视上运行时的性能。由于电视上没有使用开发人员工具,我如何获得渲染、页面加载、空白率时间?
是否可以使用javascript显示这些?
解决方案
您可以将谷歌分析添加到您的网站。实现设备检测,如果是电视发送性能分析结果(之前实现的性能功能)。类似于这些示例的功能:http: //qnimate.com/measuring-web-page-performance-using-modern-javascript-apis/ http://blog.trasatti.it/2012/12/measuring-the-speed- of-resource-loading-with-javascript-and-html5.html , https://trackjs.com/blog/monitoring-javascript-memory/ , https://medium.com/@felipedutratine/frontend-performance-monitoring-在-js-29832051d2ec
您应该检测 TV 用户代理,然后在 Google Chrome 开发工具中模拟它(w3c 验证器也允许这样做),然后在 Google Chrome 开发工具“审核”选项卡中执行审核测试。检查https://developers.whatismybrowser.com/useragents/explore/operating_platform/smart-tv/
推荐阅读
- kubernetes - Kubernetes api 服务器偶尔不可用
- python - numpy.max 的懒惰评估
- mysql - 在 MySql 中出现错误 1215:无法添加外键。为什么?
- kubernetes - Cert-Manager 不创建 https 路由
- python - 将列表转换为数组时,使用 np.array() 还是 np.asarray() 更好
- python-2.7 - 如何使用 Azkaban Python API 添加流作为 Azkaban 作业的依赖项?
- powershell - 计划任务 Powershell 脚本 - 可以作为用户帐户运行,但不能作为 SYSTEM
- vaadin - com.vaadin.data.Provider 未找到
- firebase - Firebase 托管是否支持使用 Express.js 进行路由。我想在 firebase 托管中托管一个动态 Node.js 应用程序
- git - 单个 sonarQube 项目可以链接到多个 git 存储库吗?