Tools for gathering statistics about contents and performance of Web sites. There are two parts:
-
Python "loader" classes that load Web pages (using various backends, like PhantomJS, Chrome, and Firefox) and produce summary statistics, HAR files, and/or screenshots.
-
Scripts that use these loaders to gather particular statistics (e.g., compare the load times of the HTTP and HTTPS versions of a site).
The loaders are Python classes that encapsulate the logic for loading Web pages
and saving statistics. Each one implements a common interface (specified by the
Loader superclass in loader.py) and currently supports the following
backends:
- PhantomJS (
PhantomJSLoaderinphantomjs_loader.py) - Chrome (
ChromeLoaderinchrome_loader.py) - Firefox (
FirefoxLoaderinfirefox_loader.py) - Python Requests (
PythonRequestsLoaderinpythonrequests_loader.py) - Curl (
CurlLoaderincurl_loader.py) - NodeJS (
NodeJsLoaderinnodejs_loader.py)
API documentation available here.
-
Needed by the
PhantomJSLoader.If the loader can't find PhantomJS, try harding-coding the path to PhantomJS at the top of
phantomjs_loader.py. -
Needed to run Firefox or Chrome in headless mode.
-
Needed by the
ChromeLoader.Set path to binary at top of
chrome_loader.py. To install globally:sudo npm install -g chrome-har-capturerTo record HTTP versions, you currently need to use this fork. To install globally:
git clone git@github.com:dtnaylor/chrome-har-capturer.git cd chrome-har-capturer sudo npm install -g . -
Needed by the
ChromeLoader. (On Ubuntu, be sure to install nodejs package and not node.) -
Used to test the availability of sites of HTTP or HTTPS and by the
PythonRequestsLoader. -
Needed by the
NodeJsLoaderandZombieJsLoader. Location of the module must be hardcoded inwebloader/nodejs_loader.pyandwebloader/zombiejs_loader.py. z