ActiveSupport doesn't seem to think its profiling code is compatible
with Ruby 2.1, but it seems to work if you patch up a version check in
activesupport:
.../activesupport-3.2.17/lib/active_support/testing/performance/ruby.rb
-if RUBY_VERSION.between?('1.9.2', '2.0.0')
+if RUBY_VERSION.between?('1.9.2', '3.0.0')
group :test, :development do
gem 'factory_girl_rails'
gem 'database_cleaner'
+ gem 'ruby-prof'
# Note: "require: false" here tells bunder not to automatically
# 'require' the packages during application startup. Installation is
# still mandatory.
rdoc (3.12.2)
json (~> 1.4)
ref (1.0.5)
+ ruby-prof (0.15.2)
rvm-capistrano (1.5.1)
capistrano (~> 2.15.4)
sass (3.3.4)
pg_power
puma
rails (~> 3.2.0)
+ ruby-prof
rvm-capistrano
sass-rails (>= 3.2.0)
simplecov (~> 0.7.1)
+++ /dev/null
-require 'test_helper'
-require 'rails/performance_test_help'
-
-class BrowsingTest < ActionDispatch::PerformanceTest
- # Refer to the documentation for all available options
- # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
- # :output => 'tmp/performance', :formats => [:flat] }
-
- def test_homepage
- get '/'
- end
-end
--- /dev/null
+require 'test_helper'
+require 'rails/performance_test_help'
+
+class IndexTest < ActionDispatch::PerformanceTest
+ def test_links_index
+ get '/arvados/v1/links', {format: :json}, auth(:admin)
+ 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)
+ end
+ def test_collections_index
+ get '/arvados/v1/collections', {format: :json}, auth(:admin)
+ end
+end