request-log-analyzer 1.12.10 → 1.12.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +2 -2
- data/Gemfile +4 -0
- data/Gemfile.activerecord2 +4 -0
- data/Gemfile.activerecord3 +5 -1
- data/Gemfile.activerecord4 +4 -0
- data/lib/request_log_analyzer/file_format/apache.rb +1 -1
- data/lib/request_log_analyzer/output/html.rb +3 -3
- data/lib/request_log_analyzer/tracker/duration.rb +3 -2
- data/lib/request_log_analyzer/version.rb +1 -1
- data/request-log-analyzer.gemspec +1 -1
- data/spec/integration/mailer_spec.rb +13 -13
- metadata +19 -39
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 872bac28415815b211937a1a6901ef46e2b6d043
|
4
|
+
data.tar.gz: c134699462b2dbaa10ba1583aca6d48c9e040445
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6aefe44b90bfb84264d34eeaff521356677165a9c342916e4f0b8cf9b7dc9f7970f937bc9ea9bdd276ea10e7288e15c5f6f64c6977f21804eab819019bc9976c
|
7
|
+
data.tar.gz: 8edf7fbdcb32c2153e06c2bffec201377169fa818db5acd4184557d28583127d25941ff39c137a3b05500409dda5e35061e846af6f3bb09502118a9374014de2
|
data/.travis.yml
CHANGED
@@ -12,8 +12,7 @@ rvm:
|
|
12
12
|
- jruby-18mode
|
13
13
|
- jruby-19mode
|
14
14
|
- jruby-head
|
15
|
-
- rbx
|
16
|
-
- rbx-19mode
|
15
|
+
- rbx
|
17
16
|
gemfile:
|
18
17
|
- Gemfile.activerecord2
|
19
18
|
- Gemfile.activerecord3
|
@@ -22,6 +21,7 @@ matrix:
|
|
22
21
|
allow_failures:
|
23
22
|
- rvm: jruby-head
|
24
23
|
- rvm: ruby-head
|
24
|
+
- rvm: rbx
|
25
25
|
exclude:
|
26
26
|
- gemfile: Gemfile.activerecord4
|
27
27
|
rvm: 1.8.7
|
data/Gemfile
CHANGED
data/Gemfile.activerecord2
CHANGED
data/Gemfile.activerecord3
CHANGED
data/Gemfile.activerecord4
CHANGED
@@ -43,7 +43,7 @@ module RequestLogAnalyzer::FileFormat
|
|
43
43
|
'milli' => { :regexp => '(\d+|-)', :captures => [ {:name => :duration, :type => :duration, :unit => :msec }] }
|
44
44
|
},
|
45
45
|
'l' => { nil => { :regexp => '([\w-]+)', :captures => [{:name => :remote_logname, :type => :nillable_string}] } },
|
46
|
-
'T' => { nil => { :regexp => '(\d
|
46
|
+
'T' => { nil => { :regexp => '(\d+(?:\.\d+)?|-)', :captures => [{:name => :duration, :type => :duration, :unit => :sec}] } },
|
47
47
|
't' => { nil => { :regexp => "\\[(#{APACHE_TIMESTAMP})?\\]", :captures => [{:name => :timestamp, :type => :timestamp}] } },
|
48
48
|
's' => { nil => { :regexp => '(\d{3})', :captures => [{:name => :http_status, :type => :integer}] } },
|
49
49
|
'u' => { nil => { :regexp => '(\w+|-)', :captures => [{:name => :user, :type => :nillable_string}] } },
|
@@ -53,7 +53,7 @@ module RequestLogAnalyzer::Output
|
|
53
53
|
rows = Array.new
|
54
54
|
yield(rows)
|
55
55
|
|
56
|
-
@io << tag(:table, {:
|
56
|
+
@io << tag(:table, {:class => 'rla-report-table', :cellspacing => 0}) do |content|
|
57
57
|
if table_has_header?(columns)
|
58
58
|
content << tag(:tr) do
|
59
59
|
columns.map { |col| tag(:th, col[:title]) }.join("\n")
|
@@ -102,7 +102,7 @@ module RequestLogAnalyzer::Output
|
|
102
102
|
background: #CAE8EA;
|
103
103
|
}
|
104
104
|
|
105
|
-
|
105
|
+
.rla-report-table {
|
106
106
|
width: 700px;
|
107
107
|
padding: 0;
|
108
108
|
margin: 0;
|
@@ -184,4 +184,4 @@ module RequestLogAnalyzer::Output
|
|
184
184
|
end
|
185
185
|
end
|
186
186
|
end
|
187
|
-
end
|
187
|
+
end
|
@@ -25,7 +25,7 @@ module RequestLogAnalyzer::Tracker
|
|
25
25
|
def prepare
|
26
26
|
options[:value] = options[:duration] if options[:duration]
|
27
27
|
super
|
28
|
-
|
28
|
+
|
29
29
|
@number_of_buckets = options[:number_of_buckets] || 1000
|
30
30
|
@min_bucket_value = options[:min_bucket_value] ? options[:min_bucket_value].to_f : 0.0001
|
31
31
|
@max_bucket_value = options[:max_bucket_value] ? options[:max_bucket_value].to_f : 1000
|
@@ -38,7 +38,8 @@ module RequestLogAnalyzer::Tracker
|
|
38
38
|
def display_value(time)
|
39
39
|
case time
|
40
40
|
when nil then '-'
|
41
|
-
when 0...
|
41
|
+
when 0...1 then "%0ims" % (time*1000)
|
42
|
+
when 1...60 then "%0.02fs" % time
|
42
43
|
when 60...3600 then "%dm%02ds" % [time / 60, (time % 60).round]
|
43
44
|
else "%dh%02dm%02ds" % [time / 3600, (time % 3600) / 60, (time % 60).round]
|
44
45
|
end
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
|
12
12
|
gem.authors = ['Willem van Bergen', 'Bart ten Brinke']
|
13
13
|
gem.email = ['willem@railsdoctors.com', 'bart@railsdoctors.com']
|
14
|
-
gem.homepage = 'http://
|
14
|
+
gem.homepage = 'http://www.request-log-analyzer.com'
|
15
15
|
gem.license = "MIT"
|
16
16
|
|
17
17
|
gem.summary = "A command line tool to analyze request logs for Apache, Rails, Merb, MySQL and other web application servers"
|
@@ -26,7 +26,7 @@ describe RequestLogAnalyzer, 'running mailer integration' do
|
|
26
26
|
:format => RequestLogAnalyzer::FileFormat::Rails,
|
27
27
|
:no_progress => true
|
28
28
|
).run!
|
29
|
-
|
29
|
+
|
30
30
|
Process.wait # Wait for mailer to complete
|
31
31
|
|
32
32
|
find_string_in_file("From: <contact@railsdoctors.com>", @log_file).should_not be_nil
|
@@ -34,9 +34,9 @@ describe RequestLogAnalyzer, 'running mailer integration' do
|
|
34
34
|
find_string_in_file("From: Request-log-analyzer reporter <contact@railsdoctors.com>", @log_file).should_not be_nil
|
35
35
|
find_string_in_file("Subject: Request log analyzer report - generated on", @log_file).should_not be_nil
|
36
36
|
find_string_in_file("Request summary", @log_file).should_not be_nil
|
37
|
-
find_string_in_file("PeopleControll | 1 |
|
37
|
+
find_string_in_file("PeopleControll | 1 | 40ms | 40ms | 0ms | 40ms | 40ms | 40ms-41ms", @log_file).should_not be_nil
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
it "should allow a custom mail subject" do
|
41
41
|
RequestLogAnalyzer::Controller.build(
|
42
42
|
:mail => 'root@localhost',
|
@@ -46,13 +46,13 @@ describe RequestLogAnalyzer, 'running mailer integration' do
|
|
46
46
|
:format => RequestLogAnalyzer::FileFormat::Rails,
|
47
47
|
:no_progress => true
|
48
48
|
).run!
|
49
|
-
|
49
|
+
|
50
50
|
Process.wait # Wait for mailer to complete
|
51
51
|
|
52
|
-
find_string_in_file("Subject: TESTSUBJECT", @log_file).should_not be_nil
|
52
|
+
find_string_in_file("Subject: TESTSUBJECT", @log_file).should_not be_nil
|
53
53
|
end
|
54
54
|
|
55
|
-
it "should send html mail" do
|
55
|
+
it "should send html mail" do
|
56
56
|
RequestLogAnalyzer::Controller.build(
|
57
57
|
:output => 'HTML',
|
58
58
|
:mail => 'root@localhost',
|
@@ -61,14 +61,14 @@ describe RequestLogAnalyzer, 'running mailer integration' do
|
|
61
61
|
:format => RequestLogAnalyzer::FileFormat::Rails,
|
62
62
|
:no_progress => true
|
63
63
|
).run!
|
64
|
-
|
64
|
+
|
65
65
|
Process.wait # Wait for mailer to complete
|
66
66
|
|
67
67
|
find_string_in_file("From: <contact@railsdoctors.com>", @log_file).should_not be_nil
|
68
68
|
find_string_in_file("To: <root@localhost>", @log_file).should_not be_nil
|
69
69
|
find_string_in_file("From: Request-log-analyzer reporter <contact@railsdoctors.com>", @log_file).should_not be_nil
|
70
70
|
find_string_in_file('<h1>Request-log-analyzer summary report</h1>', @log_file).should_not be_nil
|
71
|
-
find_string_in_file('<td class="alt">
|
71
|
+
find_string_in_file('<td class="alt">287ms-296ms</td></tr><tr><td>DashboardController#index.html [GET]</td>', @log_file).should_not be_nil
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
@@ -80,7 +80,7 @@ end
|
|
80
80
|
#
|
81
81
|
# Included in RLA because original mailtrap puts anoying stuff when called
|
82
82
|
# through ruby.
|
83
|
-
#
|
83
|
+
#
|
84
84
|
# Mailtrap creates a TCP server that listens on a specified port for SMTP
|
85
85
|
# clients. Accepts the connection and talks just enough of the SMTP protocol
|
86
86
|
# for them to deliver a message which it writes to disk.
|
@@ -96,7 +96,7 @@ class Mailtrap
|
|
96
96
|
@port = port
|
97
97
|
@once = once
|
98
98
|
@msgfile = msgfile
|
99
|
-
|
99
|
+
|
100
100
|
File.open( @msgfile, "a" ) do |file|
|
101
101
|
file.puts "\n* Mailtrap started at #{@host}:#{port}\n"
|
102
102
|
end
|
@@ -113,7 +113,7 @@ class Mailtrap
|
|
113
113
|
def get_line
|
114
114
|
line = gets
|
115
115
|
line.chomp! unless line.nil?
|
116
|
-
line
|
116
|
+
line
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
@@ -123,7 +123,7 @@ class Mailtrap
|
|
123
123
|
end
|
124
124
|
|
125
125
|
break if @once
|
126
|
-
end
|
126
|
+
end
|
127
127
|
end
|
128
128
|
|
129
129
|
# Write a plain text dump of the incoming email to a text
|
@@ -198,4 +198,4 @@ end
|
|
198
198
|
|
199
199
|
else
|
200
200
|
p 'Skipping mailer integration specs, because of missing Process.fork()'
|
201
|
-
end
|
201
|
+
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: request-log-analyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.
|
5
|
-
prerelease:
|
4
|
+
version: 1.12.11
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Willem van Bergen
|
@@ -10,28 +9,25 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2014-04-07 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rake
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - '>='
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '0'
|
23
21
|
type: :development
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - '>='
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: '0'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: rspec
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
32
|
- - ~>
|
37
33
|
- !ruby/object:Gem::Version
|
@@ -39,7 +35,6 @@ dependencies:
|
|
39
35
|
type: :development
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
39
|
- - ~>
|
45
40
|
- !ruby/object:Gem::Version
|
@@ -47,68 +42,60 @@ dependencies:
|
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: activerecord
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - '>='
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: '0'
|
55
49
|
type: :development
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - '>='
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: '0'
|
63
56
|
- !ruby/object:Gem::Dependency
|
64
57
|
name: sqlite3
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
59
|
requirements:
|
68
|
-
- -
|
60
|
+
- - '>='
|
69
61
|
- !ruby/object:Gem::Version
|
70
62
|
version: '0'
|
71
63
|
type: :development
|
72
64
|
prerelease: false
|
73
65
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
66
|
requirements:
|
76
|
-
- -
|
67
|
+
- - '>='
|
77
68
|
- !ruby/object:Gem::Version
|
78
69
|
version: '0'
|
79
70
|
- !ruby/object:Gem::Dependency
|
80
71
|
name: mysql2
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
73
|
requirements:
|
84
|
-
- -
|
74
|
+
- - '>='
|
85
75
|
- !ruby/object:Gem::Version
|
86
76
|
version: '0'
|
87
77
|
type: :development
|
88
78
|
prerelease: false
|
89
79
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
80
|
requirements:
|
92
|
-
- -
|
81
|
+
- - '>='
|
93
82
|
- !ruby/object:Gem::Version
|
94
83
|
version: '0'
|
95
84
|
- !ruby/object:Gem::Dependency
|
96
85
|
name: pg
|
97
86
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
87
|
requirements:
|
100
|
-
- -
|
88
|
+
- - '>='
|
101
89
|
- !ruby/object:Gem::Version
|
102
90
|
version: '0'
|
103
91
|
type: :development
|
104
92
|
prerelease: false
|
105
93
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
94
|
requirements:
|
108
|
-
- -
|
95
|
+
- - '>='
|
109
96
|
- !ruby/object:Gem::Version
|
110
97
|
version: '0'
|
111
|
-
description:
|
98
|
+
description: " Request log analyzer's purpose is to find out how your web application
|
112
99
|
is being used, how it performs and to\n focus your optimization efforts. This
|
113
100
|
tool will parse all requests in the application's log file and aggregate the \n
|
114
101
|
\ information. Once it is finished parsing the log file(s), it will show the requests
|
@@ -278,9 +265,10 @@ files:
|
|
278
265
|
- spec/unit/tracker/tracker_api_spec.rb
|
279
266
|
- spec/unit/tracker/traffic_tracker_spec.rb
|
280
267
|
- tasks/request_log_analyzer.rake
|
281
|
-
homepage: http://
|
268
|
+
homepage: http://www.request-log-analyzer.com
|
282
269
|
licenses:
|
283
270
|
- MIT
|
271
|
+
metadata: {}
|
284
272
|
post_install_message:
|
285
273
|
rdoc_options:
|
286
274
|
- --title
|
@@ -292,30 +280,22 @@ rdoc_options:
|
|
292
280
|
require_paths:
|
293
281
|
- lib
|
294
282
|
required_ruby_version: !ruby/object:Gem::Requirement
|
295
|
-
none: false
|
296
283
|
requirements:
|
297
|
-
- -
|
284
|
+
- - '>='
|
298
285
|
- !ruby/object:Gem::Version
|
299
286
|
version: '0'
|
300
|
-
segments:
|
301
|
-
- 0
|
302
|
-
hash: -262165736928167385
|
303
287
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
304
|
-
none: false
|
305
288
|
requirements:
|
306
|
-
- -
|
289
|
+
- - '>='
|
307
290
|
- !ruby/object:Gem::Version
|
308
291
|
version: '0'
|
309
|
-
segments:
|
310
|
-
- 0
|
311
|
-
hash: -262165736928167385
|
312
292
|
requirements:
|
313
293
|
- To use the database inserter, ActiveRecord and an appropriate database adapter are
|
314
294
|
required.
|
315
295
|
rubyforge_project: r-l-a
|
316
|
-
rubygems_version:
|
296
|
+
rubygems_version: 2.2.0
|
317
297
|
signing_key:
|
318
|
-
specification_version:
|
298
|
+
specification_version: 4
|
319
299
|
summary: A command line tool to analyze request logs for Apache, Rails, Merb, MySQL
|
320
300
|
and other web application servers
|
321
301
|
test_files:
|