rubyrun 0.9.9.1 → 0.9.9.2

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.
Files changed (36) hide show
  1. data/doc/README +4 -2
  2. data/doc/{rubyrun-0.9.9.htm → rubyrun-0.9.9.2.htm} +1026 -644
  3. data/doc/{rubyrun-0.9.9.pdf → rubyrun-0.9.9.2.pdf} +0 -0
  4. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/colorschememapping.xml +0 -0
  5. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/filelist.xml +1 -1
  6. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/header.htm +11 -11
  7. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image001.jpg +0 -0
  8. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image002.jpg +0 -0
  9. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image003.jpg +0 -0
  10. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image004.jpg +0 -0
  11. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image005.jpg +0 -0
  12. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image006.jpg +0 -0
  13. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image007.jpg +0 -0
  14. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image008.jpg +0 -0
  15. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image009.jpg +0 -0
  16. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image010.jpg +0 -0
  17. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image011.jpg +0 -0
  18. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image012.jpg +0 -0
  19. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image013.jpg +0 -0
  20. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image014.jpg +0 -0
  21. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image015.jpg +0 -0
  22. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image016.jpg +0 -0
  23. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image017.png +0 -0
  24. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image018.jpg +0 -0
  25. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image019.jpg +0 -0
  26. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image020.jpg +0 -0
  27. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image021.jpg +0 -0
  28. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/image022.png +0 -0
  29. data/doc/{rubyrun-0.9.9_files → rubyrun-0.9.9.2_files}/themedata.thmx +0 -0
  30. data/lib/rubyrun/rubyrun.rb +7 -0
  31. data/lib/rubyrun/rubyrun_monitor__.rb +27 -5
  32. data/lib/rubyrun/rubyrun_report__.rb +2 -1
  33. data/lib/rubyrun/rubyrun_rss__.rb +1 -1
  34. data/lib/rubyrun/rubyrun_utils__.rb +1 -1
  35. data/lib/rubyrun/ubyrun.rb +7 -0
  36. metadata +31 -31
@@ -1,5 +1,5 @@
1
1
  <xml xmlns:o="urn:schemas-microsoft-com:office:office">
2
- <o:MainFile HRef="../rubyrun-0.9.9.htm"/>
2
+ <o:MainFile HRef="../rubyrun-0.9.9.2.htm"/>
3
3
  <o:File HRef="themedata.thmx"/>
4
4
  <o:File HRef="colorschememapping.xml"/>
5
5
  <o:File HRef="image001.jpg"/>
@@ -10,15 +10,15 @@ xmlns="http://www.w3.org/TR/REC-html40">
10
10
  <meta name=ProgId content=Word.Document>
11
11
  <meta name=Generator content="Microsoft Word 12">
12
12
  <meta name=Originator content="Microsoft Word 12">
13
- <link id=Main-File rel=Main-File href="../rubyrun-0.9.9.htm">
13
+ <link id=Main-File rel=Main-File href="../rubyrun-0.9.9.2.htm">
14
14
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
15
- name="PlaceType"/>
16
- <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
17
- name="PlaceName"/>
15
+ name="stockticker"/>
18
16
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
19
17
  name="place"/>
20
18
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
21
- name="stockticker"/>
19
+ name="PlaceName"/>
20
+ <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
21
+ name="PlaceType"/>
22
22
  </head>
23
23
 
24
24
  <body lang=EN-US link=blue vlink=purple>
@@ -105,14 +105,14 @@ style='mso-bidi-font-weight:normal'><!--[if gte vml 1]><v:shapetype id="_x0000_t
105
105
  style='font-size:10.0pt;font-family:"Arial","sans-serif"'><span
106
106
  style='mso-tab-count:1'>������������������������������������������������� </span></span>Installation
107
107
  and User Guide<span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><span
108
- style='mso-tab-count:1'>����������������������������� </span></span>Page <!--[if supportFields]><span
108
+ style='mso-tab-count:1'>��������������������������� </span></span>Page <!--[if supportFields]><span
109
109
  style='mso-element:field-begin'></span><span
110
110
  style='mso-spacerun:yes'>�</span>PAGE <span style='mso-element:field-separator'></span><![endif]--><span
111
- style='mso-no-proof:yes'>1</span><!--[if supportFields]><span style='mso-element:
112
- field-end'></span><![endif]--> of <!--[if supportFields]><span
111
+ style='mso-no-proof:yes'>11</span><!--[if supportFields]><span
112
+ style='mso-element:field-end'></span><![endif]--> of <!--[if supportFields]><span
113
113
  style='mso-element:field-begin'></span><span
114
114
  style='mso-spacerun:yes'>�</span>NUMPAGES <span style='mso-element:field-separator'></span><![endif]--><span
115
- style='mso-no-proof:yes'>33</span><!--[if supportFields]><span
115
+ style='mso-no-proof:yes'>34</span><!--[if supportFields]><span
116
116
  style='mso-element:field-end'></span><![endif]--><b style='mso-bidi-font-weight:
117
117
  normal'><o:p></o:p></b></p>
118
118
 
@@ -126,8 +126,8 @@ style='mso-bidi-font-weight:normal'><!--[if gte vml 1]><v:shape id="_x0000_i1040
126
126
  <v:imagedata src="image022.png" o:title="rubysophic_logo"/>
127
127
  </v:shape><![endif]--><span style='mso-tab-count:2'>������������������������������������������������������������������ </span></b><span
128
128
  style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Ruby<i
129
- style='mso-bidi-font-style:normal'>Run</i><sup>CE</sup> 0.9.9 Installation and
130
- User Guide<o:p></o:p></span></p>
129
+ style='mso-bidi-font-style:normal'>Run</i><sup>CE</sup> 0.9.9.2 Installation
130
+ and User Guide<o:p></o:p></span></p>
131
131
 
132
132
  <p class=MsoHeader><o:p>&nbsp;</o:p></p>
133
133
 
@@ -1,5 +1,12 @@
1
1
  # rubyrun.rb and ubyrun.rb are duplicate
2
2
  # The purpose of having both files is to allow the use of -rubyrun or -rrubyrun
3
3
  # option when users try to enable RubyRun
4
+
5
+ # turn on j2ee flag if we are runninging inside a J2EE container
6
+ begin
7
+ $j2ee = true if RAILS_ROOT && RAILS_ROOT.include?('WEB-INF')
8
+ rescue
9
+ end
10
+ # boot rubyrun
4
11
  require 'rubygems'
5
12
  require 'rubyrun_boot__'
@@ -3,10 +3,15 @@
3
3
  # (C) Copyright Rubysophic Inc. 2007-2008 #
4
4
  # All rights reserved. #
5
5
  # #
6
- # Use, duplication or disclosure of the code is not permitted #
6
+ # Duplication or disclosure of the code is not permitted #
7
7
  # unless licensed. #
8
8
  # #
9
- # Last Updated: 7/09/08 #
9
+ # Last Updated: 4/21/10 #
10
+ # #
11
+ # In a JRuby-Rack environment Rubyrun is to be run as a Rails #
12
+ # preinitilaizer.rb. This allows rubyrun to sit inside any #
13
+ # JRuby container inside a J2EE servlet container such as #
14
+ # Tomcat and Glassfish. # #
10
15
  #---------------------------------------------------------------#
11
16
  # #
12
17
  # RubyRunMonitor__ is responsible for keeping track of #
@@ -140,6 +145,13 @@ module RubyRunMonitor__
140
145
  if is_in?(RUBYRUN_THREAD_END_HASH, klass, mid, 'strict')
141
146
  roll_up_metrics(tid, true)
142
147
  end
148
+
149
+ # For a J2EE environment, there are no explicit collection of outer dispatch
150
+ # or thread end processing because RubyRun is booted late in preintializer
151
+ # We need to roll the metrics at the end of a inner dispath
152
+ if $j2ee && $rubyrun_thread_local[tid][:inner_dispatch_t].size > 0
153
+ roll_up_metrics(tid, true)
154
+ end
143
155
  end
144
156
 
145
157
  private
@@ -195,12 +207,22 @@ module RubyRunMonitor__
195
207
  end
196
208
 
197
209
  # If request aborted, thread_local can be corrupted (half filled)
198
- # Return true if corrupted else false
210
+ # Return true if corrupted or critical pieces are missing
211
+ # This will result in no performance statistic for this request
212
+ #
213
+ # For outer dispatch data, we cannot collect them in certain
214
+ # environment such as running in a J2EE container.
215
+ # we just fake it by make them the same as the inner dispatch timings
216
+ # for now
199
217
  def thread_local_incomplete? (tid)
200
- $rubyrun_thread_local[tid][:controller].nil? ||
218
+ return true if $rubyrun_thread_local[tid][:controller].nil? ||
201
219
  $rubyrun_thread_local[tid][:action].nil? ||
202
- $rubyrun_thread_local[tid][:outer_dispatch_t].empty? ||
203
220
  $rubyrun_thread_local[tid][:inner_dispatch_t].empty?
221
+ if $rubyrun_thread_local[tid][:outer_dispatch_t].empty?
222
+ $rubyrun_thread_local[tid][:outer_dispatch_t].concat(
223
+ $rubyrun_thread_local[tid][:inner_dispatch_t])
224
+ end
225
+ false
204
226
  end
205
227
 
206
228
  # Sort $rubyrun_metrics_hash by response time in descending order
@@ -57,7 +57,7 @@ module RubyRunReport__
57
57
  $rubyrun_throughput.reverse!
58
58
  html_content = THROUGHPUT_HTML.sub(/%THROUGHPUT_BAR_TABLE%/, bar_content)
59
59
  html_content.sub!(/%THROUGHPUT_LABEL_TABLE%/, label_content)
60
- html_content.sub!(/%APPS_NAME%/,Rails::Configuration.new.root_path.split('/').last)
60
+ html_content.sub!(/%APPS_NAME%/, $j2ee ? Rails::Configuration.new.root_path.split('/')[-2] : Rails::Configuration.new.root_path.split('/').last)
61
61
  html_content.sub!(/%STARTUP%/,"#{$rubyrun_startup_id_type} #{$rubyrun_startup_id}")
62
62
  html_content.sub!(/%TIMESTAMP%/,Time.now.strftime("%H:%M:%S %m/%d/%Y"))
63
63
  # Second, Top Slowest Requests
@@ -86,6 +86,7 @@ module RubyRunReport__
86
86
  def create_rss_channels
87
87
  rss_folder = $rubyrun_config['RSS_PATH'] ? $rubyrun_config['RSS_PATH'] \
88
88
  : "#{Rails::Configuration.new.root_path}/public/#{RubyRunRSS::RUBYRUN_RSS_FOLDER}"
89
+ rss_folder = File.join(Rails::Configuration.new.root_path, '..', RubyRunRSS::RUBYRUN_RSS_FOLDER)if $j2ee
89
90
  begin
90
91
  Dir.mkdir(rss_folder) unless File.exist?(rss_folder)
91
92
  rescue Exception
@@ -38,7 +38,7 @@ class RubyRunRSS
38
38
  @directory = directory
39
39
  @rss_filename = rss_filename
40
40
  @html_filename = html_filename
41
- @apps_name = Rails::Configuration.new.root_path.split('/').last
41
+ @apps_name = $j2ee ? Rails::Configuration.new.root_path.split('/')[-2] : Rails::Configuration.new.root_path.split('/').last
42
42
  @rss_xml_destination = "#{@directory}/#{@rss_filename}"
43
43
  create_channel_content unless File::exists?(@rss_xml_destination)
44
44
  end
@@ -20,7 +20,7 @@ module RubyRunUtils__
20
20
 
21
21
  # Return a readable thread ID for the current thread of execution
22
22
  def get_thread_id(th=Thread.current)
23
- th.inspect.split(/Thread:0x/)[1].split(/ .*?>/)[0]
23
+ th.to_s.split(/Thread:0x/)[1].split(/>/)[0]
24
24
  end
25
25
 
26
26
  # Retrieve caller details (filename, line number, method name)
@@ -1,5 +1,12 @@
1
1
  # rubyrun.rb and ubyrun.rb are duplicate
2
2
  # The purpose of having both files is to allow the use of -rubyrun or -rrubyrun
3
3
  # option when users try to enable RubyRun
4
+
5
+ # turn on j2ee flag if we are runninging inside a J2EE container
6
+ begin
7
+ $j2ee = true if RAILS_ROOT && RAILS_ROOT.include?('WEB-INF')
8
+ rescue
9
+ end
10
+ # boot rubyrun
4
11
  require 'rubygems'
5
12
  require 'rubyrun_boot__'
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 9
8
8
  - 9
9
- - 1
10
- version: 0.9.9.1
9
+ - 2
10
+ version: 0.9.9.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - RubySophic Inc
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-04-20 00:00:00 -07:00
18
+ date: 2010-04-22 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -56,34 +56,34 @@ files:
56
56
  - ext/rubyrunnative__x86-darwin.bundle
57
57
  - ext/rubyrunnative__x86-linux.so
58
58
  - ext/rubyrunnative__x86-mswin32.so
59
- - doc/rubyrun-0.9.9.htm
60
- - doc/rubyrun-0.9.9.pdf
61
- - doc/rubyrun-0.9.9_files/colorschememapping.xml
62
- - doc/rubyrun-0.9.9_files/filelist.xml
63
- - doc/rubyrun-0.9.9_files/header.htm
64
- - doc/rubyrun-0.9.9_files/image001.jpg
65
- - doc/rubyrun-0.9.9_files/image002.jpg
66
- - doc/rubyrun-0.9.9_files/image003.jpg
67
- - doc/rubyrun-0.9.9_files/image004.jpg
68
- - doc/rubyrun-0.9.9_files/image005.jpg
69
- - doc/rubyrun-0.9.9_files/image006.jpg
70
- - doc/rubyrun-0.9.9_files/image007.jpg
71
- - doc/rubyrun-0.9.9_files/image008.jpg
72
- - doc/rubyrun-0.9.9_files/image009.jpg
73
- - doc/rubyrun-0.9.9_files/image010.jpg
74
- - doc/rubyrun-0.9.9_files/image011.jpg
75
- - doc/rubyrun-0.9.9_files/image012.jpg
76
- - doc/rubyrun-0.9.9_files/image013.jpg
77
- - doc/rubyrun-0.9.9_files/image014.jpg
78
- - doc/rubyrun-0.9.9_files/image015.jpg
79
- - doc/rubyrun-0.9.9_files/image016.jpg
80
- - doc/rubyrun-0.9.9_files/image017.png
81
- - doc/rubyrun-0.9.9_files/image018.jpg
82
- - doc/rubyrun-0.9.9_files/image019.jpg
83
- - doc/rubyrun-0.9.9_files/image020.jpg
84
- - doc/rubyrun-0.9.9_files/image021.jpg
85
- - doc/rubyrun-0.9.9_files/image022.png
86
- - doc/rubyrun-0.9.9_files/themedata.thmx
59
+ - doc/rubyrun-0.9.9.2.htm
60
+ - doc/rubyrun-0.9.9.2.pdf
61
+ - doc/rubyrun-0.9.9.2_files/colorschememapping.xml
62
+ - doc/rubyrun-0.9.9.2_files/filelist.xml
63
+ - doc/rubyrun-0.9.9.2_files/header.htm
64
+ - doc/rubyrun-0.9.9.2_files/image001.jpg
65
+ - doc/rubyrun-0.9.9.2_files/image002.jpg
66
+ - doc/rubyrun-0.9.9.2_files/image003.jpg
67
+ - doc/rubyrun-0.9.9.2_files/image004.jpg
68
+ - doc/rubyrun-0.9.9.2_files/image005.jpg
69
+ - doc/rubyrun-0.9.9.2_files/image006.jpg
70
+ - doc/rubyrun-0.9.9.2_files/image007.jpg
71
+ - doc/rubyrun-0.9.9.2_files/image008.jpg
72
+ - doc/rubyrun-0.9.9.2_files/image009.jpg
73
+ - doc/rubyrun-0.9.9.2_files/image010.jpg
74
+ - doc/rubyrun-0.9.9.2_files/image011.jpg
75
+ - doc/rubyrun-0.9.9.2_files/image012.jpg
76
+ - doc/rubyrun-0.9.9.2_files/image013.jpg
77
+ - doc/rubyrun-0.9.9.2_files/image014.jpg
78
+ - doc/rubyrun-0.9.9.2_files/image015.jpg
79
+ - doc/rubyrun-0.9.9.2_files/image016.jpg
80
+ - doc/rubyrun-0.9.9.2_files/image017.png
81
+ - doc/rubyrun-0.9.9.2_files/image018.jpg
82
+ - doc/rubyrun-0.9.9.2_files/image019.jpg
83
+ - doc/rubyrun-0.9.9.2_files/image020.jpg
84
+ - doc/rubyrun-0.9.9.2_files/image021.jpg
85
+ - doc/rubyrun-0.9.9.2_files/image022.png
86
+ - doc/rubyrun-0.9.9.2_files/themedata.thmx
87
87
  - etc/rubyrun_opts.yml
88
88
  has_rdoc: true
89
89
  homepage: http://www.rubysophic.com