Class: ClientperfController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ClientperfController
- Defined in:
- lib/clientperf_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
2 3 4 5 |
# File 'lib/clientperf_controller.rb', line 2 def index ClientperfUri.destroy_all ["updated_at < ?", 1.year.ago] @uris = ClientperfUri.find(:all, :include => :clientperf_results) end |
#measure ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/clientperf_controller.rb', line 12 def measure milliseconds = params[:e].to_i - params[:b].to_i rescue nil if milliseconds && params[:u] uri = ClientperfUri.find_or_create_by_uri(params[:u]) ClientperfResult.create(:milliseconds => milliseconds, :clientperf_uri => uri) end render :nothing => true end |
#show ⇒ Object
7 8 9 10 |
# File 'lib/clientperf_controller.rb', line 7 def show @uri = ClientperfUri.find(params[:id], :include => :clientperf_results) @page_title = @uri.uri end |