基于.cpuprofile文件计算总时间 [英] Calculate total time based on a .cpuprofile file

查看:102
本文介绍了基于.cpuprofile文件计算总时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Chrome创建了一个JavaScript CPU配置文件,并将其另存为.cpuprofile文件.我只想使用此文件来计算此配置文件中每个节点的总时间"(加载文件时在Chrome Profiler中可以看到).

I created a JavaScript CPU profile with Chrome and saved it as a .cpuprofile file. Using only this file, I want to calculate the "Total Time" for each node in this profile (as can be seen in the Chrome Profiler when you load the file.)

我发现了如何计算自拍时间"

I found out how to calculate the "Self Time" here. Does anyone know how to extend it to the "Total Time"?

推荐答案

我一直在寻找自下而上的配置文件时间.对于感兴趣的人,我创建了一个名为 cpuprofile npm软件包,计算所有必要的时间.

I was looking for the Bottom Up Profile times. For anyone interested, I have created a npm package called cpuprofile that calculates all necessary times.

这篇关于基于.cpuprofile文件计算总时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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