1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
9 def create_eight parent
13 uuid = Group.generate_uuid
14 values.push "('#{uuid}', '#{parent}', now(), now(), '#{uuid}')"
17 ActiveRecord::Base.connection.execute("INSERT INTO groups (uuid, owner_uuid, created_at, updated_at, name) VALUES #{values.join ','}")
21 class PermissionPerfTest < ActionDispatch::IntegrationTest
25 puts("Time spent creating records:", Benchmark.measure do
26 ActiveRecord::Base.transaction do
27 root = Group.create!(owner_uuid: users(:permission_perftest).uuid, group_class: "project")
29 a = create_eight root.uuid
48 puts "Time spent getting group index:"
50 puts(Benchmark.measure do
51 get '/arvados/v1/groups', params: {format: :json}, headers: auth(:permission_perftest)
52 assert json_response['items_available'] >= n