fetch the url with the longest timing
This commit is contained in:
parent
4d921f8baa
commit
d3f1f52556
|
|
@ -18,6 +18,9 @@ exports.processPage = function(pageData) {
|
|||
if (domain) {
|
||||
if (entry.timings) {
|
||||
domain.count++;
|
||||
if (entry.timings.blocked>domain.blocked.max) {
|
||||
domain.blockedUrl = entry.request.url;
|
||||
}
|
||||
domain.blocked.push(entry.timings.blocked);
|
||||
domain.dns.push(entry.timings.dns);
|
||||
domain.connect.push(entry.timings.connect);
|
||||
|
|
@ -26,7 +29,7 @@ exports.processPage = function(pageData) {
|
|||
domain.wait.push(entry.timings.wait);
|
||||
domain.wait.push(entry.timings.receive);
|
||||
} else {
|
||||
console.log("Missing ...");
|
||||
console.log('Missing timings in the HAR');
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -34,17 +37,23 @@ exports.processPage = function(pageData) {
|
|||
domains[util.getHostname(entry.request.url)] = {
|
||||
domain: util.getHostname(entry.request.url),
|
||||
blocked: new Stats().push(entry.timings.blocked),
|
||||
blockedUrl: entry.request.url,
|
||||
dns: new Stats().push(entry.timings.dns),
|
||||
dnsUrl: entry.request.url,
|
||||
connect: new Stats().push(entry.timings.connect),
|
||||
connectUrl: entry.request.url,
|
||||
ssl: new Stats().push(entry.timings.ssl),
|
||||
sslUrl: entry.request.url,
|
||||
send: new Stats().push(entry.timings.send),
|
||||
sendUrl: entry.request.url,
|
||||
wait: new Stats().push(entry.timings.wait),
|
||||
waitUrl: entry.request.url,
|
||||
receive: new Stats().push(entry.timings.receive),
|
||||
receiveUrl: entry.request.url,
|
||||
count: 1
|
||||
};
|
||||
} else {
|
||||
console.log("Missing ...");
|
||||
|
||||
console.log('Missing timings in the HAR');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue