From e73f8713812b912b3b0244e99b6a18b9422a2d4d Mon Sep 17 00:00:00 2001 From: Sanad Liaquat Date: Fri, 15 Mar 2019 11:52:39 +0500 Subject: Add Load testing script for artillery.io Also add rake tasks that makes use of existing performance data genertion task. --- app/controllers/groups_controller.rb | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) (limited to 'app/controllers/groups_controller.rb') diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 0192b1c253e..4e50106398a 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -58,24 +58,11 @@ class GroupsController < Groups::ApplicationController def show respond_to do |format| - format.html do - render_show_html - end - - format.atom do - render_details_view_atom - end - end - end - - def details - respond_to do |format| - format.html do - render_details_html - end + format.html format.atom do - render_details_view_atom + load_events + render layout: 'xml.atom' end end end @@ -132,19 +119,6 @@ class GroupsController < Groups::ApplicationController protected - def render_show_html - render 'groups/show' - end - - def render_details_html - render 'groups/show' - end - - def render_details_view_atom - load_events - render layout: 'xml.atom', template: 'groups/show' - end - # rubocop: disable CodeReuse/ActiveRecord def authorize_create_group! allowed = if params[:parent_id].present? @@ -204,8 +178,8 @@ class GroupsController < Groups::ApplicationController .includes(:namespace) @events = EventCollection - .new(@projects, offset: params[:offset].to_i, filter: event_filter) - .to_a + .new(@projects, offset: params[:offset].to_i, filter: event_filter) + .to_a Events::RenderService .new(current_user) -- cgit v1.2.1