Code Monkey home page Code Monkey logo

rawk's Introduction

RAWK - Rail's Analyzer With Klass v1.2
Created by Chris Hobbs of Spongecell, LLC
This tool gives statistics for Ruby on Rails log files. The times for each request are grouped and totals are displayed. If process ids are present in the log files then requests are sorted by ActionController actions otherwise requests are grouped by url. By default total request times are used for comparison but database time or render time can be used by specifying the correct flag. The log file is read from standard input unless the -f flag is specified.

The options are as follows:

  -?  Display this help.

  -d  Use DB times as data points. These times are found after 'DB:' in the log file. This overrides the default behavior of using the total request time.

  -f <filename> Use the specified file instead of standard input.

  -h  Display this help.

  -r  Use Render times as data points. These times are found after 'Rendering:' in the log file. This overrides the default behavior of using the total request time.

  -s <count> Display <count> results in each group of data.

  -t  Test

  -u  Group requests by url instead of the controller and action used. This is the default behavior if there is are no process ids in the log file.

  -w <count> Display the top <count> worst requests.

	-x <date> Date (inclusive) to start parsing in 'yyyy-mm-dd' format.

	-y <date> Date (inclusive) to stop parsing in 'yyyy-mm-dd' format.

To include process ids in your log file, add this to environment.rb:

  class Logger
    def format_message(severity, timestamp, progname, msg)
      "#{msg} (pid:#{$$})\n"
    end
  end

This software is Beerware, if you like it, buy yourself a beer.

Example usage:
    ruby rawk.rb < production.log

rawk's People

Contributors

whatcould avatar

Stargazers

Angus H. avatar Anson Hoyt avatar  avatar Kenny Meyer avatar Severin avatar Tim Gentry avatar Sidu Ponnappa avatar  avatar Chris Hobbs avatar

Watchers

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