小编Lig*_*eel的帖子

Chrome堆快照结构解释

使用 selenium,我拍摄了一个网站的内存快照并driver.execute_script(":takeHeapSnapshot")提取了其元数据:

{
    "snapshot": {
        "meta": {
            "node_fields": [
                "type", "name", "id", "self_size", "edge_count", "trace_node_id", "detachedness"
            ],
            "node_types": [
                ["hidden", "array", "string", "object", "code", "closure", "regexp", "number", "native", "synthetic", "concatenated string", "sliced string", "symbol", "bigint"],
                "string", "number", "number", "number", "number", "number"
            ],
            "edge_fields": [
                "type", "name_or_index", "to_node"
            ],
            "edge_types": [
                ["context", "element", "property", "internal", "hidden", "shortcut", "weak"],
                "string_or_number", "node"
            ],
            "trace_function_info_fields": [
                "function_id", "name", "script_name", "script_id", "line", "column"
            ],
            "trace_node_fields": [
                "id", "function_info_index", "count", "size", "children"
            ],
            "sample_fields": …
Run Code Online (Sandbox Code Playgroud)

javascript snapshot heap-memory javascript-objects google-chrome-devtools

2
推荐指数
1
解决办法
878
查看次数