From: Lucas Di Pentima Date: Thu, 4 Apr 2019 21:24:50 +0000 (-0300) Subject: 14873: Changes perftest with benchmark because of unidentified errors. X-Git-Tag: 1.4.0~74^2~7 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/1963cf522fe547dd88474f29d2263a7d98e99fea?ds=sidebyside 14873: Changes perftest with benchmark because of unidentified errors. Didn't want to dilate the migraton any longer because of this. If it's critical we could investigate further. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/services/api/test/performance/links_index_test.rb b/services/api/test/performance/links_index_test.rb index c3f9e9452f..092c01fe12 100644 --- a/services/api/test/performance/links_index_test.rb +++ b/services/api/test/performance/links_index_test.rb @@ -3,18 +3,30 @@ # 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', params: {format: :json}, headers: 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', - params: {format: :json, filters: [%w[head_uuid is_a arvados#collection]].to_json}, - headers: 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', params: {format: :json}, headers: auth(:admin) + puts("Get collections index: ", Benchmark.measure do + get '/arvados/v1/collections', params: { + format: :json + }, headers: auth(:admin) + end) end end