Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Sep 30 04:59:22 -0700 2009 | |
| |
LICENSES | Wed Sep 30 04:59:22 -0700 2009 | |
| |
README.rdoc | Wed Sep 30 07:20:24 -0700 2009 | |
| |
Rakefile | Wed Sep 30 04:59:22 -0700 2009 | |
| |
app/ | Wed Sep 30 04:59:22 -0700 2009 | |
| |
bin/ | Wed Sep 30 04:59:22 -0700 2009 | |
| |
config/ | Wed Sep 30 04:59:22 -0700 2009 | |
| |
db/ | Wed Sep 30 04:59:22 -0700 2009 | |
| |
lib/ | Wed Sep 30 04:59:22 -0700 2009 | |
| |
public/ | Wed Sep 30 04:59:22 -0700 2009 | |
| |
script/ | Wed Sep 30 04:59:22 -0700 2009 | |
| |
test/ | Wed Sep 30 05:31:25 -0700 2009 | |
| |
vendor/ | Wed Sep 30 04:59:22 -0700 2009 |
LogJam
LogJam is a Ruby on Rails application used for finding performance hot spots in Ruby on Rails applications. It can produce various graphs and tables showing how much time and memory are consumed by different parts of your application. The interface is flexible enough to be able to provide answers to a great many questions you may have about your application, such as
- which pages in my application are most in need of optimization?
- in the worst case, how slow is my application?
- for which users is my application slowest?
- under peak load, how busy are my servers?
- which pages and which users are causing the most exceptions?
- what pages are causing the ruby heap to be expanded?
- which pages are making the most DB queries?
Note that some of LogJam’s features (eg those involving GC and memory data) depend on using a specially built ruby and some rails plugins, which are available separately.
Authors
David Anderson <david@alpinegizmo.com> and Stefan Kaes <skaes@railsexpress.de>
Development on LogJam began while the authors were working at Xing AG.
Installation
This documentation assumes that you are a rails developer, and generally familiar with how to configure, install, and deploy rails applications.
Included with LogJam is a script (in bin/import_local_log) that will parse and import your production rails log files into a database.
You will want to review and modify these files.
- config/initializers/matchers.rb
- db/migrate/20090708080254_create_controller_actions.rb
- db/migrate/20090709085133_add_indexes_to_controller_actions.rb
- config/logjam.yml
LogJam has only been tested on OS X, but it should be straightforward to get it running under Linux.
In addition to the gems defined in environment.rb, you will need to install gnuplot. On the Mac,
sudo port install gnuplot
Both ruby 1.8.7 and 1.9.2 are used by the authors.
What to do in the application being studied
LogJam can be used with a standard rails application running under any version of ruby. Under these circumstances, only the following performance attributes will be imported:
t.timestamp :started_at
t.string :page
t.integer :response_code
t.float :total_time
t.float :view_time
t.float :db_time
t.float :other_time
If you use the time_bandits plugin in your application, you can easily capture the following additional information:
t.integer :db_calls
t.integer :db_sql_query_cache_hits
t.float :memcache_time
t.integer :memcache_calls
t.integer :memcache_misses
And if you use gc_hacks with time_bandits, you can also get (assuming you use a compatible ruby, such as skaes’ matzruby):
t.float :gc_time
t.integer :gc_calls
t.integer :heap_size
t.integer :heap_growth
t.integer :allocated_objects
t.integer :allocated_bytes
t.integer :allocated_memory
If you are running more than one server process, you must modify the log line to include the process_id and host. We recommend you also include the user_id. See config/initializers/matchers.rb for more info on how to add:
t.string :host
t.integer :process_id
t.integer :user_id
It is also easy to add additional custom information, including session_ids, time spent waiting for specific web services, etc.
License
Copyright © 2009 David Anderson, Stefan Kaes
Copyright © 2009 XING AG
Copyright 2005 Eric Hodel, The Robot Co-op.
See LICENSES for details.







