bleak_house 5.1 → 5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/README +6 -1
- data/lib/bleak_house/analyze.rb +3 -2
- metadata +3 -3
data/CHANGELOG
CHANGED
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
|
data/lib/bleak_house/analyze.rb
CHANGED
@@ -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
|
-
|
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.
|
7
|
-
date: 2007-05-
|
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.
|
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
|