tmm1-perftools.rb 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +23 -12
- data/ext/extconf.rb +3 -3
- data/ext/perftools.c +1 -1
- data/perftools.rb.gemspec +2 -1
- metadata +2 -2
data/README
CHANGED
@@ -53,44 +53,54 @@ google-perftools for ruby code
|
|
53
53
|
|
54
54
|
Simple require 'rubygems' profile
|
55
55
|
|
56
|
-
http://
|
56
|
+
http://perftools-rb.rubyforge.org/examples/rubygems.gif
|
57
57
|
|
58
58
|
Comparing redis-rb with and without SystemTimer based socket timeouts
|
59
59
|
|
60
|
-
http://
|
61
|
-
http://
|
60
|
+
http://perftools-rb.rubyforge.org/examples/redis-rb.gif
|
61
|
+
http://perftools-rb.rubyforge.org/examples/redis-rb-notimeout.gif
|
62
62
|
|
63
63
|
Sinatra vs. Merb vs. Rails
|
64
64
|
|
65
|
-
http://
|
66
|
-
http://
|
67
|
-
http://
|
65
|
+
http://perftools-rb.rubyforge.org/examples/sinatra.gif
|
66
|
+
http://perftools-rb.rubyforge.org/examples/merb.gif
|
67
|
+
http://perftools-rb.rubyforge.org/examples/rails.gif
|
68
68
|
|
69
69
|
C-level profile of EventMachine + epoll + Ruby threads
|
70
70
|
before http://timetobleed.com/6-line-eventmachine-bugfix-2x-faster-gc-1300-requestssec/
|
71
71
|
|
72
|
-
http://
|
73
|
-
http://
|
72
|
+
http://perftools-rb.rubyforge.org/examples/eventmachine-epoll+nothreads.gif
|
73
|
+
http://perftools-rb.rubyforge.org/examples/eventmachine-epoll+threads.gif
|
74
74
|
|
75
75
|
C-level profile of the ruby interpreter
|
76
76
|
12% time spent in re_match_exec because of excessive calls to rb_str_sub_bang by Date.parse
|
77
77
|
easily fixed by using the ThirdBase gem
|
78
78
|
|
79
|
-
http://
|
79
|
+
http://perftools-rb.rubyforge.org/examples/ruby_interpreter.gif
|
80
80
|
|
81
81
|
|
82
82
|
=== Installation
|
83
83
|
|
84
|
-
|
84
|
+
Just install the gem, which will download, patch and compile google-perftools for you:
|
85
|
+
|
86
|
+
sudo gem install perftools.rb
|
87
|
+
|
88
|
+
Or use the dev gem from github:
|
89
|
+
|
90
|
+
gem install -s http://gems.github.com tmm1-perftools.rb
|
91
|
+
|
92
|
+
Or build your own gem:
|
85
93
|
|
86
94
|
git clone git://github.com/tmm1/perftools.rb
|
87
95
|
cd perftools.rb
|
88
96
|
gem build perftools.rb.gemspec
|
89
97
|
gem install perftools.rb
|
90
98
|
|
91
|
-
Or from github:
|
92
99
|
|
93
|
-
|
100
|
+
You'll also need graphviz to generate call graphs using dot:
|
101
|
+
|
102
|
+
sudo port install graphviz # osx
|
103
|
+
sudo apt-get install graphviz # debian/ubuntu
|
94
104
|
|
95
105
|
|
96
106
|
=== Advantages over ruby-prof
|
@@ -124,6 +134,7 @@ google-perftools for ruby code
|
|
124
134
|
* Add support for heap profiling to find memory leaks (PerfTools::HeapProfiler)
|
125
135
|
* Allow both C and Ruby profiling
|
126
136
|
* Add setter for the sampling interval
|
137
|
+
* Add support for ruby 1.9
|
127
138
|
|
128
139
|
|
129
140
|
=== Resources
|
data/ext/extconf.rb
CHANGED
@@ -37,11 +37,11 @@ Dir.chdir('src') do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
unless File.exists?('../
|
40
|
+
unless File.exists?('../librubyprofiler.a')
|
41
41
|
Dir.chdir(dir) do
|
42
42
|
xsystem("./configure --disable-heap-profiler --disable-heap-checker --disable-shared")
|
43
43
|
xsystem("make")
|
44
|
-
FileUtils.cp '.libs/libprofiler.a', '../../'
|
44
|
+
FileUtils.cp '.libs/libprofiler.a', '../../librubyprofiler.a'
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
@@ -51,6 +51,6 @@ when /darwin/, /linux/
|
|
51
51
|
CONFIG['LDSHARED'] = "$(CXX) " + CONFIG['LDSHARED'].split[1..-1].join(' ')
|
52
52
|
end
|
53
53
|
|
54
|
-
$libs = append_library($libs, '
|
54
|
+
$libs = append_library($libs, 'rubyprofiler')
|
55
55
|
have_func('rb_during_gc', 'ruby.h')
|
56
56
|
create_makefile 'perftools'
|
data/ext/perftools.c
CHANGED
data/perftools.rb.gemspec
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
2
2
|
s.name = 'perftools.rb'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.7'
|
4
4
|
s.date = '2009-06-02'
|
5
|
+
s.rubyforge_project = 'perftools-rb'
|
5
6
|
s.summary = 'google-perftools for ruby code'
|
6
7
|
s.description = 'A sampling profiler for ruby code based on patches to google-perftools'
|
7
8
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmm1-perftools.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aman Gupta
|
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
52
|
version:
|
53
53
|
requirements: []
|
54
54
|
|
55
|
-
rubyforge_project:
|
55
|
+
rubyforge_project: perftools-rb
|
56
56
|
rubygems_version: 1.2.0
|
57
57
|
signing_key:
|
58
58
|
specification_version: 2
|