Mojito-waterfallnpm 开发包
Mojito-waterfall 是用于生成性能可视化的 Mojito 应用程序 npm 开发包。它包括一个用来收集计时数据的 API 和一个呈现瀑布流(waterfall)的 mojit。mojito-debug 开发包使用这个开发包呈现瀑布流可视化。
代码示例:
{ headers: ['Name', 'Type`], units: 'ms', rows: [{ Name: 'Main', Type: 'Mojit', durations: [{ startTime: 0, duration: 100, name: 'Elapsed Time', color: 'green' }], details: [{ Name: 'Controller', durations: [{ startTime: 10, duration: 30, name: 'Elapsed Time', color: '#1133CC' }] }] }], events: [{ name: 'Render Start', time: 85, color: 'rgb(220, 30, 40)' }], stats: [{ "Name": "dispatch", "Calls": 36, "Total Duration": "45.97ms", "Avg Duration": "1.277ms", "Min Duration": "255.7µs (Child)", "Max Duration": "23.57ms (Main)", "summary": [{ "Name": "Main", "Duration": "23.57ms" }] }] }
评论