request-log-analyzer 1.7.0 → 1.8.0

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.
@@ -34,6 +34,7 @@ begin
34
34
  command_line.option(:file, :alias => :e)
35
35
  command_line.option(:mail, :alias => :m)
36
36
  command_line.option(:mailhost, :default => 'localhost')
37
+ command_line.option(:mailsubject)
37
38
  command_line.option(:parse_strategy, :default => 'assume-correct')
38
39
  command_line.option(:yaml)
39
40
  command_line.option(:dump) # To be deprecated
@@ -85,6 +86,7 @@ rescue CommandLine::Error => e
85
86
  puts " --file <filename> Redirect output to file."
86
87
  puts " --mail <emailaddress> Send report to an email address."
87
88
  puts " --mailhost <server> Use the given server as the SMTP server for sending email."
89
+ puts " --mailsubject <text> Overwrite default mailsubject."
88
90
  puts " --no-progress Hide the progress bar."
89
91
  puts " --output <format> Output format. Supports 'html' and 'fixed_width'."
90
92
  puts " --report-width <amount> Width of ASCII report. Defaults to terminal width."
@@ -11,7 +11,7 @@ module RequestLogAnalyzer
11
11
 
12
12
  # The current version of request-log-analyzer.
13
13
  # Do not change the value by hand; it will be updated automatically by the gem release script.
14
- VERSION = "1.7.0"
14
+ VERSION = "1.8.0"
15
15
 
16
16
  # Loads constants in the RequestLogAnalyzer namespace using self.load_default_class_file(base, const)
17
17
  # <tt>const</tt>:: The constant that is not yet loaded in the RequestLogAnalyzer namespace. This should be passed as a string or symbol.
@@ -21,7 +21,7 @@ module RequestLogAnalyzer
21
21
  # <tt>arguments<tt> A CommandLine::Arguments hash containing parsed commandline parameters.
22
22
  def self.build_from_arguments(arguments)
23
23
 
24
- require 'lib/mixins/gets_memory_protection' if arguments[:gets_memory_protection]
24
+ require File.dirname(__FILE__) + '/../mixins/gets_memory_protection' if arguments[:gets_memory_protection]
25
25
 
26
26
  options = {}
27
27
 
@@ -45,6 +45,7 @@ module RequestLogAnalyzer
45
45
  options[:report_sort] = arguments[:report_sort]
46
46
  options[:report_amount] = arguments[:report_amount]
47
47
  options[:mailhost] = arguments[:mailhost]
48
+ options[:mailsubject] = arguments[:mailsubject]
48
49
  options[:silent] = arguments[:silent]
49
50
 
50
51
  # Apache format workaround
@@ -107,6 +108,7 @@ module RequestLogAnalyzer
107
108
  # * <tt>:format</tt> :rails, {:apache => 'FORMATSTRING'}, :merb, :amazon_s3, :mysql or RequestLogAnalyzer::FileFormat class. (Defaults to :rails).
108
109
  # * <tt>:mail</tt> Email the results to this email address.
109
110
  # * <tt>:mailhost</tt> Email the results to this mail server.
111
+ # * <tt>:mailsubject</tt> Email subject.
110
112
  # * <tt>:no_progress</tt> Do not display the progress bar (increases parsing speed).
111
113
  # * <tt>:output</tt> 'FixedWidth', 'HTML' or RequestLogAnalyzer::Output class. Defaults to 'FixedWidth'.
112
114
  # * <tt>:reject</tt> Reject specific {:field => :value} combination (expects a single hash).
@@ -163,7 +165,7 @@ module RequestLogAnalyzer
163
165
  output_object = %w[File StringIO].include?(options[:file].class.name) ? options[:file] : File.new(options[:file], "w+")
164
166
  output_args = {:width => 80, :color => false, :characters => :ascii, :sort => output_sort, :amount => output_amount }
165
167
  elsif options[:mail]
166
- output_object = RequestLogAnalyzer::Mailer.new(options[:mail], options[:mailhost])
168
+ output_object = RequestLogAnalyzer::Mailer.new(options[:mail], options[:mailhost], :subject => options[:mailsubject])
167
169
  output_args = {:width => 80, :color => false, :characters => :ascii, :sort => output_sort, :amount => output_amount }
168
170
  else
169
171
  output_object = STDOUT
@@ -20,9 +20,10 @@ module RequestLogAnalyzer::FileFormat
20
20
  # a usable class is provided. Use this format class.
21
21
  klass = file_format
22
22
 
23
- elsif file_format.kind_of?(String) && File.exist?(file_format)
23
+ elsif file_format.kind_of?(String) && File.exist?(file_format) && File.file?(file_format)
24
24
  # load a format from a ruby file
25
25
  require file_format
26
+
26
27
  const = RequestLogAnalyzer::to_camelcase(File.basename(file_format, '.rb'))
27
28
  if RequestLogAnalyzer::FileFormat.const_defined?(const)
28
29
  klass = RequestLogAnalyzer::FileFormat.const_get(const)
@@ -0,0 +1,38 @@
1
+ module RequestLogAnalyzer::FileFormat
2
+
3
+ # The DelayedJob2 file format parsed log files that are created by DelayedJob 2.0 or higher.
4
+ # By default, the log file can be found in RAILS_ROOT/log/delayed_job.log
5
+ class DelayedJob2 < Base
6
+
7
+ extend CommonRegularExpressions
8
+
9
+ line_definition :job_lock do |line|
10
+ line.header = true
11
+ line.regexp = /(#{timestamp('%Y-%m-%dT%H:%M:%S%z')}): \* \[Worker\(\w+ host:(\S+) pid:(\d+)\)\] acquired lock on (\S+)/
12
+
13
+ line.capture(:timestamp).as(:timestamp)
14
+ line.capture(:host)
15
+ line.capture(:pid).as(:integer)
16
+ line.capture(:job)
17
+ end
18
+
19
+ line_definition :job_completed do |line|
20
+ line.footer = true
21
+ line.regexp = /(#{timestamp('%Y-%m-%dT%H:%M:%S%z')}): \* \[JOB\] \w+ host:(\S+) pid:(\d+) completed after (\d+\.\d+)/
22
+ line.capture(:timestamp).as(:timestamp)
23
+ line.capture(:host)
24
+ line.capture(:pid).as(:integer)
25
+ line.capture(:duration).as(:duration, :unit => :sec)
26
+ end
27
+
28
+ report do |analyze|
29
+ analyze.timespan
30
+ analyze.hourly_spread
31
+
32
+ analyze.frequency :job, :line_type => :job_completed, :title => "Completed jobs"
33
+ #analyze.frequency :job, :if => lambda { |request| request[:attempts] == 1 }, :title => "Failed jobs"
34
+
35
+ analyze.duration :duration, :category => :job, :line_type => :job_completed, :title => "Job duration"
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,78 @@
1
+ class RequestLogAnalyzer::FileFormat::Oink < RequestLogAnalyzer::FileFormat::Rails
2
+ # capture the PID
3
+ HODEL3000_PROCESSING = /\[(\d+)\]: Processing ((?:\w+::)*\w+)#(\w+)(?: to (\w+))? \(for (#{ip_address}) at (#{timestamp('%Y-%m-%d %H:%M:%S')})\) \[([A-Z]+)\]/
4
+
5
+ LINE_DEFINITIONS[:processing] = RequestLogAnalyzer::LineDefinition.new(:processing, :header => true,
6
+ :teaser => /Processing /,
7
+ :regexp => Regexp.union(LINE_DEFINITIONS[:processing].regexp,HODEL3000_PROCESSING),
8
+ :captures => [{ :name => :controller, :type => :string }, # Default Rails Processing
9
+ { :name => :action, :type => :string },
10
+ { :name => :format, :type => :string, :default => 'html' },
11
+ { :name => :ip, :type => :string },
12
+ { :name => :timestamp, :type => :timestamp },
13
+ { :name => :method, :type => :string },
14
+ { :name => :pid, :type => :integer }, # Hodel 3000 Processing w/PID
15
+ { :name => :controller, :type => :string },
16
+ { :name => :action, :type => :string },
17
+ { :name => :format, :type => :string, :default => 'html' },
18
+ { :name => :ip, :type => :string },
19
+ { :name => :timestamp, :type => :timestamp },
20
+ { :name => :method, :type => :string }])
21
+
22
+ # capture the memory usage
23
+ LINE_DEFINITIONS[:memory_usage] = RequestLogAnalyzer::LineDefinition.new(:memory_usage,
24
+ :regexp => /\[(\d+)\]: Memory usage: (\d+) /,
25
+ :captures => [{ :name => :pid, :type => :integer },{ :name => :memory, :type => :traffic }])
26
+
27
+ # capture :memory usage in all line collections
28
+ LINE_COLLECTIONS.each { |k,v| LINE_COLLECTIONS[k] << :memory_usage }
29
+
30
+ report(:append) do |analyze|
31
+ analyze.traffic :memory_diff, :category => REQUEST_CATEGORIZER, :title => "Largest Memory Increases", :line_type => :memory_usage
32
+ end
33
+
34
+ # Keep a record of PIDs and their memory usage when validating requests.
35
+ def pids
36
+ @pids ||= {}
37
+ end
38
+
39
+ class Request
40
+ # Overrides the #validate method to handle PID updating.
41
+ def validate
42
+ update_pids
43
+ super
44
+ end
45
+
46
+ # Accessor for memory information associated with the specified request PID. If no memory exists
47
+ # for this request's :pid, the memory tracking is initialized.
48
+ def pid_memory
49
+ file_format.pids[self[:pid]] ||= { :last_memory_reading => -1, :current_memory_reading => -1 }
50
+ end
51
+
52
+ # Calculates :memory_diff for each request based on the last completed request that was not a failure.
53
+ def update_pids
54
+ # memory isn't recorded with exceptions. need to set #last_memory_reading+ to -1 as
55
+ # the memory used could have changed. for the next request the memory change will not be recorded.
56
+ #
57
+ # NOTE - the failure regex was not matching with a Rails Development log file.
58
+ if has_line_type?(:failure) and processing = has_line_type?(:processing)
59
+ pid_memory[:last_memory_reading] = -1
60
+ elsif mem_line = has_line_type?(:memory_usage)
61
+ memory_reading = mem_line[:memory]
62
+ pid_memory[:current_memory_reading] = memory_reading
63
+ # calcuate the change in memory
64
+ unless pid_memory[:current_memory_reading] == -1 || pid_memory[:last_memory_reading] == -1
65
+ # logged as kB, need to convert to bytes for the :traffic Tracker
66
+ memory_diff = (pid_memory[:current_memory_reading] - pid_memory[:last_memory_reading])*1024
67
+ if memory_diff > 0
68
+ self.attributes[:memory_diff] = memory_diff
69
+ end # if memory_diff > 0
70
+ end # unless
71
+
72
+ pid_memory[:last_memory_reading] = pid_memory[:current_memory_reading]
73
+ pid_memory[:current_memory_reading] = -1
74
+ end # if mem_line
75
+ return true
76
+ end # def update_pids
77
+ end # class Request
78
+ end
@@ -30,11 +30,18 @@ module RequestLogAnalyzer
30
30
 
31
31
  # Converts :eval field, which should evaluate to a hash.
32
32
  def convert_eval(value, capture_definition)
33
- eval(value).inject({}) { |h, (k, v)| h[k.to_sym] = v; h}
34
- rescue SyntaxError
33
+ eval(sanitize_parameters(value)).inject({}) { |h, (k, v)| h[k.to_sym] = v; h}
34
+ # Wide range of errors possible with wild eval. ATM we choose to crash on this.
35
+ rescue SyntaxError
35
36
  nil
36
37
  end
37
38
 
39
+ # Removes certain string sequences which would be problematic for eval.
40
+ # TODO remove all characters not valid in ruby symbols
41
+ def sanitize_parameters(parameter_string)
42
+ parameter_string.gsub(/#</, '"').gsub(/>,/, '", ').gsub(/\\0/, '')
43
+ end
44
+
38
45
  # Slow default method to parse timestamps.
39
46
  # Reimplement this function in a file format specific Request class
40
47
  # to improve the timestamp parsing speed.
@@ -177,4 +184,4 @@ module RequestLogAnalyzer
177
184
  @lines.map { |line| line[:lineno] }.reject { |v| v.nil? }.max
178
185
  end
179
186
  end
180
- end
187
+ end
@@ -2,8 +2,8 @@ Gem::Specification.new do |s|
2
2
  s.name = "request-log-analyzer"
3
3
 
4
4
  # Do not set the version and date field manually, this is done by the release script
5
- s.version = "1.7.0"
6
- s.date = "2010-04-28"
5
+ s.version = "1.8.0"
6
+ s.date = "2010-06-30"
7
7
 
8
8
  s.rubyforge_project = 'r-l-a'
9
9
 
@@ -36,6 +36,6 @@ Gem::Specification.new do |s|
36
36
 
37
37
  # The files and test_files directives are set automatically by the release script.
38
38
  # Do not change them by hand, but make sure to add the files to the git repository.
39
- s.files = %w(spec/unit/file_format/delayed_job_format_spec.rb spec/fixtures/rails_unordered.log spec/unit/filter/anonymize_filter_spec.rb lib/request_log_analyzer/output/fancy_html.rb README.rdoc lib/cli/progressbar.rb spec/fixtures/rails.db lib/request_log_analyzer/file_format/rails_development.rb spec/fixtures/rails_22.log spec/fixtures/test_order.log spec/fixtures/header_and_footer.log lib/mixins/gets_memory_protection.rb spec/fixtures/decompression.log spec/fixtures/rails_1x.log lib/request_log_analyzer/file_format/apache.rb lib/request_log_analyzer/output.rb lib/request_log_analyzer/tracker/numeric_value.rb spec/unit/file_format/line_definition_spec.rb spec/unit/request_spec.rb spec/unit/filter/filter_spec.rb spec/unit/aggregator/summarizer_spec.rb lib/request_log_analyzer/file_format/rails.rb spec/database.yml spec/unit/tracker/numeric_value_tracker_spec.rb spec/spec_helper.rb lib/request_log_analyzer/database/base.rb spec/unit/aggregator/database_inserter_spec.rb spec/fixtures/decompression.log.bz2 spec/unit/database/connection_spec.rb spec/fixtures/sinatra.log lib/request_log_analyzer/database/warning.rb spec/fixtures/merb_prefixed.log spec/unit/file_format/postgresql_format_spec.rb lib/request_log_analyzer/filter/timespan.rb spec/fixtures/rails_22_cached.log lib/request_log_analyzer/tracker/traffic.rb spec/unit/file_format/format_autodetection_spec.rb lib/request_log_analyzer/filter/field.rb lib/request_log_analyzer/file_format/delayed_job.rb lib/request_log_analyzer/file_format/merb.rb lib/request_log_analyzer/filter/anonymize.rb lib/request_log_analyzer/file_format/amazon_s3.rb LICENSE lib/request_log_analyzer/file_format.rb lib/cli/database_console.rb spec/integration/mailer_spec.rb spec/fixtures/merb.log lib/request_log_analyzer/line_definition.rb spec/unit/tracker/frequency_tracker_spec.rb spec/unit/mailer_spec.rb spec/fixtures/postgresql.log spec/lib/mocks.rb lib/request_log_analyzer/tracker/hourly_spread.rb spec/fixtures/syslog_1x.log spec/unit/file_format/rails3_format_spec.rb lib/request_log_analyzer/source.rb lib/request_log_analyzer/file_format/rails3.rb spec/unit/controller/log_processor_spec.rb spec/unit/tracker/hourly_spread_spec.rb spec/unit/filter/field_filter_spec.rb DESIGN.rdoc lib/request_log_analyzer/log_processor.rb spec/fixtures/multiple_files_1.log spec/unit/source/log_parser_spec.rb spec/fixtures/decompression.tar.gz spec/unit/database/base_class_spec.rb lib/request_log_analyzer/aggregator/database_inserter.rb lib/request_log_analyzer/database/connection.rb lib/request_log_analyzer/aggregator.rb lib/request_log_analyzer/database.rb spec/unit/file_format/rails_format_spec.rb lib/request_log_analyzer/source/database_loader.rb lib/request_log_analyzer/output/fixed_width.rb spec/integration/command_line_usage_spec.rb tasks/request_log_analyzer.rake lib/request_log_analyzer/tracker/duration.rb spec/fixtures/test_language_combined.log bin/request-log-analyzer lib/request_log_analyzer/tracker.rb tasks/github-gem.rake lib/cli/command_line_arguments.rb lib/request_log_analyzer.rb .gitignore lib/request_log_analyzer/output/html.rb lib/request_log_analyzer/database/request.rb lib/cli/database_console_init.rb lib/request_log_analyzer/database/source.rb spec/unit/file_format/amazon_s3_format_spec.rb lib/request_log_analyzer/filter.rb spec/fixtures/apache_combined.log spec/unit/tracker/duration_tracker_spec.rb spec/fixtures/test_file_format.log lib/request_log_analyzer/aggregator/summarizer.rb spec/unit/filter/timespan_filter_spec.rb spec/unit/file_format/common_regular_expressions_spec.rb spec/unit/file_format/merb_format_spec.rb spec/unit/file_format/file_format_api_spec.rb lib/request_log_analyzer/file_format/mysql.rb spec/unit/file_format/rack_format_spec.rb spec/unit/file_format/mysql_format_spec.rb spec/fixtures/decompression.log.gz lib/request_log_analyzer/tracker/frequency.rb request-log-analyzer.gemspec spec/fixtures/apache_common.log Rakefile spec/unit/tracker/traffic_tracker_spec.rb lib/request_log_analyzer/file_format/postgresql.rb lib/request_log_analyzer/tracker/timespan.rb spec/lib/macros.rb spec/integration/scout_spec.rb spec/unit/controller/controller_spec.rb lib/request_log_analyzer/mailer.rb lib/cli/tools.rb spec/unit/tracker/timespan_tracker_spec.rb spec/lib/testing_format.rb spec/lib/matchers.rb lib/request_log_analyzer/controller.rb spec/unit/tracker/tracker_api_spec.rb lib/request_log_analyzer/request.rb spec/fixtures/multiple_files_2.log spec/unit/database/database_spec.rb spec/fixtures/decompression.log.zip spec/fixtures/decompression.tgz lib/request_log_analyzer/file_format/rack.rb spec/integration/munin_plugins_rails_spec.rb spec/fixtures/mysql_slow_query.log spec/lib/helpers.rb lib/request_log_analyzer/source/log_parser.rb lib/request_log_analyzer/aggregator/echo.rb spec/unit/file_format/apache_format_spec.rb)
40
- s.test_files = %w(spec/unit/file_format/delayed_job_format_spec.rb spec/unit/filter/anonymize_filter_spec.rb spec/unit/file_format/line_definition_spec.rb spec/unit/request_spec.rb spec/unit/filter/filter_spec.rb spec/unit/aggregator/summarizer_spec.rb spec/unit/tracker/numeric_value_tracker_spec.rb spec/unit/aggregator/database_inserter_spec.rb spec/unit/database/connection_spec.rb spec/unit/file_format/postgresql_format_spec.rb spec/unit/file_format/format_autodetection_spec.rb spec/integration/mailer_spec.rb spec/unit/tracker/frequency_tracker_spec.rb spec/unit/mailer_spec.rb spec/unit/file_format/rails3_format_spec.rb spec/unit/controller/log_processor_spec.rb spec/unit/tracker/hourly_spread_spec.rb spec/unit/filter/field_filter_spec.rb spec/unit/source/log_parser_spec.rb spec/unit/database/base_class_spec.rb spec/unit/file_format/rails_format_spec.rb spec/integration/command_line_usage_spec.rb spec/unit/file_format/amazon_s3_format_spec.rb spec/unit/tracker/duration_tracker_spec.rb spec/unit/filter/timespan_filter_spec.rb spec/unit/file_format/common_regular_expressions_spec.rb spec/unit/file_format/merb_format_spec.rb spec/unit/file_format/file_format_api_spec.rb spec/unit/file_format/rack_format_spec.rb spec/unit/file_format/mysql_format_spec.rb spec/unit/tracker/traffic_tracker_spec.rb spec/integration/scout_spec.rb spec/unit/controller/controller_spec.rb spec/unit/tracker/timespan_tracker_spec.rb spec/unit/tracker/tracker_api_spec.rb spec/unit/database/database_spec.rb spec/integration/munin_plugins_rails_spec.rb spec/unit/file_format/apache_format_spec.rb)
39
+ s.files = %w(spec/unit/file_format/delayed_job_format_spec.rb spec/fixtures/rails_unordered.log spec/unit/filter/anonymize_filter_spec.rb lib/request_log_analyzer/output/fancy_html.rb README.rdoc lib/cli/progressbar.rb spec/fixtures/rails.db lib/request_log_analyzer/file_format/rails_development.rb spec/fixtures/rails_22.log spec/unit/file_format/delayed_job2_format_spec.rb spec/fixtures/test_order.log spec/fixtures/header_and_footer.log lib/mixins/gets_memory_protection.rb spec/fixtures/decompression.log spec/fixtures/rails_1x.log lib/request_log_analyzer/file_format/apache.rb lib/request_log_analyzer/output.rb lib/request_log_analyzer/tracker/numeric_value.rb spec/unit/file_format/line_definition_spec.rb spec/unit/request_spec.rb spec/unit/filter/filter_spec.rb spec/unit/aggregator/summarizer_spec.rb lib/request_log_analyzer/file_format/rails.rb spec/database.yml spec/unit/tracker/numeric_value_tracker_spec.rb spec/spec_helper.rb lib/request_log_analyzer/database/base.rb spec/unit/aggregator/database_inserter_spec.rb spec/fixtures/decompression.log.bz2 spec/unit/database/connection_spec.rb spec/fixtures/oink_22.log spec/fixtures/sinatra.log lib/request_log_analyzer/database/warning.rb spec/fixtures/merb_prefixed.log spec/unit/file_format/postgresql_format_spec.rb lib/request_log_analyzer/filter/timespan.rb spec/fixtures/rails_22_cached.log lib/request_log_analyzer/tracker/traffic.rb spec/unit/file_format/format_autodetection_spec.rb lib/request_log_analyzer/filter/field.rb lib/request_log_analyzer/file_format/delayed_job.rb lib/request_log_analyzer/file_format/merb.rb lib/request_log_analyzer/file_format/oink.rb lib/request_log_analyzer/filter/anonymize.rb lib/request_log_analyzer/file_format/amazon_s3.rb LICENSE lib/request_log_analyzer/file_format.rb lib/cli/database_console.rb spec/integration/mailer_spec.rb spec/fixtures/merb.log lib/request_log_analyzer/line_definition.rb spec/unit/tracker/frequency_tracker_spec.rb spec/unit/mailer_spec.rb spec/fixtures/postgresql.log spec/lib/mocks.rb lib/request_log_analyzer/tracker/hourly_spread.rb spec/unit/file_format/rails3_format_spec.rb spec/fixtures/syslog_1x.log lib/request_log_analyzer/source.rb lib/request_log_analyzer/file_format/rails3.rb spec/unit/controller/log_processor_spec.rb spec/unit/tracker/hourly_spread_spec.rb spec/unit/filter/field_filter_spec.rb DESIGN.rdoc lib/request_log_analyzer/log_processor.rb spec/fixtures/multiple_files_1.log spec/unit/source/log_parser_spec.rb spec/fixtures/decompression.tar.gz spec/unit/database/base_class_spec.rb lib/request_log_analyzer/aggregator/database_inserter.rb lib/request_log_analyzer/database/connection.rb lib/request_log_analyzer/aggregator.rb lib/request_log_analyzer/database.rb spec/unit/file_format/rails_format_spec.rb lib/request_log_analyzer/source/database_loader.rb lib/request_log_analyzer/output/fixed_width.rb spec/integration/command_line_usage_spec.rb tasks/request_log_analyzer.rake lib/request_log_analyzer/tracker/duration.rb spec/fixtures/test_language_combined.log bin/request-log-analyzer lib/request_log_analyzer/tracker.rb tasks/github-gem.rake lib/cli/command_line_arguments.rb lib/request_log_analyzer.rb .gitignore lib/request_log_analyzer/output/html.rb lib/request_log_analyzer/database/request.rb lib/cli/database_console_init.rb lib/request_log_analyzer/database/source.rb spec/unit/file_format/amazon_s3_format_spec.rb lib/request_log_analyzer/filter.rb spec/fixtures/apache_combined.log spec/unit/tracker/duration_tracker_spec.rb spec/fixtures/test_file_format.log lib/request_log_analyzer/aggregator/summarizer.rb spec/fixtures/oink_22_failure.log spec/unit/filter/timespan_filter_spec.rb spec/unit/file_format/common_regular_expressions_spec.rb spec/unit/file_format/merb_format_spec.rb spec/unit/file_format/file_format_api_spec.rb lib/request_log_analyzer/file_format/delayed_job2.rb spec/unit/file_format/rack_format_spec.rb spec/unit/file_format/mysql_format_spec.rb lib/request_log_analyzer/file_format/mysql.rb spec/fixtures/decompression.log.gz lib/request_log_analyzer/tracker/frequency.rb request-log-analyzer.gemspec spec/fixtures/apache_common.log Rakefile spec/unit/tracker/traffic_tracker_spec.rb lib/request_log_analyzer/file_format/postgresql.rb lib/request_log_analyzer/tracker/timespan.rb spec/lib/macros.rb spec/integration/scout_spec.rb spec/unit/controller/controller_spec.rb lib/request_log_analyzer/mailer.rb lib/cli/tools.rb spec/unit/tracker/timespan_tracker_spec.rb spec/lib/testing_format.rb spec/lib/matchers.rb lib/request_log_analyzer/controller.rb spec/unit/tracker/tracker_api_spec.rb lib/request_log_analyzer/request.rb spec/unit/file_format/oink_format_spec.rb spec/fixtures/multiple_files_2.log spec/unit/database/database_spec.rb spec/fixtures/decompression.log.zip spec/fixtures/decompression.tgz lib/request_log_analyzer/file_format/rack.rb spec/integration/munin_plugins_rails_spec.rb spec/fixtures/mysql_slow_query.log spec/lib/helpers.rb lib/request_log_analyzer/source/log_parser.rb lib/request_log_analyzer/aggregator/echo.rb spec/unit/file_format/apache_format_spec.rb)
40
+ s.test_files = %w(spec/unit/file_format/delayed_job_format_spec.rb spec/unit/filter/anonymize_filter_spec.rb spec/unit/file_format/delayed_job2_format_spec.rb spec/unit/file_format/line_definition_spec.rb spec/unit/request_spec.rb spec/unit/filter/filter_spec.rb spec/unit/aggregator/summarizer_spec.rb spec/unit/tracker/numeric_value_tracker_spec.rb spec/unit/aggregator/database_inserter_spec.rb spec/unit/database/connection_spec.rb spec/unit/file_format/postgresql_format_spec.rb spec/unit/file_format/format_autodetection_spec.rb spec/integration/mailer_spec.rb spec/unit/tracker/frequency_tracker_spec.rb spec/unit/mailer_spec.rb spec/unit/file_format/rails3_format_spec.rb spec/unit/controller/log_processor_spec.rb spec/unit/tracker/hourly_spread_spec.rb spec/unit/filter/field_filter_spec.rb spec/unit/source/log_parser_spec.rb spec/unit/database/base_class_spec.rb spec/unit/file_format/rails_format_spec.rb spec/integration/command_line_usage_spec.rb spec/unit/file_format/amazon_s3_format_spec.rb spec/unit/tracker/duration_tracker_spec.rb spec/unit/filter/timespan_filter_spec.rb spec/unit/file_format/common_regular_expressions_spec.rb spec/unit/file_format/merb_format_spec.rb spec/unit/file_format/file_format_api_spec.rb spec/unit/file_format/rack_format_spec.rb spec/unit/file_format/mysql_format_spec.rb spec/unit/tracker/traffic_tracker_spec.rb spec/integration/scout_spec.rb spec/unit/controller/controller_spec.rb spec/unit/tracker/timespan_tracker_spec.rb spec/unit/tracker/tracker_api_spec.rb spec/unit/file_format/oink_format_spec.rb spec/unit/database/database_spec.rb spec/integration/munin_plugins_rails_spec.rb spec/unit/file_format/apache_format_spec.rb)
41
41
  end
@@ -0,0 +1,19 @@
1
+ Jun 18 11:27:37 derek rails[67783]: Processing FileRecordsController#inline (for 127.0.0.1 at 2010-06-18 11:27:37) [GET]
2
+ Jun 18 11:27:37 derek rails[67783]: Session ID: 8abbd5bce47cfc8bd438c647f5a9e016
3
+ Jun 18 11:27:37 derek rails[67783]: Parameters: {"id"=>"5171"}
4
+ Jun 18 11:27:37 derek rails[67783]: Memory usage: 400000 | PID: 67783
5
+ Jun 18 11:27:37 derek rails[67783]: Completed in 207ms (View: 0, DB: 258) | 200 OK [http://localhost/file_records/inline/5171]
6
+
7
+ Jun 18 11:28:11 derek rails[700]: Processing InfoController#about (for 127.0.0.1 at 2010-06-18 11:28:11) [GET]
8
+ Jun 18 11:28:12 derek rails[700]: Memory usage: 700000 | PID: 67783
9
+ Jun 18 11:28:12 derek rails[700]: Completed in 379ms (View: 89, DB: 258) | 200 OK [http://localhost/info/about]
10
+
11
+ Jun 18 11:28:11 derek rails[700]: Processing InfoController#board (for 127.0.0.1 at 2010-06-18 11:28:11) [GET]
12
+ Jun 18 11:28:12 derek rails[700]: Memory usage: 750000 | PID: 67783
13
+ Jun 18 11:28:12 derek rails[700]: Completed in 379ms (View: 89, DB: 258) | 200 OK [http://localhost/info/board]
14
+
15
+ Jun 18 11:31:19 derek rails[67783]: Processing InnovationsController#innovation_param (for 127.0.0.1 at 2010-06-18 11:31:19) [GET]
16
+ Jun 18 11:31:19 derek rails[67783]: Session ID: 8abbd5bce47cfc8bd438c647f5a9e016
17
+ Jun 18 11:31:19 derek rails[67783]: Parameters: {"organization_param"=>"harvard", "innovation_param"=>"potent-ogt-inhibitors-for-the-treatment-of-cancer-and-diabeti"}
18
+ Jun 18 11:31:31 derek rails[67783]: Memory usage: 430000 | PID: 67783
19
+ Jun 18 11:31:31 derek rails[67783]: Completed in 11922ms (View: 200, DB: 11673) | 200 OK [http://localhost/harvard/potent-ogt-inhibitors-for-the-treatment-of-cancer-and-diabeti]
@@ -0,0 +1,17 @@
1
+ Jun 18 11:25:37 derek rails[67783]: Processing FileRecordsController#inline (for 127.0.0.1 at 2010-06-18 11:25:37) [GET]
2
+ Jun 18 11:25:40 derek rails[67783]: NoMethodError (undefined method `update_domain_account' for nil:NilClass):
3
+
4
+ Jun 18 11:27:37 derek rails[67783]: Processing FileRecordsController#inline (for 127.0.0.1 at 2010-06-18 11:27:37) [GET]
5
+ Jun 18 11:27:37 derek rails[67783]: Session ID: 8abbd5bce47cfc8bd438c647f5a9e016
6
+ Jun 18 11:27:37 derek rails[67783]: Parameters: {"id"=>"5171"}
7
+ Jun 18 11:27:37 derek rails[67783]: Memory usage: 400000 | PID: 67783
8
+ Jun 18 11:27:37 derek rails[67783]: Completed in 207ms (View: 0, DB: 258) | 200 OK [http://localhost/file_records/inline/5171]
9
+
10
+ Jun 18 11:30:37 derek rails[67783]: Processing FileRecordsController#inline (for 127.0.0.1 at 2010-06-18 11:27:37) [GET]
11
+ Jun 18 11:30:40 derek rails[67783]: NoMethodError (undefined method `update_domain_account' for nil:NilClass):
12
+
13
+ Jun 18 11:31:19 derek rails[67783]: Processing InnovationsController#innovation_param (for 127.0.0.1 at 2010-06-18 11:31:19) [GET]
14
+ Jun 18 11:31:19 derek rails[67783]: Session ID: 8abbd5bce47cfc8bd438c647f5a9e016
15
+ Jun 18 11:31:19 derek rails[67783]: Parameters: {"organization_param"=>"harvard", "innovation_param"=>"potent-ogt-inhibitors-for-the-treatment-of-cancer-and-diabeti"}
16
+ Jun 18 11:31:31 derek rails[67783]: Memory usage: 430000 | PID: 67783
17
+ Jun 18 11:31:31 derek rails[67783]: Completed in 11922ms (View: 200, DB: 11673) | 200 OK [http://localhost/harvard/potent-ogt-inhibitors-for-the-treatment-of-cancer-and-diabeti]
@@ -83,7 +83,7 @@ describe RequestLogAnalyzer, 'running from command line' do
83
83
  end
84
84
 
85
85
  it "should dump the results to a YAML file" do
86
- run("#{log_fixture(:rails_1x)} --dump #{temp_output_file(:yaml)}")
86
+ run("#{log_fixture(:rails_1x)} --yaml #{temp_output_file(:yaml)}")
87
87
  File.exist?(temp_output_file(:yaml)).should be_true
88
88
  YAML::load(File.read(temp_output_file(:yaml))).should have_at_least(1).item
89
89
  end
@@ -30,9 +30,25 @@ describe RequestLogAnalyzer, 'running mailer integration' do
30
30
  find_string_in_file("From: <contact@railsdoctors.com>", @log_file).should_not be_nil
31
31
  find_string_in_file("To: <root@localhost>", @log_file).should_not be_nil
32
32
  find_string_in_file("From: Request-log-analyzer reporter <contact@railsdoctors.com>", @log_file).should_not be_nil
33
+ find_string_in_file("Subject: Request log analyzer report - generated on", @log_file).should_not be_nil
33
34
  find_string_in_file("Request summary", @log_file).should_not be_nil
34
35
  find_string_in_file("PeopleController#show.html [ | 1 | 0.29s | 0.29s | 0.00s | 0.29s | 0.29s", @log_file).should_not be_nil
35
36
  end
37
+
38
+ it "should allow a custom mail subject" do
39
+ RequestLogAnalyzer::Controller.build(
40
+ :mail => 'root@localhost',
41
+ :mailhost => 'localhost:2525',
42
+ :mailsubject => 'TESTSUBJECT',
43
+ :source_files => log_fixture(:rails_1x),
44
+ :format => RequestLogAnalyzer::FileFormat::Rails,
45
+ :no_progress => true
46
+ ).run!
47
+
48
+ Process.wait # Wait for mailer to complete
49
+
50
+ find_string_in_file("Subject: TESTSUBJECT", @log_file).should_not be_nil
51
+ end
36
52
 
37
53
  it "should send html mail" do
38
54
  RequestLogAnalyzer::Controller.build(
@@ -0,0 +1,54 @@
1
+ require 'spec_helper'
2
+
3
+ describe RequestLogAnalyzer::FileFormat::DelayedJob do
4
+
5
+ it "should be a valid file format" do
6
+ RequestLogAnalyzer::FileFormat.load(:delayed_job).should be_valid
7
+ end
8
+
9
+ describe '#parse_line' do
10
+
11
+ before(:each) do
12
+ @file_format = RequestLogAnalyzer::FileFormat.load(:delayed_job2)
13
+ end
14
+
15
+ it "should parse a :job_lock line correctly" do
16
+ line = "2010-05-17T17:37:34+0000: * [Worker(delayed_job host:hostname.co.uk pid:11888)] acquired lock on S3FileJob"
17
+ @file_format.should parse_line(line).as(:job_lock).and_capture(:timestamp => 20100517173734,
18
+ :job => 'S3FileJob', :host => 'hostname.co.uk', :pid => 11888)
19
+ end
20
+
21
+ it "should parse a :job_completed line correctly" do
22
+ line = '2010-05-17T17:37:35+0000: * [JOB] delayed_job host:hostname.co.uk pid:11888 completed after 1.0676'
23
+ @file_format.should parse_line(line).as(:job_completed).and_capture(:timestamp => 20100517173735,
24
+ :duration => 1.0676, :host => 'hostname.co.uk', :pid => 11888)
25
+ end
26
+ end
27
+
28
+ describe '#parse_io' do
29
+ before(:each) do
30
+ @log_parser = RequestLogAnalyzer::Source::LogParser.new(RequestLogAnalyzer::FileFormat.load(:delayed_job2))
31
+ end
32
+
33
+ it "should parse a batch of completed jobs without warnings" do
34
+ fragment = <<-EOLOG
35
+ 2010-05-17T17:36:44+0000: *** Starting job worker delayed_job host:hostname.co.uk pid:11888
36
+ 2010-05-17T17:37:34+0000: * [Worker(delayed_job host:hostname.co.uk pid:11888)] acquired lock on S3FileJob
37
+ 2010-05-17T17:37:35+0000: * [JOB] delayed_job host:hostname.co.uk pid:11888 completed after 1.0676
38
+ 2010-05-17T17:37:35+0000: * [Worker(delayed_job host:hostname.co.uk pid:11888)] acquired lock on S3FileJob
39
+ 2010-05-17T17:37:37+0000: * [JOB] delayed_job host:hostname.co.uk pid:11888 completed after 1.4407
40
+ 2010-05-17T17:37:37+0000: * [Worker(delayed_job host:hostname.co.uk pid:11888)] acquired lock on S3FileJob
41
+ 2010-05-17T17:37:44+0000: * [JOB] delayed_job host:hostname.co.uk pid:11888 completed after 6.9374
42
+ 2010-05-17T17:37:44+0000: 3 jobs processed at 0.3163 j/s, 0 failed ...
43
+ 2010-05-19T11:47:26+0000: Exiting...
44
+ EOLOG
45
+
46
+ request_counter.should_receive(:hit!).exactly(3).times
47
+ @log_parser.should_not_receive(:warn)
48
+
49
+ @log_parser.parse_io(StringIO.new(fragment)) do |request|
50
+ request_counter.hit! if request.kind_of?(RequestLogAnalyzer::FileFormat::DelayedJob2::Request)
51
+ end
52
+ end
53
+ end
54
+ end
@@ -28,7 +28,7 @@ describe RequestLogAnalyzer::FileFormat::DelayedJob do
28
28
  :failed_job => 'BackgroundJob::ThumbnailSaver', :exception => 'ActiveRecord::RecordNotFound')
29
29
  end
30
30
 
31
- it "" do
31
+ it "should parse a failed job lock line correctly" do
32
32
  line = "* [JOB] failed to acquire exclusive lock for BackgroundJob::ThumbnailSaver"
33
33
  @file_format.should parse_line(line).as(:job_lock_failed).and_capture(:locked_job => 'BackgroundJob::ThumbnailSaver')
34
34
  end
@@ -0,0 +1,98 @@
1
+ require File.dirname(__FILE__) + '/../../spec_helper'
2
+
3
+ describe RequestLogAnalyzer::FileFormat::Oink do
4
+ describe '.create' do
5
+
6
+ context 'without providing a lines argument' do
7
+ before(:each) { @oink = RequestLogAnalyzer::FileFormat.load(:oink) }
8
+
9
+ it "should create a valid file format" do
10
+ @oink.should be_valid
11
+ end
12
+
13
+ it "should parse :memory_usage line" do
14
+ @oink.line_definitions.should include(:memory_usage)
15
+ end
16
+
17
+ end
18
+
19
+ end
20
+
21
+ describe '#parse_line' do
22
+ before(:each) { @oink = RequestLogAnalyzer::FileFormat.load(:oink, :all) }
23
+
24
+ it "should parse a :memory_usage line correctly" do
25
+ line = 'Jun 18 11:27:36 derek rails[67783]: Memory usage: 714052 | PID: 67783'
26
+ @oink.should parse_line(line).as(:memory_usage).and_capture(:pid => 67783, :memory => 714052)
27
+ end
28
+
29
+ it "should parse the PID from a :processing line correctly" do
30
+ line = 'Aug 14 21:16:30 derek rails[67783]: Processing PeopleController#index (for 1.1.1.1 at 2008-08-14 21:16:30) [GET]'
31
+ @oink.should parse_line(line).as(:processing).and_capture(:pid => 67783, :controller => 'PeopleController', :action => 'index', :timestamp => 20080814211630, :method => 'GET', :ip => '1.1.1.1')
32
+ end
33
+ end
34
+
35
+ describe '#parse_io' do
36
+ context "Rails 2.2 style log" do
37
+ before(:each) do
38
+ @log_parser = RequestLogAnalyzer::Source::LogParser.new(
39
+ RequestLogAnalyzer::FileFormat.load(:oink), :parse_strategy => 'cautious')
40
+ end
41
+
42
+ it "should parse requests" do
43
+ request_counter.should_receive(:hit!).exactly(4).times
44
+
45
+ @log_parser.parse_file(log_fixture(:oink_22)) do |request|
46
+ request_counter.hit! if request.kind_of?(RequestLogAnalyzer::FileFormat::Rails::Request) && request.completed?
47
+ end
48
+ end
49
+
50
+ it "should not record :memory_diff on first request" do
51
+ @log_parser.parse_file(log_fixture(:oink_22)) do |request|
52
+ if @log_parser.parsed_requests == 1
53
+ request[:memory_diff].should == nil
54
+ end
55
+ end
56
+ end
57
+
58
+ it "should record :memory_diff of 2nd tracked PID" do
59
+ @log_parser.parse_file(log_fixture(:oink_22)) do |request|
60
+ if @log_parser.parsed_requests == 3
61
+ request[:memory_diff].should == 50000*1024
62
+ end
63
+ end
64
+ end
65
+
66
+ it "should record :memory_diff of 1st tracked PID" do
67
+ @log_parser.parse_file(log_fixture(:oink_22)) do |request|
68
+ if @log_parser.parsed_requests == 4
69
+ request[:memory_diff].should == 30000*1024
70
+ end
71
+ end
72
+ end
73
+ end
74
+
75
+ context 'Rails 2.2 style log w/failure' do
76
+ before(:each) do
77
+ @log_parser = RequestLogAnalyzer::Source::LogParser.new(
78
+ RequestLogAnalyzer::FileFormat.load(:oink), :parse_strategy => 'cautious')
79
+ end
80
+
81
+ it "should parse requests" do
82
+ request_counter.should_receive(:hit!).exactly(4).times
83
+
84
+ @log_parser.parse_file(log_fixture(:oink_22_failure)) do |request|
85
+ request_counter.hit! if request.kind_of?(RequestLogAnalyzer::FileFormat::Rails::Request) && request.completed?
86
+ end
87
+ end
88
+
89
+ it "should ignore memory changes when a failure occurs" do
90
+ @log_parser.parse_file(log_fixture(:oink_22_failure)) do |request|
91
+ if @log_parser.parsed_requests == 4
92
+ request[:memory_diff].should == nil
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -127,8 +127,22 @@ module GithubGem
127
127
  release_tasks = [:release_checks, :set_version, :build, :github_release, :gemcutter_release]
128
128
  # release_tasks << [:rubyforge_release] if gemspec.rubyforge_project
129
129
 
130
- desc "Release a new verison of the gem"
130
+ desc "Release a new version of the gem using the VERSION environment variable"
131
131
  task(:release => release_tasks) { release_task }
132
+
133
+ namespace(:release) do
134
+ desc "Release the next version of the gem, by incrementing the last version segment by 1"
135
+ task(:next => [:next_version] + release_tasks) { release_task }
136
+
137
+ desc "Release the next version of the gem, using a bump increment (0.0.1)"
138
+ task(:bump => [:next_bump_version] + release_tasks) { release_task }
139
+
140
+ desc "Release the next version of the gem, using a minor increment (0.1.0)"
141
+ task(:minor => [:next_minor_version] + release_tasks) { release_task }
142
+
143
+ desc "Release the next version of the gem, using a major increment (1.0.0)"
144
+ task(:major => [:next_major_version] + release_tasks) { release_task }
145
+ end
132
146
 
133
147
  # task(:check_rubyforge) { check_rubyforge_task }
134
148
  # task(:rubyforge_release) { rubyforge_release_task }
@@ -137,6 +151,11 @@ module GithubGem
137
151
  task(:tag_version) { tag_version_task }
138
152
  task(:commit_modified_files) { commit_modified_files_task }
139
153
 
154
+ task(:next_version) { next_version_task }
155
+ task(:next_bump_version) { next_version_task(:bump) }
156
+ task(:next_minor_version) { next_version_task(:minor) }
157
+ task(:next_major_version) { next_version_task(:major) }
158
+
140
159
  desc "Updates the gem release tasks with the latest version on Github"
141
160
  task(:update_tasks) { update_tasks_task }
142
161
  end
@@ -160,6 +179,32 @@ module GithubGem
160
179
  sh "mv #{gemspec.name}-#{gemspec.version}.gem pkg/#{gemspec.name}-#{gemspec.version}.gem"
161
180
  end
162
181
 
182
+ def newest_version
183
+ git.tags.map { |tag| tag.name.split('-').last }.compact.map { |v| Gem::Version.new(v) }.max || Gem::Version.new('0.0.0')
184
+ end
185
+
186
+ def next_version(increment = nil)
187
+ next_version = newest_version.segments
188
+ increment_index = case increment
189
+ when :micro then 3
190
+ when :bump then 2
191
+ when :minor then 1
192
+ when :major then 0
193
+ else next_version.length - 1
194
+ end
195
+
196
+ next_version[increment_index] ||= 0
197
+ next_version[increment_index] = next_version[increment_index].succ
198
+ ((increment_index + 1)...next_version.length).each { |i| next_version[i] = 0 }
199
+
200
+ Gem::Version.new(next_version.join('.'))
201
+ end
202
+
203
+ def next_version_task(increment = nil)
204
+ ENV['VERSION'] = next_version(increment).version
205
+ puts "Releasing version #{ENV['VERSION']}..."
206
+ end
207
+
163
208
  # Updates the version number in the gemspec file, the VERSION constant in the main
164
209
  # include file and the contents of the VERSION file.
165
210
  def version_task
@@ -173,9 +218,7 @@ module GithubGem
173
218
  def check_version_task
174
219
  raise "#{ENV['VERSION']} is not a valid version number!" if ENV['VERSION'] && !Gem::Version.correct?(ENV['VERSION'])
175
220
  proposed_version = Gem::Version.new(ENV['VERSION'] || gemspec.version)
176
- # Loads the latest version number using the created tags
177
- newest_version = git.tags.map { |tag| tag.name.split('-').last }.compact.map { |v| Gem::Version.new(v) }.max
178
- raise "This version (#{proposed_version}) is not higher than the highest tagged version (#{newest_version})" if newest_version && newest_version >= proposed_version
221
+ raise "This version (#{proposed_version}) is not higher than the highest tagged version (#{newest_version})" if newest_version >= proposed_version
179
222
  end
180
223
 
181
224
  # Checks whether the current branch is not diverged from the remote branch
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 7
7
+ - 8
8
8
  - 0
9
- version: 1.7.0
9
+ version: 1.8.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Willem van Bergen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-04-28 00:00:00 +02:00
18
+ date: 2010-06-30 00:00:00 +02:00
19
19
  default_executable: request-log-analyzer
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -66,6 +66,7 @@ files:
66
66
  - spec/fixtures/rails.db
67
67
  - lib/request_log_analyzer/file_format/rails_development.rb
68
68
  - spec/fixtures/rails_22.log
69
+ - spec/unit/file_format/delayed_job2_format_spec.rb
69
70
  - spec/fixtures/test_order.log
70
71
  - spec/fixtures/header_and_footer.log
71
72
  - lib/mixins/gets_memory_protection.rb
@@ -86,6 +87,7 @@ files:
86
87
  - spec/unit/aggregator/database_inserter_spec.rb
87
88
  - spec/fixtures/decompression.log.bz2
88
89
  - spec/unit/database/connection_spec.rb
90
+ - spec/fixtures/oink_22.log
89
91
  - spec/fixtures/sinatra.log
90
92
  - lib/request_log_analyzer/database/warning.rb
91
93
  - spec/fixtures/merb_prefixed.log
@@ -97,6 +99,7 @@ files:
97
99
  - lib/request_log_analyzer/filter/field.rb
98
100
  - lib/request_log_analyzer/file_format/delayed_job.rb
99
101
  - lib/request_log_analyzer/file_format/merb.rb
102
+ - lib/request_log_analyzer/file_format/oink.rb
100
103
  - lib/request_log_analyzer/filter/anonymize.rb
101
104
  - lib/request_log_analyzer/file_format/amazon_s3.rb
102
105
  - LICENSE
@@ -110,8 +113,8 @@ files:
110
113
  - spec/fixtures/postgresql.log
111
114
  - spec/lib/mocks.rb
112
115
  - lib/request_log_analyzer/tracker/hourly_spread.rb
113
- - spec/fixtures/syslog_1x.log
114
116
  - spec/unit/file_format/rails3_format_spec.rb
117
+ - spec/fixtures/syslog_1x.log
115
118
  - lib/request_log_analyzer/source.rb
116
119
  - lib/request_log_analyzer/file_format/rails3.rb
117
120
  - spec/unit/controller/log_processor_spec.rb
@@ -150,13 +153,15 @@ files:
150
153
  - spec/unit/tracker/duration_tracker_spec.rb
151
154
  - spec/fixtures/test_file_format.log
152
155
  - lib/request_log_analyzer/aggregator/summarizer.rb
156
+ - spec/fixtures/oink_22_failure.log
153
157
  - spec/unit/filter/timespan_filter_spec.rb
154
158
  - spec/unit/file_format/common_regular_expressions_spec.rb
155
159
  - spec/unit/file_format/merb_format_spec.rb
156
160
  - spec/unit/file_format/file_format_api_spec.rb
157
- - lib/request_log_analyzer/file_format/mysql.rb
161
+ - lib/request_log_analyzer/file_format/delayed_job2.rb
158
162
  - spec/unit/file_format/rack_format_spec.rb
159
163
  - spec/unit/file_format/mysql_format_spec.rb
164
+ - lib/request_log_analyzer/file_format/mysql.rb
160
165
  - spec/fixtures/decompression.log.gz
161
166
  - lib/request_log_analyzer/tracker/frequency.rb
162
167
  - request-log-analyzer.gemspec
@@ -176,6 +181,7 @@ files:
176
181
  - lib/request_log_analyzer/controller.rb
177
182
  - spec/unit/tracker/tracker_api_spec.rb
178
183
  - lib/request_log_analyzer/request.rb
184
+ - spec/unit/file_format/oink_format_spec.rb
179
185
  - spec/fixtures/multiple_files_2.log
180
186
  - spec/unit/database/database_spec.rb
181
187
  - spec/fixtures/decompression.log.zip
@@ -225,6 +231,7 @@ summary: A command line tool to analyze request logs for Apache, Rails, Merb, My
225
231
  test_files:
226
232
  - spec/unit/file_format/delayed_job_format_spec.rb
227
233
  - spec/unit/filter/anonymize_filter_spec.rb
234
+ - spec/unit/file_format/delayed_job2_format_spec.rb
228
235
  - spec/unit/file_format/line_definition_spec.rb
229
236
  - spec/unit/request_spec.rb
230
237
  - spec/unit/filter/filter_spec.rb
@@ -258,6 +265,7 @@ test_files:
258
265
  - spec/unit/controller/controller_spec.rb
259
266
  - spec/unit/tracker/timespan_tracker_spec.rb
260
267
  - spec/unit/tracker/tracker_api_spec.rb
268
+ - spec/unit/file_format/oink_format_spec.rb
261
269
  - spec/unit/database/database_spec.rb
262
270
  - spec/integration/munin_plugins_rails_spec.rb
263
271
  - spec/unit/file_format/apache_format_spec.rb