request-log-analyzer 1.4.2 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/request-log-analyzer +10 -7
- data/lib/request_log_analyzer.rb +1 -1
- data/lib/request_log_analyzer/aggregator/summarizer.rb +12 -1
- data/lib/request_log_analyzer/controller.rb +31 -10
- data/lib/request_log_analyzer/file_format.rb +46 -2
- data/lib/request_log_analyzer/file_format/apache.rb +1 -1
- data/lib/request_log_analyzer/file_format/mysql.rb +93 -0
- data/lib/request_log_analyzer/file_format/rails_development.rb +1 -1
- data/lib/request_log_analyzer/mailer.rb +7 -4
- data/lib/request_log_analyzer/output/fixed_width.rb +1 -1
- data/lib/request_log_analyzer/request.rb +5 -0
- data/lib/request_log_analyzer/source/log_parser.rb +33 -10
- data/lib/request_log_analyzer/tracker/count.rb +93 -0
- data/request-log-analyzer.gemspec +6 -6
- data/spec/fixtures/mysql_slow_query.log +110 -0
- data/spec/integration/mailer_spec.rb +179 -0
- data/spec/integration/scout_spec.rb +2 -1
- data/spec/lib/helpers.rb +21 -1
- data/spec/unit/file_format/format_autodetection_spec.rb +35 -0
- data/spec/unit/file_format/mysql_format_spec.rb +155 -0
- data/spec/unit/mailer_spec.rb +12 -0
- data/spec/unit/tracker/count_tracker_spec.rb +123 -0
- metadata +126 -115
@@ -0,0 +1,35 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe RequestLogAnalyzer::FileFormat do
|
4
|
+
|
5
|
+
describe '.autodetect' do
|
6
|
+
it "should autodetect a Merb log" do
|
7
|
+
file_format = RequestLogAnalyzer::FileFormat.autodetect(log_fixture(:merb))
|
8
|
+
file_format.should be_kind_of(RequestLogAnalyzer::FileFormat::Merb)
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should autodetect a MySQL slow query log" do
|
12
|
+
file_format = RequestLogAnalyzer::FileFormat.autodetect(log_fixture(:mysql_slow_query))
|
13
|
+
file_format.should be_kind_of(RequestLogAnalyzer::FileFormat::Mysql)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should autodetect a Rails 1.x log" do
|
17
|
+
file_format = RequestLogAnalyzer::FileFormat.autodetect(log_fixture(:rails_1x))
|
18
|
+
file_format.should be_kind_of(RequestLogAnalyzer::FileFormat::Rails)
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should autodetect a Rails 2.x log" do
|
22
|
+
file_format = RequestLogAnalyzer::FileFormat.autodetect(log_fixture(:rails_22))
|
23
|
+
file_format.should be_kind_of(RequestLogAnalyzer::FileFormat::Rails)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should autodetect an Apache access log" do
|
27
|
+
file_format = RequestLogAnalyzer::FileFormat.autodetect(log_fixture(:apache_common))
|
28
|
+
file_format.should be_kind_of(RequestLogAnalyzer::FileFormat::Apache)
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should not find any file format with a bogus file" do
|
32
|
+
RequestLogAnalyzer::FileFormat.autodetect(log_fixture(:test_order)).should be_nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,155 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe RequestLogAnalyzer::FileFormat::Mysql do
|
4
|
+
|
5
|
+
it "should be a valid file format" do
|
6
|
+
RequestLogAnalyzer::FileFormat.load(:mysql).should be_valid
|
7
|
+
end
|
8
|
+
|
9
|
+
describe '#parse_line' do
|
10
|
+
before(:each) do
|
11
|
+
@file_format = RequestLogAnalyzer::FileFormat.load(:mysql)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should parse a :time line correctly" do
|
15
|
+
line = '# Time: 091112 8:13:56'
|
16
|
+
line = '# Time: 091112 8:13:56'
|
17
|
+
@file_format.should parse_line(line).as(:time).and_capture(:timestamp => 20091112081356)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should parse a :user_host line correctly with IP present" do
|
21
|
+
line = '# User@Host: admin[admin] @ db1 [10.0.0.1]'
|
22
|
+
@file_format.should parse_line(line).as(:user_host).and_capture(:user => "admin", :host => 'db1', :ip => '10.0.0.1')
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should parse a :user_host line correctly without a host" do
|
26
|
+
line = '# User@Host: admin[admin] @ [10.0.0.1]'
|
27
|
+
@file_format.should parse_line(line).as(:user_host).and_capture(:user => "admin", :host => '', :ip => '10.0.0.1')
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should parse a :user_host line correctly with IP absent" do
|
31
|
+
line = '# User@Host: root[root] @ localhost []'
|
32
|
+
@file_format.should parse_line(line).as(:user_host).and_capture(:user => "root", :host => 'localhost', :ip => "")
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should parse a :query_statistics line" do
|
36
|
+
line = '# Query_time: 10 Lock_time: 0 Rows_sent: 1191307 Rows_examined: 1191307'
|
37
|
+
@file_format.should parse_line(line).as(:query_statistics).and_capture(:query_time => 10.0,
|
38
|
+
:lock_time => 0.0, :rows_sent => 1191307, :rows_examined => 1191307)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should parse a :query_statistics line with floating point durations" do
|
42
|
+
line = '# Query_time: 10.00000 Lock_time: 0.00000 Rows_sent: 1191307 Rows_examined: 1191307'
|
43
|
+
@file_format.should parse_line(line).as(:query_statistics).and_capture(:query_time => 10.0,
|
44
|
+
:lock_time => 0.0, :rows_sent => 1191307, :rows_examined => 1191307)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should parse a :query_part line" do
|
48
|
+
line = ' AND clients.index > 0'
|
49
|
+
@file_format.should parse_line(line).as(:query_part).and_capture(:query_fragment => line)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should parse a final :query line" do
|
53
|
+
line = 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `events`; '
|
54
|
+
@file_format.should parse_line(line).as(:query).and_capture(:query =>
|
55
|
+
'SELECT /*!:int SQL_NO_CACHE */ * FROM events')
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should parse a :use_database line" do
|
59
|
+
line = 'use db;'
|
60
|
+
@file_format.should parse_line(line).as(:use_database).and_capture(:database => 'db')
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should not parse a SET timestamp line" do
|
64
|
+
line = 'SET timestamp=1250651725;'
|
65
|
+
@file_format.should_not parse_line(line)
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should not parse a SET insert_id line" do
|
69
|
+
line = 'SET insert_id=1250651725;'
|
70
|
+
@file_format.should_not parse_line(line)
|
71
|
+
end
|
72
|
+
|
73
|
+
it "should not parse a SET timestamp, insert_id line" do
|
74
|
+
line = 'SET timestamp=1250651725, insert_id=45674;'
|
75
|
+
@file_format.should_not parse_line(line)
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
describe '#parse_io' do
|
82
|
+
before(:each) do
|
83
|
+
@log_parser = RequestLogAnalyzer::Source::LogParser.new(RequestLogAnalyzer::FileFormat.load(:mysql))
|
84
|
+
end
|
85
|
+
|
86
|
+
it "should parse a single line query entry correctly" do
|
87
|
+
fixture = <<EOS
|
88
|
+
# Time: 091112 18:13:56
|
89
|
+
# User@Host: admin[admin] @ db1 [10.0.0.1]
|
90
|
+
# Query_time: 10 Lock_time: 0 Rows_sent: 1191307 Rows_examined: 1191307
|
91
|
+
SELECT /*!40001 SQL_NO_CACHE */ * FROM `events`;
|
92
|
+
EOS
|
93
|
+
@log_parser.parse_io(StringIO.new(fixture)) do |request|
|
94
|
+
request.should be_kind_of(RequestLogAnalyzer::FileFormat::Mysql::Request)
|
95
|
+
request[:query].should == 'SELECT /*!:int SQL_NO_CACHE */ * FROM events'
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
it "should parse a multiline query entry correctly" do
|
100
|
+
fixture = <<EOS
|
101
|
+
# Time: 091112 18:13:56
|
102
|
+
# User@Host: admin[admin] @ db1 [10.0.0.1]
|
103
|
+
# Query_time: 10 Lock_time: 0 Rows_sent: 1191307 Rows_examined: 1191307
|
104
|
+
SELECT * FROM `clients` WHERE (1=1
|
105
|
+
AND clients.valid_from < '2009-12-05' AND (clients.valid_to IS NULL or clients.valid_to > '2009-11-20')
|
106
|
+
AND clients.index > 0
|
107
|
+
) AND (clients.deleted_at IS NULL);
|
108
|
+
EOS
|
109
|
+
@log_parser.parse_io(StringIO.new(fixture)) do |request|
|
110
|
+
request.should be_kind_of(RequestLogAnalyzer::FileFormat::Mysql::Request)
|
111
|
+
request[:query].should == "SELECT * FROM clients WHERE (:int=:int AND clients.valid_from < :date AND (clients.valid_to IS NULL or clients.valid_to > :date) AND clients.index > :int ) AND (clients.deleted_at IS NULL)"
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
it "should parse a request without timestamp correctly" do
|
116
|
+
fixture = <<EOS
|
117
|
+
# User@Host: admin[admin] @ db1 [10.0.0.1]
|
118
|
+
# Query_time: 10 Lock_time: 0 Rows_sent: 1191307 Rows_examined: 1191307
|
119
|
+
SELECT /*!40001 SQL_NO_CACHE */ * FROM `events`;
|
120
|
+
EOS
|
121
|
+
request_counter.should_receive(:hit!).once
|
122
|
+
@log_parser.should_not_receive(:warn)
|
123
|
+
|
124
|
+
@log_parser.parse_io(StringIO.new(fixture)) do |request|
|
125
|
+
request_counter.hit! if request.kind_of?(RequestLogAnalyzer::FileFormat::Mysql::Request) && request.completed?
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
it "should parse a query with context information correctly" do
|
130
|
+
fixture = <<EOS
|
131
|
+
# Time: 091112 18:13:56
|
132
|
+
# User@Host: admin[admin] @ db1 [10.0.0.1]
|
133
|
+
# Query_time: 10 Lock_time: 0 Rows_sent: 1191307 Rows_examined: 1191307
|
134
|
+
use database_name;
|
135
|
+
SET timestamp=4324342342423, insert_id = 224253443;
|
136
|
+
SELECT /*!40001 SQL_NO_CACHE */ * FROM `events`;
|
137
|
+
EOS
|
138
|
+
|
139
|
+
request_counter.should_receive(:hit!).once
|
140
|
+
@log_parser.should_not_receive(:warn)
|
141
|
+
|
142
|
+
@log_parser.parse_io(StringIO.new(fixture)) do |request|
|
143
|
+
request_counter.hit! if request.kind_of?(RequestLogAnalyzer::FileFormat::Mysql::Request) && request.completed?
|
144
|
+
request[:query].should == 'SELECT /*!:int SQL_NO_CACHE */ * FROM events'
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
|
150
|
+
it "should find 26 completed sloq query entries" do
|
151
|
+
@log_parser.should_receive(:handle_request).exactly(26).times
|
152
|
+
@log_parser.parse_file(log_fixture(:mysql_slow_query))
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
data/spec/unit/mailer_spec.rb
CHANGED
@@ -2,6 +2,18 @@ require File.dirname(__FILE__) + '/../spec_helper'
|
|
2
2
|
|
3
3
|
describe RequestLogAnalyzer::Mailer, 'mailer' do
|
4
4
|
|
5
|
+
it "should initialize correctly" do
|
6
|
+
@mailer = RequestLogAnalyzer::Mailer.new('alfa@beta.com', 'localhost', :debug => true)
|
7
|
+
@mailer.host.should eql("localhost")
|
8
|
+
@mailer.port.should eql(25)
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should allow alternate port settings" do
|
12
|
+
@mailer = RequestLogAnalyzer::Mailer.new('alfa@beta.com', 'localhost:2525', :debug => true)
|
13
|
+
@mailer.host.should eql("localhost")
|
14
|
+
@mailer.port.should eql("2525")
|
15
|
+
end
|
16
|
+
|
5
17
|
it "should store printed data" do
|
6
18
|
@mailer = RequestLogAnalyzer::Mailer.new('alfa@beta.com', 'localhost', :debug => true)
|
7
19
|
|
@@ -0,0 +1,123 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe RequestLogAnalyzer::Tracker::Count do
|
4
|
+
|
5
|
+
context 'static category' do
|
6
|
+
before(:each) do
|
7
|
+
@tracker = RequestLogAnalyzer::Tracker::Count.new(:category => :category, :field => :blah)
|
8
|
+
@tracker.prepare
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should register a request in the right category" do
|
12
|
+
@tracker.update(request(:category => 'a', :blah => 2))
|
13
|
+
@tracker.categories.should include('a')
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should register requests in the right category" do
|
17
|
+
@tracker.update(request(:category => 'a', :blah => 2))
|
18
|
+
@tracker.update(request(:category => 'b', :blah => 2))
|
19
|
+
@tracker.update(request(:category => 'b', :blah => 2))
|
20
|
+
|
21
|
+
@tracker.categories['a'][:sum].should == 2
|
22
|
+
@tracker.categories['b'][:sum].should == 4
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
context 'dynamic category' do
|
28
|
+
before(:each) do
|
29
|
+
@categorizer = Proc.new { |request| request[:duration] > 0.2 ? 'slow' : 'fast' }
|
30
|
+
@tracker = RequestLogAnalyzer::Tracker::Count.new(:category => @categorizer, :field => :blah)
|
31
|
+
@tracker.prepare
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should use the categorizer to determine the right category" do
|
35
|
+
@tracker.update(request(:category => 'a', :duration => 0.2, :blah => 2))
|
36
|
+
@tracker.update(request(:category => 'b', :duration => 0.3, :blah => 2))
|
37
|
+
@tracker.update(request(:category => 'b', :duration => 0.4, :blah => 2))
|
38
|
+
|
39
|
+
@tracker.categories['fast'][:sum].should == 2
|
40
|
+
@tracker.categories['slow'][:sum].should == 4
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe '#report' do
|
45
|
+
before(:each) do
|
46
|
+
@tracker = RequestLogAnalyzer::Tracker::Count.new(:category => :category, :field => :blah)
|
47
|
+
@tracker.prepare
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should generate a report without errors when one category is present" do
|
51
|
+
@tracker.update(request(:category => 'a', :blah => 2))
|
52
|
+
lambda { @tracker.report(mock_output) }.should_not raise_error
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should generate a report without errors when no category is present" do
|
56
|
+
lambda { @tracker.report(mock_output) }.should_not raise_error
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should generate a report without errors when multiple categories are present" do
|
60
|
+
@tracker.update(request(:category => 'a', :blah => 2))
|
61
|
+
@tracker.update(request(:category => 'b', :blah => 2))
|
62
|
+
lambda { @tracker.report(mock_output) }.should_not raise_error
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe '#to_yaml_object' do
|
67
|
+
before(:each) do
|
68
|
+
@tracker = RequestLogAnalyzer::Tracker::Count.new(:category => :category, :field => :blah)
|
69
|
+
@tracker.prepare
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should generate a YAML output" do
|
73
|
+
@tracker.update(request(:category => 'a', :blah => 2))
|
74
|
+
@tracker.update(request(:category => 'b', :blah => 3))
|
75
|
+
@tracker.to_yaml_object.should == {"a"=>{:min=>2, :hits=>1, :max=>2, :mean=>2.0, :sum=>2, :sum_of_squares=>0.0}, "b"=>{:min=>3, :hits=>1, :max=>3, :mean=>3.0, :sum=>3, :sum_of_squares=>0.0}}
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
describe '#display_value' do
|
80
|
+
before(:each) do
|
81
|
+
@tracker = RequestLogAnalyzer::Tracker::Count.new(:category => :category, :field => :blah)
|
82
|
+
@tracker.prepare
|
83
|
+
end
|
84
|
+
|
85
|
+
it "should not crash on nil" do
|
86
|
+
lambda { @tracker.display_value(nil) }.should_not raise_error
|
87
|
+
@tracker.display_value(nil).should_not be_nil
|
88
|
+
@tracker.display_value(nil).should_not eql("")
|
89
|
+
end
|
90
|
+
|
91
|
+
it "should not touch thousands" do
|
92
|
+
@tracker.display_value(1000).should eql('1000 ')
|
93
|
+
@tracker.display_value(5000).should eql('5000 ')
|
94
|
+
@tracker.display_value(9001).should eql('9001 ')
|
95
|
+
end
|
96
|
+
|
97
|
+
it "should reduce milions to thousands (k)" do
|
98
|
+
@tracker.display_value(1000_000).should eql('1000k')
|
99
|
+
@tracker.display_value(5000_000).should eql('5000k')
|
100
|
+
@tracker.display_value(9000_001).should eql('9000k')
|
101
|
+
end
|
102
|
+
|
103
|
+
it "should reduce giga to millons (M)" do
|
104
|
+
@tracker.display_value(1000_000_000).should eql('1000M')
|
105
|
+
@tracker.display_value(5000_000_000).should eql('5000M')
|
106
|
+
@tracker.display_value(9000_000_001).should eql('9000M')
|
107
|
+
end
|
108
|
+
|
109
|
+
it "should reduce teras to gigas (G)" do
|
110
|
+
@tracker.display_value(1000_000_000_000).should eql('1000G')
|
111
|
+
@tracker.display_value(5000_000_000_000).should eql('5000G')
|
112
|
+
@tracker.display_value(9000_000_001_001).should eql('9000G')
|
113
|
+
end
|
114
|
+
|
115
|
+
it "should reduce petas to teras (T)" do
|
116
|
+
@tracker.display_value(1000_000_000_000_000).should eql('1000T')
|
117
|
+
@tracker.display_value(5000_000_000_000_000).should eql('5000T')
|
118
|
+
@tracker.display_value(9000_000_001_001_000).should eql('9000T')
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
|
123
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: request-log-analyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Willem van Bergen
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-11-18 00:00:00 +01:00
|
14
14
|
default_executable: request-log-analyzer
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -44,117 +44,124 @@ extensions: []
|
|
44
44
|
extra_rdoc_files:
|
45
45
|
- README.rdoc
|
46
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
47
|
- lib/request_log_analyzer/output/html.rb
|
51
|
-
-
|
52
|
-
-
|
48
|
+
- spec/unit/tracker/hourly_spread_spec.rb
|
49
|
+
- DESIGN.rdoc
|
50
|
+
- spec/fixtures/rails_unordered.log
|
51
|
+
- spec/fixtures/multiple_files_1.log
|
52
|
+
- lib/request_log_analyzer/database/source.rb
|
53
|
+
- README.rdoc
|
54
|
+
- spec/unit/file_format/amazon_s3_format_spec.rb
|
53
55
|
- lib/request_log_analyzer/file_format/rails_development.rb
|
54
|
-
- spec/fixtures/
|
55
|
-
- spec/fixtures/
|
56
|
-
- spec/
|
57
|
-
- lib/request_log_analyzer/
|
58
|
-
-
|
59
|
-
- spec/
|
60
|
-
-
|
61
|
-
- spec/
|
62
|
-
- lib/request_log_analyzer/
|
56
|
+
- spec/fixtures/rails_22.log
|
57
|
+
- spec/fixtures/test_order.log
|
58
|
+
- spec/unit/database/base_class_spec.rb
|
59
|
+
- lib/request_log_analyzer/database/connection.rb
|
60
|
+
- lib/request_log_analyzer/aggregator.rb
|
61
|
+
- spec/fixtures/decompression.log
|
62
|
+
- lib/request_log_analyzer/file_format/apache.rb
|
63
|
+
- spec/fixtures/decompression.log.gz
|
64
|
+
- lib/request_log_analyzer/tracker/frequency.rb
|
65
|
+
- lib/request_log_analyzer/tracker/duration.rb
|
66
|
+
- tasks/github-gem.rake
|
67
|
+
- .gitignore
|
68
|
+
- spec/unit/filter/filter_spec.rb
|
69
|
+
- spec/lib/macros.rb
|
70
|
+
- spec/spec_helper.rb
|
71
|
+
- spec/unit/tracker/count_tracker_spec.rb
|
63
72
|
- spec/fixtures/decompression.log.bz2
|
64
|
-
- spec/
|
65
|
-
- lib/request_log_analyzer/log_processor.rb
|
66
|
-
- lib/request_log_analyzer/tracker.rb
|
73
|
+
- spec/unit/database/connection_spec.rb
|
67
74
|
- lib/request_log_analyzer/filter.rb
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
75
|
+
- spec/integration/scout_spec.rb
|
76
|
+
- spec/fixtures/test_file_format.log
|
77
|
+
- lib/request_log_analyzer/tracker/traffic.rb
|
78
|
+
- spec/unit/file_format/merb_format_spec.rb
|
79
|
+
- spec/unit/file_format/format_autodetection_spec.rb
|
71
80
|
- spec/unit/filter/timespan_filter_spec.rb
|
72
|
-
- spec/unit/
|
73
|
-
- spec/lib/matchers.rb
|
81
|
+
- spec/unit/file_format/file_format_api_spec.rb
|
74
82
|
- lib/request_log_analyzer/filter/field.rb
|
75
|
-
- lib/request_log_analyzer/
|
76
|
-
-
|
77
|
-
-
|
78
|
-
-
|
79
|
-
- spec/
|
83
|
+
- lib/request_log_analyzer/file_format/merb.rb
|
84
|
+
- lib/request_log_analyzer/filter/anonymize.rb
|
85
|
+
- lib/request_log_analyzer/file_format/amazon_s3.rb
|
86
|
+
- lib/cli/database_console.rb
|
87
|
+
- spec/integration/mailer_spec.rb
|
88
|
+
- lib/request_log_analyzer/line_definition.rb
|
89
|
+
- spec/unit/tracker/frequency_tracker_spec.rb
|
90
|
+
- spec/fixtures/multiple_files_2.log
|
91
|
+
- spec/lib/mocks.rb
|
92
|
+
- spec/unit/file_format/apache_format_spec.rb
|
93
|
+
- spec/fixtures/syslog_1x.log
|
94
|
+
- spec/integration/munin_plugins_rails_spec.rb
|
95
|
+
- spec/lib/helpers.rb
|
80
96
|
- spec/fixtures/rails.db
|
97
|
+
- spec/unit/source/log_parser_spec.rb
|
98
|
+
- lib/request_log_analyzer/aggregator/database_inserter.rb
|
99
|
+
- spec/fixtures/header_and_footer.log
|
100
|
+
- spec/lib/testing_format.rb
|
101
|
+
- lib/request_log_analyzer/database.rb
|
102
|
+
- spec/unit/file_format/rails_format_spec.rb
|
103
|
+
- lib/request_log_analyzer/request.rb
|
81
104
|
- lib/request_log_analyzer/output/fixed_width.rb
|
82
|
-
-
|
83
|
-
- lib/request_log_analyzer/
|
84
|
-
-
|
85
|
-
- lib/
|
105
|
+
- spec/integration/command_line_usage_spec.rb
|
106
|
+
- lib/request_log_analyzer/file_format/rack.rb
|
107
|
+
- spec/fixtures/test_language_combined.log
|
108
|
+
- lib/cli/command_line_arguments.rb
|
109
|
+
- lib/request_log_analyzer.rb
|
110
|
+
- spec/database.yml
|
86
111
|
- spec/unit/request_spec.rb
|
112
|
+
- lib/request_log_analyzer/database/base.rb
|
113
|
+
- spec/unit/aggregator/database_inserter_spec.rb
|
114
|
+
- lib/request_log_analyzer/database/request.rb
|
115
|
+
- lib/cli/database_console_init.rb
|
87
116
|
- lib/cli/progressbar.rb
|
88
|
-
- lib/request_log_analyzer/mailer.rb
|
89
|
-
- README.rdoc
|
90
117
|
- lib/request_log_analyzer/database/warning.rb
|
91
|
-
- spec/
|
92
|
-
-
|
93
|
-
- .
|
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
|
118
|
+
- spec/unit/filter/anonymize_filter_spec.rb
|
119
|
+
- spec/fixtures/apache_combined.log
|
120
|
+
- spec/fixtures/rails_22_cached.log
|
109
121
|
- lib/request_log_analyzer/aggregator/summarizer.rb
|
110
|
-
-
|
111
|
-
-
|
122
|
+
- spec/unit/tracker/duration_tracker_spec.rb
|
123
|
+
- spec/fixtures/rails_1x.log
|
124
|
+
- lib/request_log_analyzer/tracker/count.rb
|
125
|
+
- lib/request_log_analyzer/output.rb
|
126
|
+
- spec/unit/file_format/line_definition_spec.rb
|
127
|
+
- lib/request_log_analyzer/file_format/mysql.rb
|
128
|
+
- spec/unit/file_format/mysql_format_spec.rb
|
129
|
+
- request-log-analyzer.gemspec
|
130
|
+
- spec/fixtures/apache_common.log
|
112
131
|
- lib/request_log_analyzer/file_format/rails.rb
|
113
|
-
-
|
132
|
+
- Rakefile
|
133
|
+
- spec/unit/mailer_spec.rb
|
134
|
+
- lib/request_log_analyzer/tracker/hourly_spread.rb
|
135
|
+
- spec/unit/aggregator/summarizer_spec.rb
|
114
136
|
- spec/unit/tracker/traffic_tracker_spec.rb
|
137
|
+
- lib/request_log_analyzer/tracker/timespan.rb
|
138
|
+
- spec/unit/controller/log_processor_spec.rb
|
115
139
|
- spec/unit/filter/field_filter_spec.rb
|
116
|
-
- spec/
|
140
|
+
- spec/fixtures/merb_prefixed.log
|
141
|
+
- lib/request_log_analyzer/log_processor.rb
|
117
142
|
- 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
143
|
- spec/unit/controller/controller_spec.rb
|
133
|
-
-
|
134
|
-
-
|
135
|
-
- spec/fixtures/
|
136
|
-
-
|
137
|
-
- lib/
|
138
|
-
- lib/request_log_analyzer/
|
139
|
-
- spec/
|
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
|
144
|
+
- lib/request_log_analyzer/mailer.rb
|
145
|
+
- lib/cli/tools.rb
|
146
|
+
- spec/fixtures/decompression.tar.gz
|
147
|
+
- spec/unit/tracker/timespan_tracker_spec.rb
|
148
|
+
- spec/lib/matchers.rb
|
149
|
+
- lib/request_log_analyzer/controller.rb
|
150
|
+
- spec/unit/tracker/tracker_api_spec.rb
|
154
151
|
- lib/request_log_analyzer/source/database_loader.rb
|
155
|
-
- spec/
|
156
|
-
-
|
157
|
-
- lib/
|
152
|
+
- spec/fixtures/merb.log
|
153
|
+
- LICENSE
|
154
|
+
- lib/request_log_analyzer/file_format.rb
|
155
|
+
- tasks/request_log_analyzer.rake
|
156
|
+
- spec/unit/database/database_spec.rb
|
157
|
+
- spec/fixtures/decompression.log.zip
|
158
|
+
- spec/fixtures/decompression.tgz
|
159
|
+
- bin/request-log-analyzer
|
160
|
+
- lib/request_log_analyzer/tracker.rb
|
161
|
+
- lib/request_log_analyzer/source.rb
|
162
|
+
- spec/fixtures/mysql_slow_query.log
|
163
|
+
- lib/request_log_analyzer/source/log_parser.rb
|
164
|
+
- lib/request_log_analyzer/aggregator/echo.rb
|
158
165
|
has_rdoc: true
|
159
166
|
homepage: http://railsdoctors.com
|
160
167
|
licenses: []
|
@@ -184,37 +191,41 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
191
|
requirements:
|
185
192
|
- To use the database inserter, ActiveRecord and an appropriate database adapter are required.
|
186
193
|
rubyforge_project: r-l-a
|
187
|
-
rubygems_version: 1.3.
|
194
|
+
rubygems_version: 1.3.5
|
188
195
|
signing_key:
|
189
196
|
specification_version: 3
|
190
197
|
summary: A command line tool to analyze request logs for Apache, Rails, Merb and other web application servers
|
191
198
|
test_files:
|
192
|
-
- spec/unit/
|
199
|
+
- spec/unit/tracker/hourly_spread_spec.rb
|
200
|
+
- spec/unit/file_format/amazon_s3_format_spec.rb
|
201
|
+
- spec/unit/database/base_class_spec.rb
|
202
|
+
- spec/unit/filter/filter_spec.rb
|
203
|
+
- spec/unit/tracker/count_tracker_spec.rb
|
204
|
+
- spec/unit/database/connection_spec.rb
|
205
|
+
- spec/integration/scout_spec.rb
|
206
|
+
- spec/unit/file_format/merb_format_spec.rb
|
207
|
+
- spec/unit/file_format/format_autodetection_spec.rb
|
208
|
+
- spec/unit/filter/timespan_filter_spec.rb
|
193
209
|
- spec/unit/file_format/file_format_api_spec.rb
|
210
|
+
- spec/integration/mailer_spec.rb
|
211
|
+
- spec/unit/tracker/frequency_tracker_spec.rb
|
194
212
|
- spec/unit/file_format/apache_format_spec.rb
|
213
|
+
- spec/integration/munin_plugins_rails_spec.rb
|
214
|
+
- spec/unit/source/log_parser_spec.rb
|
215
|
+
- spec/unit/file_format/rails_format_spec.rb
|
195
216
|
- spec/integration/command_line_usage_spec.rb
|
196
|
-
- spec/unit/filter/timespan_filter_spec.rb
|
197
|
-
- spec/unit/aggregator/database_inserter_spec.rb
|
198
217
|
- spec/unit/request_spec.rb
|
199
|
-
- spec/unit/
|
218
|
+
- spec/unit/aggregator/database_inserter_spec.rb
|
219
|
+
- spec/unit/filter/anonymize_filter_spec.rb
|
200
220
|
- spec/unit/tracker/duration_tracker_spec.rb
|
201
|
-
- spec/unit/file_format/
|
202
|
-
- spec/
|
221
|
+
- spec/unit/file_format/line_definition_spec.rb
|
222
|
+
- spec/unit/file_format/mysql_format_spec.rb
|
203
223
|
- spec/unit/mailer_spec.rb
|
204
|
-
- spec/unit/
|
205
|
-
- spec/unit/filter/filter_spec.rb
|
224
|
+
- spec/unit/aggregator/summarizer_spec.rb
|
206
225
|
- spec/unit/tracker/traffic_tracker_spec.rb
|
226
|
+
- spec/unit/controller/log_processor_spec.rb
|
207
227
|
- 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
228
|
- spec/unit/controller/controller_spec.rb
|
215
|
-
- spec/unit/
|
229
|
+
- spec/unit/tracker/timespan_tracker_spec.rb
|
230
|
+
- spec/unit/tracker/tracker_api_spec.rb
|
216
231
|
- 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
|