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)
29 a = create_eight root.uuid
47 puts "Time spent getting group index:"
49 puts(Benchmark.measure do
50 get '/arvados/v1/groups', {format: :json, limit: 1000}, auth(:permission_perftest)
51 assert json_response['items_available'] >= n