Coder Social home page Coder Social logo

har-wrk's Introduction

har-wrk

benchmarking shouldnt be har-wrk

This is a dead-simple utility for using the wrk HTTP benchmarking tool and HAR files to make the same requests to your server that your browser does.

It generates a Lua script for wrk that continuously makes a series of requests you choose from a HAR file.

1. Setup

Install requirements: Node.js and wrk.

# on a mac
brew install node
brew install wrk

Clone this repo and install dependencies:

git clone [email protected]:loganlinn/har-wrk.git
cd har-wrk
npm install

2. Get a HAR file

Using your browser of choice (or some other HAR tool), capture a set of requests that you want to benchmark into a HAR file.

3. Update entryFilter.js as necessary

Update the function that determines whether request of a HAR entry should be included in the output.

At a minimum, you'll want to filter to the requests made to the server you'll be benchmarking by looking at entry.request.url.

4. Generate Lua script

The harToWrkScript.js takes HAR file on STDIN and writes a Lua script to STDOUT.

harToWrkScript.js < input.har > script.lua

Take a peek at the generated script to make sure it has the requests you want to benchmark.

5. Run benchmark

Run wrk with the script and specify a base URL. See wrk --help for available options.

wrk -s script.lua http://localhost:8080

har-wrk's People

Contributors

loganlinn avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nikunjgit

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.