X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f2834f4447a9b9b601c0b4f49434a77f9f054e50..6d95130da47af9fd0290d3c8f80a0364faf74957:/services/api/test/performance/links_index_test.rb diff --git a/services/api/test/performance/links_index_test.rb b/services/api/test/performance/links_index_test.rb index a183a9014e..092c01fe12 100644 --- a/services/api/test/performance/links_index_test.rb +++ b/services/api/test/performance/links_index_test.rb @@ -1,14 +1,32 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require 'test_helper' -require 'rails/performance_test_help' +require 'benchmark' -class IndexTest < ActionDispatch::PerformanceTest +class IndexTest < ActionDispatch::IntegrationTest def test_links_index - get '/arvados/v1/links', {format: :json}, auth(:admin) + puts("Get links index: ", Benchmark.measure do + get '/arvados/v1/links', params: { + limit: 1000, + format: :json + }, headers: auth(:admin) + end) end def test_links_index_with_filters - get '/arvados/v1/links', {format: :json, filters: [%w[head_uuid is_a arvados#collection]].to_json}, auth(:admin) + puts("Get links index with filters: ", Benchmark.measure do + get '/arvados/v1/links', params: { + format: :json, + filters: [%w[head_uuid is_a arvados#collection]].to_json + }, headers: auth(:admin) + end) end def test_collections_index - get '/arvados/v1/collections', {format: :json}, auth(:admin) + puts("Get collections index: ", Benchmark.measure do + get '/arvados/v1/collections', params: { + format: :json + }, headers: auth(:admin) + end) end end