6369c992a6
This benchmark currently runs at ~0.6 iterations per second and is unlikely to perform any better any time soon.
28 lines
731 B
Ruby
28 lines
731 B
Ruby
require 'spec_helper'
|
|
|
|
describe Projects::CreateService, benchmark: true do
|
|
describe '#execute' do
|
|
let(:user) { create(:user, :admin) }
|
|
|
|
let(:group) do
|
|
group = create(:group)
|
|
|
|
create(:group_member, group: group, user: user)
|
|
|
|
group
|
|
end
|
|
|
|
benchmark_subject do
|
|
name = SecureRandom.hex
|
|
service = described_class.new(user,
|
|
name: name,
|
|
path: name,
|
|
namespace_id: group.id,
|
|
visibility_level: Gitlab::VisibilityLevel::PUBLIC)
|
|
|
|
service.execute
|
|
end
|
|
|
|
it { is_expected.to iterate_per_second(0.5) }
|
|
end
|
|
end
|