request-log-analyzer 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
data/lib/request_log_analyzer.rb
CHANGED
@@ -11,7 +11,7 @@ module RequestLogAnalyzer
|
|
11
11
|
|
12
12
|
# The current version of request-log-analyzer.
|
13
13
|
# This will be diplayed in output reports etc.
|
14
|
-
VERSION = "1.3.
|
14
|
+
VERSION = "1.3.4"
|
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.
|
@@ -29,6 +29,16 @@ module RequestLogAnalyzer::FileFormat
|
|
29
29
|
{ :name => :user_agent, :type => :user_agent }
|
30
30
|
end
|
31
31
|
|
32
|
+
report do |analyze|
|
33
|
+
analyze.timespan
|
34
|
+
analyze.hourly_spread
|
35
|
+
|
36
|
+
analyze.frequency :category => lambda { |r| "#{r[:bucket]}/#{r[:key]}"}, :amount => 20, :title => "Most popular items"
|
37
|
+
analyze.duration :duration => :total_time, :category => lambda { |r| "#{r[:bucket]}/#{r[:key]}"}, :amount => 20, :title => "Duration"
|
38
|
+
analyze.frequency :category => :http_status, :title => 'HTTP status codes'
|
39
|
+
analyze.frequency :category => :error_code, :title => 'Error codes'
|
40
|
+
end
|
41
|
+
|
32
42
|
class Request < RequestLogAnalyzer::Request
|
33
43
|
|
34
44
|
MONTHS = {'Jan' => '01', 'Feb' => '02', 'Mar' => '03', 'Apr' => '04', 'May' => '05', 'Jun' => '06',
|