ngmoco-request-log-analyzer 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +10 -0
- data/DESIGN.rdoc +41 -0
- data/LICENSE +20 -0
- data/README.rdoc +39 -0
- data/Rakefile +8 -0
- data/bin/request-log-analyzer +114 -0
- data/lib/cli/command_line_arguments.rb +301 -0
- data/lib/cli/database_console.rb +26 -0
- data/lib/cli/database_console_init.rb +43 -0
- data/lib/cli/progressbar.rb +213 -0
- data/lib/cli/tools.rb +46 -0
- data/lib/request_log_analyzer.rb +44 -0
- data/lib/request_log_analyzer/aggregator.rb +49 -0
- data/lib/request_log_analyzer/aggregator/database_inserter.rb +83 -0
- data/lib/request_log_analyzer/aggregator/echo.rb +29 -0
- data/lib/request_log_analyzer/aggregator/summarizer.rb +175 -0
- data/lib/request_log_analyzer/controller.rb +332 -0
- data/lib/request_log_analyzer/database.rb +102 -0
- data/lib/request_log_analyzer/database/base.rb +115 -0
- data/lib/request_log_analyzer/database/connection.rb +38 -0
- data/lib/request_log_analyzer/database/request.rb +22 -0
- data/lib/request_log_analyzer/database/source.rb +13 -0
- data/lib/request_log_analyzer/database/warning.rb +14 -0
- data/lib/request_log_analyzer/file_format.rb +160 -0
- data/lib/request_log_analyzer/file_format/amazon_s3.rb +71 -0
- data/lib/request_log_analyzer/file_format/apache.rb +141 -0
- data/lib/request_log_analyzer/file_format/merb.rb +67 -0
- data/lib/request_log_analyzer/file_format/rack.rb +11 -0
- data/lib/request_log_analyzer/file_format/rails.rb +176 -0
- data/lib/request_log_analyzer/file_format/rails_development.rb +12 -0
- data/lib/request_log_analyzer/filter.rb +30 -0
- data/lib/request_log_analyzer/filter/anonymize.rb +39 -0
- data/lib/request_log_analyzer/filter/field.rb +42 -0
- data/lib/request_log_analyzer/filter/timespan.rb +45 -0
- data/lib/request_log_analyzer/line_definition.rb +111 -0
- data/lib/request_log_analyzer/log_processor.rb +99 -0
- data/lib/request_log_analyzer/mailer.rb +62 -0
- data/lib/request_log_analyzer/output.rb +113 -0
- data/lib/request_log_analyzer/output/fixed_width.rb +220 -0
- data/lib/request_log_analyzer/output/html.rb +184 -0
- data/lib/request_log_analyzer/request.rb +175 -0
- data/lib/request_log_analyzer/source.rb +72 -0
- data/lib/request_log_analyzer/source/database_loader.rb +87 -0
- data/lib/request_log_analyzer/source/log_parser.rb +274 -0
- data/lib/request_log_analyzer/tracker.rb +206 -0
- data/lib/request_log_analyzer/tracker/duration.rb +104 -0
- data/lib/request_log_analyzer/tracker/frequency.rb +95 -0
- data/lib/request_log_analyzer/tracker/hourly_spread.rb +107 -0
- data/lib/request_log_analyzer/tracker/timespan.rb +81 -0
- data/lib/request_log_analyzer/tracker/traffic.rb +106 -0
- data/request-log-analyzer.gemspec +40 -0
- data/spec/database.yml +23 -0
- data/spec/fixtures/apache_combined.log +5 -0
- data/spec/fixtures/apache_common.log +10 -0
- data/spec/fixtures/decompression.log +12 -0
- data/spec/fixtures/decompression.log.bz2 +0 -0
- data/spec/fixtures/decompression.log.gz +0 -0
- data/spec/fixtures/decompression.log.zip +0 -0
- data/spec/fixtures/decompression.tar.gz +0 -0
- data/spec/fixtures/decompression.tgz +0 -0
- data/spec/fixtures/header_and_footer.log +6 -0
- data/spec/fixtures/merb.log +84 -0
- data/spec/fixtures/merb_prefixed.log +9 -0
- data/spec/fixtures/multiple_files_1.log +5 -0
- data/spec/fixtures/multiple_files_2.log +2 -0
- data/spec/fixtures/rails.db +0 -0
- data/spec/fixtures/rails_1x.log +59 -0
- data/spec/fixtures/rails_22.log +12 -0
- data/spec/fixtures/rails_22_cached.log +10 -0
- data/spec/fixtures/rails_unordered.log +24 -0
- data/spec/fixtures/syslog_1x.log +5 -0
- data/spec/fixtures/test_file_format.log +13 -0
- data/spec/fixtures/test_language_combined.log +14 -0
- data/spec/fixtures/test_order.log +16 -0
- data/spec/integration/command_line_usage_spec.rb +84 -0
- data/spec/integration/munin_plugins_rails_spec.rb +58 -0
- data/spec/integration/scout_spec.rb +151 -0
- data/spec/lib/helpers.rb +52 -0
- data/spec/lib/macros.rb +18 -0
- data/spec/lib/matchers.rb +77 -0
- data/spec/lib/mocks.rb +76 -0
- data/spec/lib/testing_format.rb +46 -0
- data/spec/spec_helper.rb +24 -0
- data/spec/unit/aggregator/database_inserter_spec.rb +93 -0
- data/spec/unit/aggregator/summarizer_spec.rb +26 -0
- data/spec/unit/controller/controller_spec.rb +41 -0
- data/spec/unit/controller/log_processor_spec.rb +18 -0
- data/spec/unit/database/base_class_spec.rb +183 -0
- data/spec/unit/database/connection_spec.rb +34 -0
- data/spec/unit/database/database_spec.rb +133 -0
- data/spec/unit/file_format/amazon_s3_format_spec.rb +49 -0
- data/spec/unit/file_format/apache_format_spec.rb +203 -0
- data/spec/unit/file_format/file_format_api_spec.rb +69 -0
- data/spec/unit/file_format/line_definition_spec.rb +75 -0
- data/spec/unit/file_format/merb_format_spec.rb +52 -0
- data/spec/unit/file_format/rails_format_spec.rb +164 -0
- data/spec/unit/filter/anonymize_filter_spec.rb +21 -0
- data/spec/unit/filter/field_filter_spec.rb +66 -0
- data/spec/unit/filter/filter_spec.rb +17 -0
- data/spec/unit/filter/timespan_filter_spec.rb +58 -0
- data/spec/unit/mailer_spec.rb +30 -0
- data/spec/unit/request_spec.rb +111 -0
- data/spec/unit/source/log_parser_spec.rb +119 -0
- data/spec/unit/tracker/duration_tracker_spec.rb +130 -0
- data/spec/unit/tracker/frequency_tracker_spec.rb +88 -0
- data/spec/unit/tracker/hourly_spread_spec.rb +79 -0
- data/spec/unit/tracker/timespan_tracker_spec.rb +73 -0
- data/spec/unit/tracker/tracker_api_spec.rb +124 -0
- data/spec/unit/tracker/traffic_tracker_spec.rb +107 -0
- data/tasks/github-gem.rake +323 -0
- data/tasks/request_log_analyzer.rake +26 -0
- metadata +220 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
namespace :rla do
|
2
|
+
desc "Analyze the Rails log file using the request-log-analyzer gem."
|
3
|
+
task :report => :environment do
|
4
|
+
puts "Analyzing the Rails log file using the request-log-analyzer gem."
|
5
|
+
puts " Environment: #{RAILS_ENV}"
|
6
|
+
puts " Logfile: #{Rails.configuration.log_path}"
|
7
|
+
puts ""
|
8
|
+
IO.popen("request-log-analyzer #{Rails.configuration.log_path}") { |io| $stdout << io.read }
|
9
|
+
|
10
|
+
end
|
11
|
+
|
12
|
+
namespace :report do
|
13
|
+
desc "Analyze the Rails log file using the request-log-analyzer gem and output an HTML file."
|
14
|
+
task :html => :environment do
|
15
|
+
output_file = Rails.configuration.log_path + ".html"
|
16
|
+
|
17
|
+
puts "Analyzing the Rails log file using the request-log-analyzer gem."
|
18
|
+
puts " Environment: #{RAILS_ENV}"
|
19
|
+
puts " Logfile: #{Rails.configuration.log_path}"
|
20
|
+
puts " Output: #{output_file}"
|
21
|
+
puts ""
|
22
|
+
IO.popen("request-log-analyzer #{Rails.configuration.log_path} --output HTML --file #{output_file}") { |io| $stdout << io.read }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ngmoco-request-log-analyzer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.4.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Willem van Bergen
|
8
|
+
- Bart ten Brinke
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2009-10-08 00:00:00 -07:00
|
14
|
+
default_executable: request-log-analyzer
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rspec
|
18
|
+
type: :development
|
19
|
+
version_requirement:
|
20
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 1.2.4
|
25
|
+
version:
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: git
|
28
|
+
type: :development
|
29
|
+
version_requirement:
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.1.0
|
35
|
+
version:
|
36
|
+
description: " Request log analyzer's purpose is to find ot how your web application is being used and to focus your optimization efforts.\n This tool will parse all requests in the application's log file and aggregate the information. Once it is finished parsing\n the log file(s), it will show the requests that take op most server time using various metrics. It can also insert all\n parsed request information into a database so you can roll your own analysis. It supports Rails- and Merb-based applications\n and Apache access log files out of the box, but file formats of other applications can easily be supported by supplying an\n easy to write log file format definition.\n"
|
37
|
+
email:
|
38
|
+
- willem@railsdoctors.com
|
39
|
+
- bart@railsdoctors.com
|
40
|
+
executables:
|
41
|
+
- request-log-analyzer
|
42
|
+
extensions: []
|
43
|
+
|
44
|
+
extra_rdoc_files:
|
45
|
+
- README.rdoc
|
46
|
+
files:
|
47
|
+
- spec/unit/filter/anonymize_filter_spec.rb
|
48
|
+
- spec/fixtures/rails_22_cached.log
|
49
|
+
- lib/request_log_analyzer/line_definition.rb
|
50
|
+
- lib/request_log_analyzer/output/html.rb
|
51
|
+
- lib/request_log_analyzer/controller.rb
|
52
|
+
- spec/lib/macros.rb
|
53
|
+
- lib/request_log_analyzer/file_format/rails_development.rb
|
54
|
+
- spec/fixtures/apache_combined.log
|
55
|
+
- spec/fixtures/apache_common.log
|
56
|
+
- spec/fixtures/merb_prefixed.log
|
57
|
+
- lib/request_log_analyzer/file_format/amazon_s3.rb
|
58
|
+
- tasks/request_log_analyzer.rake
|
59
|
+
- spec/unit/file_format/file_format_api_spec.rb
|
60
|
+
- spec/unit/file_format/apache_format_spec.rb
|
61
|
+
- spec/integration/command_line_usage_spec.rb
|
62
|
+
- lib/request_log_analyzer/database.rb
|
63
|
+
- spec/fixtures/decompression.log.bz2
|
64
|
+
- spec/fixtures/rails_unordered.log
|
65
|
+
- lib/request_log_analyzer/log_processor.rb
|
66
|
+
- lib/request_log_analyzer/tracker.rb
|
67
|
+
- lib/request_log_analyzer/filter.rb
|
68
|
+
- bin/request-log-analyzer
|
69
|
+
- request-log-analyzer.gemspec
|
70
|
+
- DESIGN.rdoc
|
71
|
+
- spec/unit/filter/timespan_filter_spec.rb
|
72
|
+
- spec/unit/aggregator/database_inserter_spec.rb
|
73
|
+
- spec/lib/matchers.rb
|
74
|
+
- lib/request_log_analyzer/filter/field.rb
|
75
|
+
- lib/request_log_analyzer/tracker/frequency.rb
|
76
|
+
- spec/fixtures/decompression.log.gz
|
77
|
+
- spec/fixtures/decompression.log
|
78
|
+
- spec/lib/testing_format.rb
|
79
|
+
- spec/fixtures/test_order.log
|
80
|
+
- spec/fixtures/rails.db
|
81
|
+
- lib/request_log_analyzer/output/fixed_width.rb
|
82
|
+
- lib/request_log_analyzer/filter/anonymize.rb
|
83
|
+
- lib/request_log_analyzer/tracker/timespan.rb
|
84
|
+
- lib/request_log_analyzer/database/base.rb
|
85
|
+
- lib/request_log_analyzer/aggregator.rb
|
86
|
+
- spec/unit/request_spec.rb
|
87
|
+
- lib/cli/progressbar.rb
|
88
|
+
- lib/request_log_analyzer/mailer.rb
|
89
|
+
- README.rdoc
|
90
|
+
- lib/request_log_analyzer/database/warning.rb
|
91
|
+
- spec/fixtures/merb.log
|
92
|
+
- lib/request_log_analyzer/tracker/hourly_spread.rb
|
93
|
+
- .gitignore
|
94
|
+
- spec/unit/tracker/tracker_api_spec.rb
|
95
|
+
- spec/unit/tracker/duration_tracker_spec.rb
|
96
|
+
- spec/unit/file_format/amazon_s3_format_spec.rb
|
97
|
+
- spec/integration/scout_spec.rb
|
98
|
+
- lib/request_log_analyzer/aggregator/echo.rb
|
99
|
+
- spec/unit/mailer_spec.rb
|
100
|
+
- spec/unit/controller/log_processor_spec.rb
|
101
|
+
- spec/spec_helper.rb
|
102
|
+
- lib/request_log_analyzer.rb
|
103
|
+
- spec/database.yml
|
104
|
+
- Rakefile
|
105
|
+
- lib/request_log_analyzer/database/connection.rb
|
106
|
+
- spec/unit/filter/filter_spec.rb
|
107
|
+
- spec/fixtures/test_language_combined.log
|
108
|
+
- lib/request_log_analyzer/aggregator/database_inserter.rb
|
109
|
+
- lib/request_log_analyzer/aggregator/summarizer.rb
|
110
|
+
- lib/request_log_analyzer/file_format/rack.rb
|
111
|
+
- lib/request_log_analyzer/database/source.rb
|
112
|
+
- lib/request_log_analyzer/file_format/rails.rb
|
113
|
+
- spec/fixtures/decompression.tar.gz
|
114
|
+
- spec/unit/tracker/traffic_tracker_spec.rb
|
115
|
+
- spec/unit/filter/field_filter_spec.rb
|
116
|
+
- spec/unit/database/base_class_spec.rb
|
117
|
+
- lib/request_log_analyzer/filter/timespan.rb
|
118
|
+
- lib/request_log_analyzer/source/log_parser.rb
|
119
|
+
- spec/fixtures/decompression.tgz
|
120
|
+
- spec/unit/tracker/timespan_tracker_spec.rb
|
121
|
+
- spec/unit/tracker/hourly_spread_spec.rb
|
122
|
+
- spec/fixtures/header_and_footer.log
|
123
|
+
- lib/cli/tools.rb
|
124
|
+
- lib/request_log_analyzer/file_format/merb.rb
|
125
|
+
- spec/fixtures/multiple_files_1.log
|
126
|
+
- spec/unit/file_format/merb_format_spec.rb
|
127
|
+
- spec/unit/file_format/line_definition_spec.rb
|
128
|
+
- lib/request_log_analyzer/source.rb
|
129
|
+
- lib/request_log_analyzer/request.rb
|
130
|
+
- lib/cli/database_console.rb
|
131
|
+
- spec/unit/database/connection_spec.rb
|
132
|
+
- spec/unit/controller/controller_spec.rb
|
133
|
+
- spec/lib/mocks.rb
|
134
|
+
- spec/lib/helpers.rb
|
135
|
+
- spec/fixtures/rails_1x.log
|
136
|
+
- lib/cli/database_console_init.rb
|
137
|
+
- lib/request_log_analyzer/output.rb
|
138
|
+
- lib/request_log_analyzer/file_format/apache.rb
|
139
|
+
- spec/fixtures/decompression.log.zip
|
140
|
+
- spec/unit/source/log_parser_spec.rb
|
141
|
+
- spec/fixtures/test_file_format.log
|
142
|
+
- tasks/github-gem.rake
|
143
|
+
- spec/unit/database/database_spec.rb
|
144
|
+
- spec/integration/munin_plugins_rails_spec.rb
|
145
|
+
- lib/request_log_analyzer/tracker/duration.rb
|
146
|
+
- lib/request_log_analyzer/tracker/traffic.rb
|
147
|
+
- lib/request_log_analyzer/file_format.rb
|
148
|
+
- spec/unit/aggregator/summarizer_spec.rb
|
149
|
+
- spec/fixtures/syslog_1x.log
|
150
|
+
- spec/fixtures/rails_22.log
|
151
|
+
- lib/request_log_analyzer/database/request.rb
|
152
|
+
- spec/fixtures/multiple_files_2.log
|
153
|
+
- LICENSE
|
154
|
+
- lib/request_log_analyzer/source/database_loader.rb
|
155
|
+
- spec/unit/tracker/frequency_tracker_spec.rb
|
156
|
+
- spec/unit/file_format/rails_format_spec.rb
|
157
|
+
- lib/cli/command_line_arguments.rb
|
158
|
+
has_rdoc: true
|
159
|
+
homepage: http://railsdoctors.com
|
160
|
+
licenses: []
|
161
|
+
|
162
|
+
post_install_message:
|
163
|
+
rdoc_options:
|
164
|
+
- --title
|
165
|
+
- ngmoco-request-log-analyzer
|
166
|
+
- --main
|
167
|
+
- README.rdoc
|
168
|
+
- --line-numbers
|
169
|
+
- --inline-source
|
170
|
+
require_paths:
|
171
|
+
- lib
|
172
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: "0"
|
177
|
+
version:
|
178
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
|
+
requirements:
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: "0"
|
183
|
+
version:
|
184
|
+
requirements:
|
185
|
+
- To use the database inserter, ActiveRecord and an appropriate database adapter are required.
|
186
|
+
rubyforge_project: r-l-a
|
187
|
+
rubygems_version: 1.3.5
|
188
|
+
signing_key:
|
189
|
+
specification_version: 3
|
190
|
+
summary: A command line tool to analyze request logs for Apache, Rails, Merb and other web application servers
|
191
|
+
test_files:
|
192
|
+
- spec/unit/filter/anonymize_filter_spec.rb
|
193
|
+
- spec/unit/file_format/file_format_api_spec.rb
|
194
|
+
- spec/unit/file_format/apache_format_spec.rb
|
195
|
+
- spec/integration/command_line_usage_spec.rb
|
196
|
+
- spec/unit/filter/timespan_filter_spec.rb
|
197
|
+
- spec/unit/aggregator/database_inserter_spec.rb
|
198
|
+
- spec/unit/request_spec.rb
|
199
|
+
- spec/unit/tracker/tracker_api_spec.rb
|
200
|
+
- spec/unit/tracker/duration_tracker_spec.rb
|
201
|
+
- spec/unit/file_format/amazon_s3_format_spec.rb
|
202
|
+
- spec/integration/scout_spec.rb
|
203
|
+
- spec/unit/mailer_spec.rb
|
204
|
+
- spec/unit/controller/log_processor_spec.rb
|
205
|
+
- spec/unit/filter/filter_spec.rb
|
206
|
+
- spec/unit/tracker/traffic_tracker_spec.rb
|
207
|
+
- spec/unit/filter/field_filter_spec.rb
|
208
|
+
- spec/unit/database/base_class_spec.rb
|
209
|
+
- spec/unit/tracker/timespan_tracker_spec.rb
|
210
|
+
- spec/unit/tracker/hourly_spread_spec.rb
|
211
|
+
- spec/unit/file_format/merb_format_spec.rb
|
212
|
+
- spec/unit/file_format/line_definition_spec.rb
|
213
|
+
- spec/unit/database/connection_spec.rb
|
214
|
+
- spec/unit/controller/controller_spec.rb
|
215
|
+
- spec/unit/source/log_parser_spec.rb
|
216
|
+
- spec/unit/database/database_spec.rb
|
217
|
+
- spec/integration/munin_plugins_rails_spec.rb
|
218
|
+
- spec/unit/aggregator/summarizer_spec.rb
|
219
|
+
- spec/unit/tracker/frequency_tracker_spec.rb
|
220
|
+
- spec/unit/file_format/rails_format_spec.rb
|