自动化收集、对比页面的performance数据
基于puppeteer自动化采集指定url的性能数据(基于performance api)
const getPerlog = require('automated-chrome-performance');
const test1 = 'https://www.baidu.com';
const test2 = 'https://www.taobao.com';
(async () => {
var t1 = await getPerlog({url:test1, count: 10})
var t2 = await getPerlog({url:test2, count: 10})
for(var k in t1) {
console.log(k, t1[k], t2[k])
}
})()