rubyrun 0.9.5-x86-mswin32-60 → 0.9.6-x86-mswin32-60
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 +4 -4
 - data/docs/{rubyrun-0.9.5.htm → rubyrun-0.9.6.htm} +292 -291
 - data/docs/{rubyrun-0.9.5.pdf → rubyrun-0.9.6.pdf} +0 -0
 - data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/filelist.xml +1 -1
 - data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/header.htm +6 -6
 - data/lib/rubyrun/rubyrun_commander__.rb +3 -3
 - data/lib/rubyrun/rubyrun_globals.rb +2 -0
 - data/lib/rubyrun/rubyrun_html__.rb +1 -1
 - data/lib/rubyrun/rubyrun_html_writer__.rb +20 -7
 - data/lib/rubyrun/rubyrun_initializer__.rb +36 -9
 - data/lib/rubyrun/rubyrun_monitor__.rb +3 -3
 - data/lib/rubyrun/rubyrun_report__.rb +3 -2
 - data/lib/rubyrun/rubyrun_rss__.rb +7 -5
 - data/lib/rubyrun/rubyrun_utils__.rb +5 -0
 - metadata +31 -31
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/colorschememapping.xml +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image001.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image002.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image003.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image004.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image005.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image006.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image007.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image008.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image009.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image010.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image011.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image012.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image013.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image014.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image015.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image016.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image017.png +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image018.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image019.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image020.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image021.jpg +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/image022.png +0 -0
 - /data/docs/{rubyrun-0.9.5_files → rubyrun-0.9.6_files}/themedata.thmx +0 -0
 
| 
         Binary file 
     | 
| 
         @@ -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="../ 
     | 
| 
      
 13 
     | 
    
         
            +
            <link id=Main-File rel=Main-File href="../rubyrun-0.9.6.htm">
         
     | 
| 
       14 
14 
     | 
    
         
             
            <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
         
     | 
| 
       15 
     | 
    
         
            -
             name=" 
     | 
| 
       16 
     | 
    
         
            -
            <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
         
     | 
| 
       17 
     | 
    
         
            -
             name="place"/>
         
     | 
| 
      
 15 
     | 
    
         
            +
             name="PlaceType"/>
         
     | 
| 
       18 
16 
     | 
    
         
             
            <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
         
     | 
| 
       19 
17 
     | 
    
         
             
             name="PlaceName"/>
         
     | 
| 
       20 
18 
     | 
    
         
             
            <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
         
     | 
| 
       21 
     | 
    
         
            -
             name=" 
     | 
| 
      
 19 
     | 
    
         
            +
             name="place"/>
         
     | 
| 
      
 20 
     | 
    
         
            +
            <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
         
     | 
| 
      
 21 
     | 
    
         
            +
             name="stockticker"/>
         
     | 
| 
       22 
22 
     | 
    
         
             
            </head>
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
            <body lang=EN-US link=blue vlink=purple>
         
     | 
| 
         @@ -126,7 +126,7 @@ 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. 
     | 
| 
      
 129 
     | 
    
         
            +
            style='mso-bidi-font-style:normal'>Run</i><sup>CE</sup> 0.9.6 Installation and
         
     | 
| 
       130 
130 
     | 
    
         
             
            User Guide<o:p></o:p></span></p>
         
     | 
| 
       131 
131 
     | 
    
         | 
| 
       132 
132 
     | 
    
         
             
            <p class=MsoHeader><o:p> </o:p></p>
         
     | 
| 
         @@ -19,7 +19,7 @@ module RubyRunCommander__ 
     | 
|
| 
       19 
19 
     | 
    
         
             
              # display the last line # and function of the threads
         
     | 
| 
       20 
20 
     | 
    
         
             
              def dump_thread_status
         
     | 
| 
       21 
21 
     | 
    
         
             
                (unsupport_function; return) unless $rubyrun_native
         
     | 
| 
       22 
     | 
    
         
            -
                $rubyrun_thread_status_reporter = RubyRunHTMLWriter.new( 
     | 
| 
      
 22 
     | 
    
         
            +
                $rubyrun_thread_status_reporter = RubyRunHTMLWriter.new($rubyrun_report_folder + '/' + File.basename($0, ".*") + '_' + $rubyrun_startup_id + '_thread_status.html', nil, shift_age = 10, shift_size = 4096000) unless $rubyrun_thread_status_reporter
         
     | 
| 
       23 
23 
     | 
    
         
             
                start_time = Time.now
         
     | 
| 
       24 
24 
     | 
    
         
             
                th_data_hash = RubyRunNative__.get_all_top_stacks
         
     | 
| 
       25 
25 
     | 
    
         
             
                odd_row ||= true
         
     | 
| 
         @@ -72,7 +72,7 @@ module RubyRunCommander__ 
     | 
|
| 
       72 
72 
     | 
    
         
             
              def kill_threads(monitor_thr)
         
     | 
| 
       73 
73 
     | 
    
         
             
                (unsupport_function; return) unless $rubyrun_native
         
     | 
| 
       74 
74 
     | 
    
         
             
                if !$rubyrun_thread_dump_reporter
         
     | 
| 
       75 
     | 
    
         
            -
                  $rubyrun_thread_dump_reporter = Logger.new( 
     | 
| 
      
 75 
     | 
    
         
            +
                  $rubyrun_thread_dump_reporter = Logger.new($rubyrun_report_folder + '/' + File.basename($0, ".*") + '_' + $rubyrun_startup_id + '_thread_dump.txt', shift_age = 10, shift_size = 4096000)
         
     | 
| 
       76 
76 
     | 
    
         
             
                  $rubyrun_thread_dump_reporter.level = Logger::INFO
         
     | 
| 
       77 
77 
     | 
    
         
             
                  class << $rubyrun_thread_dump_reporter
         
     | 
| 
       78 
78 
     | 
    
         
             
                    include RubyRunUtils__
         
     | 
| 
         @@ -102,7 +102,7 @@ module RubyRunCommander__ 
     | 
|
| 
       102 
102 
     | 
    
         
             
              # The snapshot is taken after a gc call is made
         
     | 
| 
       103 
103 
     | 
    
         
             
              def dump_object_map
         
     | 
| 
       104 
104 
     | 
    
         
             
                start_time = Time.now
         
     | 
| 
       105 
     | 
    
         
            -
                $rubyrun_obj_map_reporter = RubyRunHTMLWriter.new( 
     | 
| 
      
 105 
     | 
    
         
            +
                $rubyrun_obj_map_reporter = RubyRunHTMLWriter.new($rubyrun_report_folder + '/' + File.basename($0, ".*") + '_' + $rubyrun_startup_id + '_object_map.html', nil, shift_age = 10, shift_size = 4096000) unless $rubyrun_obj_map_reporter
         
     | 
| 
       106 
106 
     | 
    
         
             
                object_map = Hash.new
         
     | 
| 
       107 
107 
     | 
    
         
             
                ttl_object = 0
         
     | 
| 
       108 
108 
     | 
    
         
             
                ObjectSpace.garbage_collect
         
     | 
| 
         @@ -25,6 +25,8 @@ module RubyRunGlobals 
     | 
|
| 
       25 
25 
     | 
    
         
             
              RUBYRUN_LOG = '/log'
         
     | 
| 
       26 
26 
     | 
    
         
             
              RUBYRUN_REPORT = '/report'
         
     | 
| 
       27 
27 
     | 
    
         
             
              RUBYRUN_SIGNATURE = '/signatures'
         
     | 
| 
      
 28 
     | 
    
         
            +
              RUBYRUN_STARTUP_ID_TYPE_PORT = 'port #'
         
     | 
| 
      
 29 
     | 
    
         
            +
              RUBYRUN_STARTUP_ID_TYPE_PROCESS = 'process id'
         
     | 
| 
       28 
30 
     | 
    
         
             
              RUBYRUN_INCLUDE_HASH_FILE = '/include_hash_file'
         
     | 
| 
       29 
31 
     | 
    
         
             
              RUBYRUN_EXCLUDE_HASH_FILE = '/exclude_hash_file'
         
     | 
| 
       30 
32 
     | 
    
         
             
              RUBYRUN_DIR_HASH_FILE = '/dir_hash_file'
         
     | 
| 
         @@ -80,7 +80,7 @@ module RubyRunHTML__ 
     | 
|
| 
       80 
80 
     | 
    
         
             
                            <td align=left><font face='Tahoma' size=2 color=black>%s</font></td>
         
     | 
| 
       81 
81 
     | 
    
         
             
                            <td align=left><font face='Tahoma' size=2 color=black>%s</font></td></tr>"
         
     | 
| 
       82 
82 
     | 
    
         | 
| 
       83 
     | 
    
         
            -
              THROUGHPUT_HTML = "<p align=center><font size='3' face='Verdana'>Performance summary of %APPS_NAME% as of %TIMESTAMP%</font></p>
         
     | 
| 
      
 83 
     | 
    
         
            +
              THROUGHPUT_HTML = "<p align=center><font size='3' face='Verdana'>Performance summary of %APPS_NAME% (%STARTUP%) as of %TIMESTAMP%</font></p>
         
     | 
| 
       84 
84 
     | 
    
         
             
                                 <table id=tblgraph align=center width=80 cellpadding=2 cellspacing=0 border=0>
         
     | 
| 
       85 
85 
     | 
    
         
             
                                 <tr><td bgcolor=WHITE align=center valign=middle width=22 style='writing-mode:tb-rl'><font face=arial size='-1'>Average throughput per min</font></td>%THROUGHPUT_BAR_TABLE%</tr>
         
     | 
| 
       86 
86 
     | 
    
         
             
                                 <tr bgcolor=#505050>
         
     | 
| 
         @@ -21,22 +21,35 @@ require 'logger' 
     | 
|
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
            class RubyRunHTMLWriter < Logger
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
     | 
    
         
            -
              def initialize( 
     | 
| 
      
 24 
     | 
    
         
            +
              def initialize(filename, header, shift_age = 0, shift_size = 1048576)
         
     | 
| 
       25 
25 
     | 
    
         
             
                @progname = nil
         
     | 
| 
       26 
26 
     | 
    
         
             
                @level = DEBUG
         
     | 
| 
       27 
27 
     | 
    
         
             
                @default_formatter = Formatter.new
         
     | 
| 
       28 
28 
     | 
    
         
             
                @formatter = nil
         
     | 
| 
       29 
29 
     | 
    
         
             
                @logdev = nil
         
     | 
| 
       30 
     | 
    
         
            -
                 
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
      
 30 
     | 
    
         
            +
                @filename = filename
         
     | 
| 
      
 31 
     | 
    
         
            +
                @header = header
         
     | 
| 
      
 32 
     | 
    
         
            +
                @shift_age = shift_age
         
     | 
| 
      
 33 
     | 
    
         
            +
                @shift_size = shift_size
         
     | 
| 
      
 34 
     | 
    
         
            +
                if @filename
         
     | 
| 
      
 35 
     | 
    
         
            +
                  @logdev = RubyRunHTMLDevice.new(@filename, @header, :shift_age => @shift_age,
         
     | 
| 
      
 36 
     | 
    
         
            +
                    :shift_size => @shift_size)
         
     | 
| 
       33 
37 
     | 
    
         
             
                end
         
     | 
| 
       34 
38 
     | 
    
         
             
              end
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
       36 
40 
     | 
    
         
             
              def format_message (severity, timestamp, progname, msg)
         
     | 
| 
       37 
41 
     | 
    
         
             
                msg
         
     | 
| 
       38 
     | 
    
         
            -
              end 
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
      
 42 
     | 
    
         
            +
              end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
              def info(msg, &blk)
         
     | 
| 
      
 45 
     | 
    
         
            +
                begin
         
     | 
| 
      
 46 
     | 
    
         
            +
                  super(msg, &blk)
         
     | 
| 
      
 47 
     | 
    
         
            +
                rescue
         
     | 
| 
      
 48 
     | 
    
         
            +
                  @logdev = RubyRunHTMLDevice.new(@filename, @header, :shift_age => @shift_age, :shift_size => @shift_size)      
         
     | 
| 
      
 49 
     | 
    
         
            +
                  super(msg, &blk)
         
     | 
| 
      
 50 
     | 
    
         
            +
                end
         
     | 
| 
      
 51 
     | 
    
         
            +
              end
         
     | 
| 
      
 52 
     | 
    
         
            +
               
         
     | 
| 
       40 
53 
     | 
    
         
             
              class RubyRunHTMLDevice < Logger::LogDevice
         
     | 
| 
       41 
54 
     | 
    
         | 
| 
       42 
55 
     | 
    
         
             
                def initialize(log = nil, header = nil, opt = {})
         
     | 
| 
         @@ -54,13 +54,19 @@ module RubyRunInitializer__ 
     | 
|
| 
       54 
54 
     | 
    
         
             
                end
         
     | 
| 
       55 
55 
     | 
    
         
             
                *rubyrun_folders = $rubyrun_working_dir + RUBYRUN_LOG, $rubyrun_working_dir + RUBYRUN_REPORT, $rubyrun_working_dir + RUBYRUN_SIGNATURE
         
     | 
| 
       56 
56 
     | 
    
         
             
                make_folder(rubyrun_folders)
         
     | 
| 
       57 
     | 
    
         
            -
                 
     | 
| 
       58 
     | 
    
         
            -
                 
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
      
 57 
     | 
    
         
            +
                $rubyrun_log_folder, $rubyrun_report_folder, $rubyrun_signature_folder = *rubyrun_folders
         
     | 
| 
      
 58 
     | 
    
         
            +
                if ARGV.include?('-p')
         
     | 
| 
      
 59 
     | 
    
         
            +
                  $rubyrun_startup_id_type = RUBYRUN_STARTUP_ID_TYPE_PORT
         
     | 
| 
      
 60 
     | 
    
         
            +
                  $rubyrun_startup_id =  ARGV[ARGV.index('-p')+1]
         
     | 
| 
      
 61 
     | 
    
         
            +
                else
         
     | 
| 
      
 62 
     | 
    
         
            +
                  $rubyrun_startup_id_type = RUBYRUN_STARTUP_ID_TYPE_PROCESS
         
     | 
| 
      
 63 
     | 
    
         
            +
                  $rubyrun_startup_id = $$.to_s
         
     | 
| 
      
 64 
     | 
    
         
            +
                end
         
     | 
| 
      
 65 
     | 
    
         
            +
                ready_logfile
         
     | 
| 
       60 
66 
     | 
    
         
             
                system_wide_opts = $rubyrun_working_dir + RUBYRUN_OPTS_FILE
         
     | 
| 
       61 
67 
     | 
    
         
             
                app_wide_opts = Dir.getwd + '/' + RUBYRUN_OPTS_FILE
         
     | 
| 
       62 
68 
     | 
    
         
             
                File.exists?(app_wide_opts) ? load_config_props(app_wide_opts) : load_config_props(system_wide_opts)
         
     | 
| 
       63 
     | 
    
         
            -
                $rubyrun_tracer = RubyRunHTMLWriter.new( 
     | 
| 
      
 69 
     | 
    
         
            +
                $rubyrun_tracer = RubyRunHTMLWriter.new($rubyrun_report_folder + '/' + File.basename($0, ".*") + '_' + $rubyrun_startup_id + '_trace.html', METHOD_TRACE_HEADER, shift_age = 10, shift_size = 4096000) unless $rubyrun_trace_hash.empty?
         
     | 
| 
       64 
70 
     | 
    
         
             
              end
         
     | 
| 
       65 
71 
     | 
    
         | 
| 
       66 
72 
     | 
    
         
             
              # Create the working directory, which will be 'rubyrun' under the current directory
         
     | 
| 
         @@ -102,16 +108,37 @@ module RubyRunInitializer__ 
     | 
|
| 
       102 
108 
     | 
    
         
             
              end
         
     | 
| 
       103 
109 
     | 
    
         | 
| 
       104 
110 
     | 
    
         
             
              # Initialize rubyrun logger and create its own log format
         
     | 
| 
       105 
     | 
    
         
            -
              def ready_logfile 
     | 
| 
       106 
     | 
    
         
            -
                $rubyrun_logger = Logger.new( 
     | 
| 
      
 111 
     | 
    
         
            +
              def ready_logfile
         
     | 
| 
      
 112 
     | 
    
         
            +
                $rubyrun_logger = Logger.new($rubyrun_log_folder + '/' + File.basename($0, ".*") + '_' + $rubyrun_startup_id + '.log', shift_age = 10, shift_size = 4096000)
         
     | 
| 
       107 
113 
     | 
    
         
             
                $rubyrun_logger.level = Logger::INFO
         
     | 
| 
       108 
114 
     | 
    
         
             
                class << $rubyrun_logger
         
     | 
| 
       109 
115 
     | 
    
         
             
                  include RubyRunUtils__
         
     | 
| 
       110 
116 
     | 
    
         
             
                  def format_message (severity, timestamp, progname, msg)
         
     | 
| 
       111 
117 
     | 
    
         
             
                    "[#{timestamp.strftime("%Y-%m-%d %H:%M:%S")}.#{("%.3f" % timestamp.to_f).split('.')[1]}] #{get_thread_id} #{msg}\n"
         
     | 
| 
       112 
118 
     | 
    
         
             
                  end
         
     | 
| 
      
 119 
     | 
    
         
            +
                  def info(msg, &blk)
         
     | 
| 
      
 120 
     | 
    
         
            +
                    begin super(msg, &blk) rescue (@logdev = create_log_device; super(msg, &blk)) end
         
     | 
| 
      
 121 
     | 
    
         
            +
                  end      
         
     | 
| 
      
 122 
     | 
    
         
            +
                  def warn(msg, &blk)
         
     | 
| 
      
 123 
     | 
    
         
            +
                    begin super(msg, &blk) rescue (@logdev = create_log_device; super(msg, &blk)) end
         
     | 
| 
      
 124 
     | 
    
         
            +
                  end      
         
     | 
| 
      
 125 
     | 
    
         
            +
                  def fatal(msg, &blk)
         
     | 
| 
      
 126 
     | 
    
         
            +
                    begin super(msg, &blk) rescue (@logdev = create_log_device; super(msg, &blk)) end
         
     | 
| 
      
 127 
     | 
    
         
            +
                  end      
         
     | 
| 
      
 128 
     | 
    
         
            +
                  def error(msg, &blk)
         
     | 
| 
      
 129 
     | 
    
         
            +
                    begin super(msg, &blk) rescue (@logdev = create_log_device; super(msg, &blk)) end
         
     | 
| 
      
 130 
     | 
    
         
            +
                  end      
         
     | 
| 
      
 131 
     | 
    
         
            +
                  def debug(msg, &blk)
         
     | 
| 
      
 132 
     | 
    
         
            +
                    begin super(msg, &blk) rescue (@logdev = create_log_device; super(msg, &blk)) end
         
     | 
| 
      
 133 
     | 
    
         
            +
                  end            
         
     | 
| 
       113 
134 
     | 
    
         
             
                end
         
     | 
| 
       114 
135 
     | 
    
         
             
              end
         
     | 
| 
      
 136 
     | 
    
         
            +
              
         
     | 
| 
      
 137 
     | 
    
         
            +
              # Create new log device in case the log stream is closed.
         
     | 
| 
      
 138 
     | 
    
         
            +
              # This happens only in Mongrel cluster scenario
         
     | 
| 
      
 139 
     | 
    
         
            +
              def create_log_device
         
     | 
| 
      
 140 
     | 
    
         
            +
                Logger::LogDevice.new($rubyrun_log_folder + '/' + File.basename($0, ".*") + '_' + $rubyrun_startup_id + '.log', :shift_age => 10, :shift_size => 4096000)    
         
     | 
| 
      
 141 
     | 
    
         
            +
              end
         
     | 
| 
       115 
142 
     | 
    
         | 
| 
       116 
143 
     | 
    
         
             
              # Property file is a yml file.
         
     | 
| 
       117 
144 
     | 
    
         
             
              # Load the properties into $config hash
         
     | 
| 
         @@ -295,19 +322,19 @@ module RubyRunInitializer__ 
     | 
|
| 
       295 
322 
     | 
    
         | 
| 
       296 
323 
     | 
    
         
             
              # Return the target file name that stores the serialized INCLUDE_HASH
         
     | 
| 
       297 
324 
     | 
    
         
             
              def get_include_hash_file
         
     | 
| 
       298 
     | 
    
         
            -
                   
     | 
| 
      
 325 
     | 
    
         
            +
                  $rubyrun_signature_folder + '/' + RUBYRUN_INCLUDE_HASH_FILE
         
     | 
| 
       299 
326 
     | 
    
         
             
              end
         
     | 
| 
       300 
327 
     | 
    
         | 
| 
       301 
328 
     | 
    
         
             
              # return the target file name that stores the serialized EXCLUDE_HASH
         
     | 
| 
       302 
329 
     | 
    
         
             
              def get_exclude_hash_file
         
     | 
| 
       303 
     | 
    
         
            -
                   
     | 
| 
      
 330 
     | 
    
         
            +
                  $rubyrun_signature_folder + '/' + RUBYRUN_EXCLUDE_HASH_FILE
         
     | 
| 
       304 
331 
     | 
    
         
             
              end
         
     | 
| 
       305 
332 
     | 
    
         | 
| 
       306 
333 
     | 
    
         
             
              # Return the target file name that stores the serialized directory contents digest
         
     | 
| 
       307 
334 
     | 
    
         
             
              # This file has to be application dependent, and we use the current directory of the 
         
     | 
| 
       308 
335 
     | 
    
         
             
              # running process to represent the application directory.
         
     | 
| 
       309 
336 
     | 
    
         
             
              def get_dir_hash_file
         
     | 
| 
       310 
     | 
    
         
            -
                   
     | 
| 
      
 337 
     | 
    
         
            +
                  $rubyrun_signature_folder + '/' +  RUBYRUN_DIR_HASH_FILE + '_' + Digest::MD5.hexdigest(Dir.getwd)
         
     | 
| 
       311 
338 
     | 
    
         
             
              end
         
     | 
| 
       312 
339 
     | 
    
         | 
| 
       313 
340 
     | 
    
         
             
            end
         
     | 
| 
         @@ -70,19 +70,19 @@ module RubyRunMonitor__ 
     | 
|
| 
       70 
70 
     | 
    
         
             
              # in memory
         
     | 
| 
       71 
71 
     | 
    
         
             
              def start_thread_monitor
         
     | 
| 
       72 
72 
     | 
    
         
             
                $rubyrun_logger.info "----- RubyRun Thread Monitor started -----"
         
     | 
| 
       73 
     | 
    
         
            -
                 
     | 
| 
      
 73 
     | 
    
         
            +
                $rubyrun_monitor_thr = Thread.new {
         
     | 
| 
       74 
74 
     | 
    
         
             
                  cycle = $rubyrun_report_timer / RUBYRUN_MONITOR_TIMER
         
     | 
| 
       75 
75 
     | 
    
         
             
                  sleep_count = 0
         
     | 
| 
       76 
76 
     | 
    
         
             
                  loop do
         
     | 
| 
       77 
77 
     | 
    
         
             
                    sleep RUBYRUN_MONITOR_TIMER
         
     | 
| 
       78 
     | 
    
         
            -
                     
     | 
| 
      
 78 
     | 
    
         
            +
                    $rubyrun_monitor_thr.exit if exit_monitor?
         
     | 
| 
       79 
79 
     | 
    
         
             
                    Thread.new {
         
     | 
| 
       80 
80 
     | 
    
         
             
                      begin
         
     | 
| 
       81 
81 
     | 
    
         
             
                        sleep_count += 1
         
     | 
| 
       82 
82 
     | 
    
         
             
                        sleep_count == cycle ? (dump_reports(true); sleep_count = 0) : dump_reports
         
     | 
| 
       83 
83 
     | 
    
         
             
                        dump_thread_status if thread_status?
         
     | 
| 
       84 
84 
     | 
    
         
             
                        dump_object_map if object_map?
         
     | 
| 
       85 
     | 
    
         
            -
                        kill_threads( 
     | 
| 
      
 85 
     | 
    
         
            +
                        kill_threads($rubyrun_monitor_thr) if soft_kill? || hard_kill?
         
     | 
| 
       86 
86 
     | 
    
         
             
                      rescue Exception => e
         
     | 
| 
       87 
87 
     | 
    
         
             
                        $stderr.print e.to_s + "\n" + e.backtrace.join("\n")
         
     | 
| 
       88 
88 
     | 
    
         
             
                        exit(-1)
         
     | 
| 
         @@ -58,6 +58,7 @@ module RubyRunReport__ 
     | 
|
| 
       58 
58 
     | 
    
         
             
                html_content = THROUGHPUT_HTML.sub(/%THROUGHPUT_BAR_TABLE%/, bar_content)
         
     | 
| 
       59 
59 
     | 
    
         
             
                html_content.sub!(/%THROUGHPUT_LABEL_TABLE%/, label_content)
         
     | 
| 
       60 
60 
     | 
    
         
             
                html_content.sub!(/%APPS_NAME%/,Rails::Configuration.new.root_path.split('/').last)
         
     | 
| 
      
 61 
     | 
    
         
            +
                html_content.sub!(/%STARTUP%/,"#{$rubyrun_startup_id_type} #{$rubyrun_startup_id}")    
         
     | 
| 
       61 
62 
     | 
    
         
             
                html_content.sub!(/%TIMESTAMP%/,Time.now.strftime("%H:%M:%S %m/%d/%Y"))  
         
     | 
| 
       62 
63 
     | 
    
         
             
                # Second, Top Slowest Requests
         
     | 
| 
       63 
64 
     | 
    
         
             
                results = sort_performance_metrics
         
     | 
| 
         @@ -88,7 +89,7 @@ module RubyRunReport__ 
     | 
|
| 
       88 
89 
     | 
    
         
             
                begin
         
     | 
| 
       89 
90 
     | 
    
         
             
                  Dir.mkdir(rss_folder) unless File.exist?(rss_folder)
         
     | 
| 
       90 
91 
     | 
    
         
             
                rescue Exception
         
     | 
| 
       91 
     | 
    
         
            -
                  rss_folder =  
     | 
| 
      
 92 
     | 
    
         
            +
                  rss_folder = $rubyrun_report_folder
         
     | 
| 
       92 
93 
     | 
    
         
             
                end    
         
     | 
| 
       93 
94 
     | 
    
         
             
                $rubyrun_perf_summary_rss = RubyRunRSS.new \
         
     | 
| 
       94 
95 
     | 
    
         
             
                                            RubyRunRSS::RUBYRUN_RSS_PERF_SUMMARY_CHANNEL_TITLE,
         
     | 
| 
         @@ -102,7 +103,7 @@ module RubyRunReport__ 
     | 
|
| 
       102 
103 
     | 
    
         | 
| 
       103 
104 
     | 
    
         
             
              # Create the CSV files 
         
     | 
| 
       104 
105 
     | 
    
         
             
              def create_csv_files
         
     | 
| 
       105 
     | 
    
         
            -
                $rubyrun_txn_log_reporter = Logger.new("#{ 
     | 
| 
      
 106 
     | 
    
         
            +
                $rubyrun_txn_log_reporter = Logger.new("#{$rubyrun_report_folder}/#{File.basename($0, ".*")}_#{$rubyrun_startup_id}_txn_log.csv", shift_age = 10, shift_size = 4096000)   
         
     | 
| 
       106 
107 
     | 
    
         
             
                $rubyrun_txn_log_reporter.info "#\n# Format: [URL],[thread ID],[timestamp],[response time],[action time],[database IO time],[view time],[dispatch delay time],[uncaptured time]\n#"
         
     | 
| 
       107 
108 
     | 
    
         
             
              end
         
     | 
| 
       108 
109 
     | 
    
         | 
| 
         @@ -27,8 +27,8 @@ class RubyRunRSS 
     | 
|
| 
       27 
27 
     | 
    
         
             
              RUBYRUN_RSS_PERF_SUMMARY_CHANNEL_ITEM_FILENAME   = 'perf_summary_item'
         
     | 
| 
       28 
28 
     | 
    
         
             
              RUBYRUN_RSS_PERF_SUMMARY_CHANNEL_DESCRIPTION     = 'RubyRun delivers up-to-the-minute performance summary of your application.'
         
     | 
| 
       29 
29 
     | 
    
         
             
              RUBYRUN_RSS_PERF_SUMMARY_CHANNEL_FILENAME        = 'perf_summary.xml'
         
     | 
| 
       30 
     | 
    
         
            -
              RUBYRUN_RSS_PERF_SUMMARY_ITEM_TITLE              = ' 
     | 
| 
       31 
     | 
    
         
            -
              RUBYRUN_RSS_PERF_SUMMARY_ITEM_DESCRIPTION        = 'Performance summary of %s at %s'  
         
     | 
| 
      
 30 
     | 
    
         
            +
              RUBYRUN_RSS_PERF_SUMMARY_ITEM_TITLE              = 'Report for %s at %s'
         
     | 
| 
      
 31 
     | 
    
         
            +
              RUBYRUN_RSS_PERF_SUMMARY_ITEM_DESCRIPTION        = 'Performance summary of %s (%s) at %s'  
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
       33 
33 
     | 
    
         
             
              # Constructor of the class.
         
     | 
| 
       34 
34 
     | 
    
         
             
              # RSS XML file and HTML files will be kept in the directory as specified                
         
     | 
| 
         @@ -65,11 +65,13 @@ class RubyRunRSS 
     | 
|
| 
       65 
65 
     | 
    
         
             
              # Add an item to the RSS channel
         
     | 
| 
       66 
66 
     | 
    
         
             
              def add_item (title, description, html_content)
         
     | 
| 
       67 
67 
     | 
    
         
             
                filename = "#{@html_filename}_#{Time.now.to_i}#{rand(1000000)}.html"
         
     | 
| 
       68 
     | 
    
         
            -
                File.open("#{@directory}/#{filename}", 'w') { |file| file.puts html_content } 
     | 
| 
      
 68 
     | 
    
         
            +
                File.open("#{@directory}/#{filename}", 'w') { |file| file.puts html_content }
         
     | 
| 
       69 
69 
     | 
    
         
             
                item = RSS::Rss::Channel::Item.new
         
     | 
| 
       70 
     | 
    
         
            -
                item.title = sprintf(title, Time.now.strftime("%H:%M:%S"))
         
     | 
| 
       71 
     | 
    
         
            -
                item.description = sprintf(description, @apps_name, Time.now.strftime("%H:%M:%S"))
         
     | 
| 
      
 70 
     | 
    
         
            +
                item.title = sprintf(title, "#{$rubyrun_startup_id_type} #{$rubyrun_startup_id}",Time.now.strftime("%H:%M:%S"))
         
     | 
| 
      
 71 
     | 
    
         
            +
                item.description = sprintf(description, @apps_name, "#{$rubyrun_startup_id_type} #{$rubyrun_startup_id}", Time.now.strftime("%H:%M:%S"))
         
     | 
| 
       72 
72 
     | 
    
         
             
                item.link = "http://#{$rubyrun_host_with_port}/#{RUBYRUN_RSS_FOLDER}/#{filename}"
         
     | 
| 
      
 73 
     | 
    
         
            +
                sleep(rand(3))
         
     | 
| 
      
 74 
     | 
    
         
            +
                @rss = load_rss_content    
         
     | 
| 
       73 
75 
     | 
    
         
             
                remove_old_item(@rss) if @rss.items.length == $rubyrun_report_shift_age
         
     | 
| 
       74 
76 
     | 
    
         
             
                @rss.items << item
         
     | 
| 
       75 
77 
     | 
    
         
             
                File.open(@rss_xml_destination,"w") do |f|
         
     | 
| 
         @@ -45,6 +45,11 @@ module RubyRunUtils__ 
     | 
|
| 
       45 
45 
     | 
    
         
             
              def is_rails_controller?(klass)
         
     | 
| 
       46 
46 
     | 
    
         
             
                return true if $rubyrun_controller_classes.include?(klass)
         
     | 
| 
       47 
47 
     | 
    
         
             
                $rubyrun_rails_env ||= ENV['RAILS_ENV']
         
     | 
| 
      
 48 
     | 
    
         
            +
                if $rubyrun_rails_env && !$rubyrun_monitor_thr.alive? && !$rubyrun_monitor
         
     | 
| 
      
 49 
     | 
    
         
            +
                  $rubyrun_logger.info('----- RubyRun Thread Monitor Restarted -----')
         
     | 
| 
      
 50 
     | 
    
         
            +
                  start_thread_monitor
         
     | 
| 
      
 51 
     | 
    
         
            +
                  $rubyrun_monitor = true
         
     | 
| 
      
 52 
     | 
    
         
            +
                end    
         
     | 
| 
       48 
53 
     | 
    
         
             
                begin
         
     | 
| 
       49 
54 
     | 
    
         
             
                  ($rubyrun_controller_classes << klass; return true) if $rubyrun_rails_env &&
         
     | 
| 
       50 
55 
     | 
    
         
             
                    klass.to_s[-10, 10] == 'Controller' && is_application_controller(klass)
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rubyrun
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.9. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.9.6
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: x86-mswin32-60
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors: 
         
     | 
| 
       7 
7 
     | 
    
         
             
            - RubySophic Inc
         
     | 
| 
         @@ -9,7 +9,7 @@ autorequire: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            date: 2008-08- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2008-08-08 00:00:00 -07:00
         
     | 
| 
       13 
13 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
         @@ -50,35 +50,35 @@ files: 
     | 
|
| 
       50 
50 
     | 
    
         
             
            - ext/rubyrunnative__x86-darwin.bundle
         
     | 
| 
       51 
51 
     | 
    
         
             
            - ext/rubyrunnative__x86-linux.so
         
     | 
| 
       52 
52 
     | 
    
         
             
            - ext/rubyrunnative__x86-mswin32.so
         
     | 
| 
       53 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       54 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       55 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       56 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       57 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       58 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       59 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       60 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       61 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       62 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       63 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       64 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       65 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       66 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       67 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       68 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       69 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       70 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       71 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       72 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       73 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       74 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       75 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       76 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       77 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       78 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       79 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       80 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
       81 
     | 
    
         
            -
            - docs/rubyrun-0.9. 
     | 
| 
      
 53 
     | 
    
         
            +
            - docs/rubyrun-0.9.6.htm
         
     | 
| 
      
 54 
     | 
    
         
            +
            - docs/rubyrun-0.9.6.pdf
         
     | 
| 
      
 55 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files
         
     | 
| 
      
 56 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/colorschememapping.xml
         
     | 
| 
      
 57 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/filelist.xml
         
     | 
| 
      
 58 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/header.htm
         
     | 
| 
      
 59 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image001.jpg
         
     | 
| 
      
 60 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image002.jpg
         
     | 
| 
      
 61 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image003.jpg
         
     | 
| 
      
 62 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image004.jpg
         
     | 
| 
      
 63 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image005.jpg
         
     | 
| 
      
 64 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image006.jpg
         
     | 
| 
      
 65 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image007.jpg
         
     | 
| 
      
 66 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image008.jpg
         
     | 
| 
      
 67 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image009.jpg
         
     | 
| 
      
 68 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image010.jpg
         
     | 
| 
      
 69 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image011.jpg
         
     | 
| 
      
 70 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image012.jpg
         
     | 
| 
      
 71 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image013.jpg
         
     | 
| 
      
 72 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image014.jpg
         
     | 
| 
      
 73 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image015.jpg
         
     | 
| 
      
 74 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image016.jpg
         
     | 
| 
      
 75 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image017.png
         
     | 
| 
      
 76 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image018.jpg
         
     | 
| 
      
 77 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image019.jpg
         
     | 
| 
      
 78 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image020.jpg
         
     | 
| 
      
 79 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image021.jpg
         
     | 
| 
      
 80 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/image022.png
         
     | 
| 
      
 81 
     | 
    
         
            +
            - docs/rubyrun-0.9.6_files/themedata.thmx
         
     | 
| 
       82 
82 
     | 
    
         
             
            - etc/rubyrun_opts.yml
         
     | 
| 
       83 
83 
     | 
    
         
             
            has_rdoc: true
         
     | 
| 
       84 
84 
     | 
    
         
             
            homepage: http://www.rubysophic.com
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |