Git Product home page Git Product logo

trample's Introduction

trample

Trample is a flexible load simulation tool.

Most load sim tools make requests to a static list of urls. They spawn n threads and make requests to the urls on the list in succession, in each thread. Unfortunately, though, if your applicaition makes use of any kind of caching (including your database’s internal caching facilities), this kind of load simulation is unrealistic.

The data required to serve a single set of urls is likely to fit nicely in the database server’s cache (even on a small server). So, having a single user hammer a finite set of pages will make your application look much faster than it really is.

Trample allows you to provide parameter values inside of a block (a lambda function, for non-rubyists). The block is executed each time the parameters are needed. So, if you use randomization in the block, you should (theoretically) get different values every time.

That way, you can have trample log in as several different users and request different data in each session.

How To

Trample uses a ruby DSL for configuration.

Trample.configure do
  concurrency 5
  iterations  10
  login do
    post "http://yoursite.com/login" do
      {:username => User.random.username, :password => "swordfish"}
    end
  end
  get  "http://yoursite.com/somewhere"
  post "http://yoursite.com/something" do
    {:a_parameter => "a value"}
  end
  get  "http://yoursite.com/someresources/:id" do
    {:id => SomeResource.random.id}
  end
end

The above configuration will start 5 (concurrency) sessions by logging in as a random user at the url in the login block. Then, it’ll hit the two urls underneath it 10 (iterations) times during each session.

To run trample, save your configuration somewhere and run:

trample start /path/to/your/trample/config.rb

Copyright © 2009 James Golick. See LICENSE for details.

trample's People

Contributors

jamesgolick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

trample's Issues

authenticity token not being picked up

I have tried every single version of trample on the network but none of them are working in that when I try and login to my Rails 2.3.5 application the authenticity token is not being passed as one of the post parameters.

wgibbs and kyuusik both have the same problem even though they apparently have patches designed to deal with this.

Any pointers?

Missing Libraries

The gem should list these as dependencies in the gemspec so upon installation so the app will run:

sevenwire-rest-client
log4r

Port Unsupported

It appears that trample expects to visit a host with the default port 80.

It would be nice if it respected a port in post and get requests, such as "http://localhost:3000"

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.