Class: RailsBenchmarkWithActiveRecordStore
- Inherits:
-
RailsBenchmark
- Object
- RailsBenchmark
- RailsBenchmarkWithActiveRecordStore
- Defined in:
- lib/railsbench/railsbenchmark.rb
Instance Attribute Summary
Attributes inherited from RailsBenchmark
#cache_template_loading, #cookie_data, #gc_frequency, #http_host, #iterations, #perform_caching, #relative_url_root, #remote_addr, #server_port, #session_data, #session_key
Instance Method Summary collapse
- #delete_new_test_sessions ⇒ Object
-
#initialize(options = {}) ⇒ RailsBenchmarkWithActiveRecordStore
constructor
A new instance of RailsBenchmarkWithActiveRecordStore.
Methods inherited from RailsBenchmark
#before_dispatch_hook, #cookie, #delete_test_session, #error_exit, #escape_data, #establish_test_session, #patched_gc?, #run_url_mix, #run_urls, #run_urls_without_benchmark, #setup_initial_env, #setup_request_env, #setup_test_urls, #update_test_session_data, #warmup
Constructor Details
#initialize(options = {}) ⇒ RailsBenchmarkWithActiveRecordStore
Returns a new instance of RailsBenchmarkWithActiveRecordStore.
550 551 552 553 |
# File 'lib/railsbench/railsbenchmark.rb', line 550 def initialize(={}) super() @session_class = ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager].session_class rescue CGI::Session::ActiveRecordStore rescue ActiveRecord::SessionStore end |
Instance Method Details
#delete_new_test_sessions ⇒ Object
555 556 557 |
# File 'lib/railsbench/railsbenchmark.rb', line 555 def delete_new_test_sessions @session_class.delete_all if @session_class.respond_to?(:delete_all) end |