Class: Solidstats::PerformanceController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Solidstats::PerformanceController
- Defined in:
- app/controllers/solidstats/performance_controller.rb
Instance Method Summary collapse
Instance Method Details
#load_lens ⇒ Object
7 8 9 10 11 |
# File 'app/controllers/solidstats/performance_controller.rb', line 7 def load_lens @performance_data = LoadLensService.get_performance_data @metrics = @performance_data[:summary] || {} @recent_requests = @performance_data[:recent_requests] || [] end |
#refresh ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/solidstats/performance_controller.rb', line 13 def refresh # Parse new log entries and refresh cache parse_result = LoadLensService.parse_log_and_save LoadLensService.refresh_data if parse_result[:success] redirect_to load_lens_performance_index_path, notice: "LoadLens data refreshed! Parsed #{parse_result[:processed]} new requests." else redirect_to load_lens_performance_index_path, alert: "Failed to parse logs: #{parse_result[:error]}" end end |