Giter Site home page Giter Site logo

puma-bench's Introduction

Quick puma benchmark

Let's say you want to test some puma server config.

This project is a simple isolated benchmark allowing you to experiment with various settings, eg.

  • how much a request takes,
  • min and max puma threads,
  • number of client threads,
  • number of simultaneous client connections.

Running

$ docker build -t puma-bench .
Sending build context to Docker daemon 61.95 kB
[...]
Successfully built b64023150777
$ docker run --rm -e THROTTLE=1.5 -e THREADS_MIN=1 -e THREADS_MAX=10 puma-bench -t 3 -c 12
Using 1.5 s throttle.
Puma starting in single mode...
* Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
* Min threads: 1, max threads: 10
* Environment: development
* Daemonizing...
Running 10s test @ http://localhost:9292
  3 threads and 12 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.50s     2.40ms   1.51s    83.33%
    Req/Sec     4.83      7.92    30.00     86.96%
  60 requests in 10.01s, 5.57KB read
Requests/sec:      5.99
Transfer/sec:     569.17B
Memory usage:
 13m puma 3.6.0 (tcp://0.0.0.0:9292) [/]

Environment variables

  • THROTTLE -- number of seconds to sleep in every request (can be float)
  • THREADS_{MIN,MAX} -- min and max number of puma threads

Command line options

Are passed directly to wrk; here's a synopsis for reference:

    -c, --connections <N>  Connections to keep open
    -d, --duration    <T>  Duration of test
    -t, --threads     <N>  Number of threads to use

    -s, --script      <S>  Load Lua script file
    -H, --header      <H>  Add header to request
        --latency          Print latency statistics
        --timeout     <T>  Socket/request timeout
    -v, --version          Print version details

  Numeric arguments may include a SI unit (1k, 1M, 1G)
  Time arguments may include a time unit (2s, 2m, 2h)

puma-bench's People

Contributors

dividedmind avatar

Watchers

 avatar James Cloos 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.