如何可视化Chrome DevTool协议消息的日志? [英] How to visualize log of chrome DevTool protocol messages?

查看:466
本文介绍了如何可视化Chrome DevTool协议消息的日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Selenium和Chrome驱动程序,并启用了性能日志记录功能,以便在测试过程中更好地查看问题。性能日志似乎是一个包含chrome的DevTool协议消息的json数组。



以下是日志中的示例条目:


是否存在允许我将此日志可视化的内容,如Chrome的开发工具标签中所示。

  {
message:{
method:Network.requestWillBeSent,
params:{
documentURL:https:// ****** /,
frameId:15976.2,
initiator:{
type: other
},
loaderId:15976.3,
request:{
headers:{
Accept:text / html,application / xhtml + xml,application / xml; q = 0.9,image / webp,* / *; q = 0.8,
Upgrade-Insecure-Requests:1,
User-Agent:Mozilla / 5.0(Windows NT 6.3; WOW64)AppleWebKit / 537.36(KHTML,如Gecko)Chrome / 48.0.2564.109 Safari / 537.36

initialPriority:VeryHigh ,
method:GET,
mixedContentType:none,
url:https:// ******** /
},
requestId:15976.1,
timestamp:80251。 314924,
type:Document,
wallTime:1455928917.89989
}
},
webview:D0C1AD9A-D631-4238-9A74 -F873A7908EFB


解决方案

看看Catapult项目 - 收集,展示和分析性能数据的多种性能工具的家园。 b
$ b

https://github.com/catapult-project/catapult



您应该可能还需要查看跟踪事件格式文档将日志条目正确调整为支持的格式。


I use Selenium and Chrome driver and also enabled performance logging to provide better visibility to problems during the test. Performance log seems to be a json array that includes chrome's DevTool protocol messages. Is there any tool existent that allows me to visualize this log like in Chrome's dev tools tab.

Below is sample entry from the log:

{
"message": {
  "method": "Network.requestWillBeSent",
  "params": {
    "documentURL": "https://******/",
    "frameId": "15976.2",
    "initiator": {
      "type": "other"
    },
    "loaderId": "15976.3",
    "request": {
      "headers": {
        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
        "Upgrade-Insecure-Requests": "1",
        "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36"
      },
      "initialPriority": "VeryHigh",
      "method": "GET",
      "mixedContentType": "none",
      "url": "https://********/"
    },
    "requestId": "15976.1",
    "timestamp": 80251.314924,
    "type": "Document",
    "wallTime": 1455928917.89989
  }
},
"webview": "D0C1AD9A-D631-4238-9A74-F873A7908EFB"
}

解决方案

Please take a look at the Catapult project - "the home for several performance tools that span from gathering, displaying and analyzing performance data."

https://github.com/catapult-project/catapult

You should probably also take a look at the "Trace Event Format" documentation to properly adjust the log entries to the supported format.

这篇关于如何可视化Chrome DevTool协议消息的日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆