Skip to content

arociris/lighthouse-network-gatherer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lighthouse-network-gatherer

This tool is an addition to the wonderful list of gatherers by Google LightHouse tool by providing full network logs irrespective of request method used.

Problem with Lighthouse This overcomes the limitation of Lighthouse tool as per which, one can only get the network requests which are of the method "GET". That means if you are to write a custom audit on certain network requests which are of POST or other types then it won't be possible.

Improvement added by this tool This tool will provide you full list of network requests which originated from browser tab under auditing. That means now you will have access to full network logs irrespective of request method and can now write your custom audits which were dependent on network logs

Usage

  1. Install using npm as below: npm install lighthouse-network-gatherer

  2. Create your own custom gatherer which extends class networkGatherer. Below is the sample code.

class  NetworkLogs  extends  networkGatherer{
  constructor(){
    super()
  }
}
module.exports = NetworkLogs
  1. Provide custom gatherer name in lighthouse config as specified in the Lighthouse documentation
  2. You can now use the exported NetworkLogs as an artifect in the audit as below:
static  get  meta() {
	return {
		id:  'network-audit',
		title:  'Network analysis',
		failureTitle:  'Some custom failure',
		description:  'Testing network requests',
		requiredArtifacts: ['NetworkLogs'],
	};
}

That's it, you can now do all the manipulations with network requests in the audits.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published