Turning off durability settings in PostgreSQL in CI appears to improve specs by 16%.
Using the API data, the 50 rspec-pg success test runs between master
and this branch:
- https://gitlab.com/api/v4/projects/13083/pipelines/56541883/jobs?per_page=100
- https://gitlab.com/api/v4/projects/13083/pipelines/56462614/jobs?per_page=100
Total before | Total after | Delta | % Speedup |
---|---|---|---|
70836 s (19.7 hours) | 59652 s (16.6 hours) | 11184 s (3.1 hours) | 16 |
require 'json'
def select_pg_jobs(filename)
jobs = JSON.parse(File.read(filename))
jobs.select { |x| x['name'].start_with?('rspec-pg ') && x['status'] == 'success' }
end
master = select_pg_jobs('master.json')
fsync = select_pg_jobs('no-fsync.json')
puts master.map { |x| x['duration'] }.sum
puts fsync.map { |x| x['duration'] }.sum