bleak_house 5.1 → 5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +1 -0
  2. data/README +6 -1
  3. data/lib/bleak_house/analyze.rb +3 -2
  4. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
2
  BleakHouse Changelog
3
3
 
4
+ 5.2. change smoothing algorithm to be more intuitive and so mem usage is correct
4
5
  5.1. close file properly
5
6
  5. totally awesome C instrumentation
6
7
  4. log memory usage on *nix
data/README CHANGED
@@ -15,7 +15,7 @@ USAGE:
15
15
 
16
16
  To profile your application:
17
17
  RAILS_ENV=production BLEAK_HOUSE=true ruby-bleak-house ./script/server
18
-
18
+
19
19
  Browse around manually, thrash your entire app with a script,
20
20
  target troublesome controllers/actions, etc.
21
21
 
@@ -30,6 +30,11 @@ If you see the error "Symbol not found: _rb_gc_heaps_used",
30
30
  it means you installed the patched binary, but tried to run the
31
31
  server with the regular binary.
32
32
 
33
+ You may get library require errors if you install ruby-bleak-house (1.8.6)
34
+ alongside a different verson of Ruby. You could try to patch your local
35
+ version of Ruby instead, or you could just upgrade to 1.8.6, which has
36
+ a good trackrecord or stability anyway.
37
+
33
38
  COPYRIGHT AND LICENSING
34
39
 
35
40
  Copyright (c) 2007 Cloudburst, LLC. See the included LICENSE_AFL
@@ -89,9 +89,9 @@ class BleakHouse
89
89
  timestamp = frames.map(&:time).sum / SMOOTHNESS
90
90
  values = frames.map(&:data).inject(Hash.new(0)) do |total, this_frame|
91
91
  this_frame.each do |key, value|
92
- total[key] += value
92
+ # hackz are because we want to average the memory usage, but conflate the core/action frames
93
+ total[key] += (value / SMOOTHNESS.to_f * (key =~ /^#{MEM_KEY}/ ? 1.0 : 2.0))
93
94
  end
94
- total
95
95
  end
96
96
  [Time.at(timestamp).strftime("%H:%M:%S"), values]
97
97
  end
@@ -110,6 +110,7 @@ class BleakHouse
110
110
  # in each controller, by action
111
111
  controller_data.keys.each do |controller|
112
112
  @mem = (controller == MEM_KEY)
113
+ next unless @mem
113
114
  puts(@mem ? " #{controller}" : " action for #{controller} controller")
114
115
  Dir.descend(controller) do
115
116
  action_data, increments = aggregate(data, /^#{controller}($|\/|::::)/, /\/(.*?)($|\/|::::)/)
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: bleak_house
5
5
  version: !ruby/object:Gem::Version
6
- version: "5.1"
7
- date: 2007-05-06 00:00:00 -04:00
6
+ version: "5.2"
7
+ date: 2007-05-07 00:00:00 -04:00
8
8
  summary: BleakHouse is a Rails plugin for finding memory leaks. It tracks ObjectSpace for your entire app, and produces charts of references by controller, by action, and by object class.
9
9
  require_paths:
10
10
  - lib
@@ -27,7 +27,7 @@ signing_key:
27
27
  cert_chain:
28
28
  post_install_message: |+
29
29
 
30
- Thanks for installing Bleak House 5.1.
30
+ Thanks for installing Bleak House 5.2.
31
31
 
32
32
  For each Rails app you want to profile, you will need to add the following
33
33
  rake task in RAILS_ROOT/lib/tasks/bleak_house_tasks.rake to be able to run