Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

spec fix again.

  • Loading branch information...
commit 7fcb2f91abfa5544a25fa405953ce2b24f108c2a 1 parent 77d37db
@wakemaster39 authored
View
6 lib/request_log_analyzer/file_format/rails3.rb
@@ -43,12 +43,14 @@ class Rails3 < Base
line_definition :completed do |line|
line.footer = true
line.teaser = /Completed /
- line.regexp = /Completed (\d+)? .*in (\d+(?:\.\d+)?)ms(?:[^\(]*\(Views: (\d+(?:\.\d+)?)ms .* ActiveRecord: (\d+(?:\.\d+)?)ms.*\))?/
+ line.regexp = /Completed (\d+)? .*in (\d+(?:\.\d+)?)ms(?:[^\(]*\(Views: (\d+(?:\.\d+)?)ms .* ActiveRecord: (\d+(?:\.\d+)?)ms(?: .* Solr: (\d+(?:\.\d+)?)ms)?(?: .* Redis: (\d+(?:\.\d+)?)ms)?.*\))?/
line.capture(:status).as(:integer)
line.capture(:duration).as(:duration, :unit => :msec)
line.capture(:view).as(:duration, :unit => :msec)
line.capture(:db).as(:duration, :unit => :msec)
+ line.capture(:solr).as(:duration, :unit => :msec)
+ line.capture(:redis).as(:duration, :unit => :msec)
end
# ActionView::Template::Error (undefined local variable or method `field' for #<Class>) on line #3 of /Users/willem/Code/warehouse/app/views/queries/execute.csv.erb:
@@ -82,6 +84,8 @@ class Rails3 < Base
analyze.duration :duration, :category => REQUEST_CATEGORIZER, :title => "Request duration", :line_type => :completed
analyze.duration :view, :category => REQUEST_CATEGORIZER, :title => "View rendering time", :line_type => :completed
analyze.duration :db, :category => REQUEST_CATEGORIZER, :title => "Database time", :line_type => :completed
+ analyze.duration :solr, :category => REQUEST_CATEGORIZER, :title => "Solr time", :line_type => :completed
+ analyze.duration :redis, :category => REQUEST_CATEGORIZER, :title => "Redis time", :line_type => :completed
analyze.frequency :category => REQUEST_CATEGORIZER, :title => 'Process blockers (> 1 sec duration)',
:if => lambda { |request| request[:duration] && request[:duration] > 1.0 }
View
2  spec/unit/database/base_class_spec.rb
@@ -106,7 +106,7 @@
end
it "should create the :belongs_to relation to the source class" do
- @klass.should_receive(:belongs_to).with(:source, {:class_name=>"RequestLogAnalyzer::Database::Request"})
+ @klass.should_receive(:belongs_to).with(:source, {:class_name=>"RequestLogAnalyzer::Database::Source"})
RequestLogAnalyzer::Database::Base.subclass_from_table('completed_lines')
end
Please sign in to comment.
Something went wrong with that request. Please try again.