19675: Merge branch '19675-instance-types-panel' from arvados-workbench2.git
[arvados.git] / services / api / test / performance / links_index_test.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require 'test_helper'
6 require 'benchmark'
7
8 class IndexTest < ActionDispatch::IntegrationTest
9   def test_links_index
10     puts("Get links index: ", Benchmark.measure do
11       get '/arvados/v1/links', params: {
12         limit: 1000,
13         format: :json
14       }, headers: auth(:admin)
15     end)
16   end
17   def test_links_index_with_filters
18     puts("Get links index with filters: ", Benchmark.measure do
19       get '/arvados/v1/links', params: {
20         format: :json,
21         filters: [%w[head_uuid is_a arvados#collection]].to_json
22       }, headers: auth(:admin)
23     end)
24   end
25   def test_collections_index
26     puts("Get collections index: ", Benchmark.measure do
27       get '/arvados/v1/collections', params: {
28         format: :json
29         }, headers: auth(:admin)
30       end)
31   end
32 end