GithubHelp home page GithubHelp logo

raicabogdan / speedprofile Goto Github PK

View Code? Open in Web Editor NEW

This project forked from parasdahal/speedprofile

0.0 1.0 0.0 8 KB

Generate HAR and Browser NavigationTimingAPI data headlessly with Chrome and Firefox

Python 91.82% Shell 8.18%

speedprofile's Introduction

Speedprofile

Create HAR and performance data headlessly with Chrome and Firefox using Browsermob-Proxy

This tool helps you to capture HTTP Archive (HAR) and additional performance data using Navigation Timing API from either Chrome or Firefox headlessly.

Setup (Manual)

  1. Install xvfb

    sudo apt-get install -y xvfb

  2. Download Browsermob-proxy

    https://github.com/lightbody/browsermob-proxy

  3. Download selenium-server

    wget http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar

  4. Start selenium-server

    java /usr/bin/java -jar selenium-server.jar >> ./log/selenium.$(date +"%Y%d%m").log 2>&1&

  5. Download chrome driver

    wget -N http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip
    unzip chromedriver_linux64.zip
    chmod +x chromedriver

  6. Install Python Dependencies for browsermob-proxy, selenium and xvfb

    sudo apt-get install python-pip
    sudo pip install selenium browsermob-proxy xvfbwrapper --upgrade

Usage

python speedprofile.py --url [url to test] --browser [chrome/fireox] --path [path to save output files]

Dockerized Setup and Usage (Chrome Only)

  1. Install Docker -- https://www.docker.com/

  2. Run the build-chrome script to create a docker image tagged speedprofile-chrome

./docker/build-chrome.sh

# To test your local image, run:
docker run -v $(pwd)/output:/output speedprofile-chrome <url>

# Performance/HAR files will be generated in the local "output" folder.
  1. Quickstart: If you want to skip the build (2), you can simply run the public docker image with the included wrapper script:
./docker/run-chrome.sh <url>

speedprofile's People

Contributors

parasdahal avatar ccarpita avatar

Watchers

Bogdan Raica avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.