datacite / lupo

DataCite REST API
https://api.datacite.org
MIT License
12 stars 8 forks source link

Reduce runtime of ability_spec.rb #1243

Closed jrhoads closed 2 months ago

jrhoads commented 2 months ago

ability_spec.rb has been identified in https://github.com/datacite/lupo/issues/1241 as one of the specs that is taking the most overall clock time. Which has the knock-on effect of slowing the overall test suite down. Let's see if we can reduce the runtime of this spec.

Within the test suite it was identified (using the --profile parameter) as having a clock time of 1524.22 seconds or ~25.5 minutes when run in a local dev environment as part of the parallel test suite 0 of 10.

jrhoads commented 2 months ago

Just running ability_spec.rb by itself in a local dev environment the clock time was 21 Minutes 11 seconds

run with rsepc spec/models/ability_spec.rb

jrhoads commented 2 months ago

We were able to reduce the total clock time from 21 minutes down to 10 seconds in a local dev environment.

Roughly a 12500% speed up.