Disable GC before doing performance test
This commit is contained in:
parent
80bd8b983c
commit
fbb9db5201
@ -4,6 +4,9 @@ describe FastJsonapi::ObjectSerializer, performance: true do
|
|||||||
include_context 'movie class'
|
include_context 'movie class'
|
||||||
include_context 'ams movie class'
|
include_context 'ams movie class'
|
||||||
|
|
||||||
|
before(:all) { GC.disable }
|
||||||
|
after(:all) { GC.enable }
|
||||||
|
|
||||||
context 'when testing performance of serialization' do
|
context 'when testing performance of serialization' do
|
||||||
it 'should create a hash of 1000 records in less than 50 ms' do
|
it 'should create a hash of 1000 records in less than 50 ms' do
|
||||||
movies = 1000.times.map { |_i| movie }
|
movies = 1000.times.map { |_i| movie }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user