X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b193c49962deb916893e1ecb0ab04df8b00e3d7a..91dc5f1d7f5ad9eb2640f6089e2d0476cbf87c8e:/services/api/test/integration/collections_performance_test.rb diff --git a/services/api/test/integration/collections_performance_test.rb b/services/api/test/integration/collections_performance_test.rb index 892060a199..a952c202cb 100644 --- a/services/api/test/integration/collections_performance_test.rb +++ b/services/api/test/integration/collections_performance_test.rb @@ -6,6 +6,7 @@ class CollectionsApiPerformanceTest < ActionDispatch::IntegrationTest include ManifestExamples test "crud cycle for a collection with a big manifest" do + slow_test bigmanifest = time_block 'make example' do make_manifest(streams: 100, files_per_stream: 100, @@ -14,7 +15,7 @@ class CollectionsApiPerformanceTest < ActionDispatch::IntegrationTest api_token: api_token(:active)) end json = time_block "JSON encode #{bigmanifest.length>>20}MiB manifest" do - Oj.dump({manifest_text: bigmanifest}) + Oj.dump({"manifest_text" => bigmanifest}) end time_block 'create' do post '/arvados/v1/collections', {collection: json}, auth(:active) @@ -37,4 +38,19 @@ class CollectionsApiPerformanceTest < ActionDispatch::IntegrationTest delete '/arvados/v1/collections/' + uuid, {}, auth(:active) end end + + test "memory usage" do + slow_test + hugemanifest = make_manifest(streams: 1, + files_per_stream: 2000, + blocks_per_file: 200, + bytes_per_block: 2**26, + api_token: api_token(:active)) + json = time_block "JSON encode #{hugemanifest.length>>20}MiB manifest" do + Oj.dump({manifest_text: hugemanifest}) + end + vmpeak "post" do + post '/arvados/v1/collections', {collection: json}, auth(:active) + end + end end