mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-20 04:11:08 -05:00
Memory optimization
This commit is contained in:
203945
spec/data/0xabad1dea.json
Normal file
203945
spec/data/0xabad1dea.json
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,8 +1,14 @@
|
||||
require 'spec_helper'
|
||||
require 'objspace'
|
||||
require 'memory_profiler'
|
||||
|
||||
describe Ebooks::Model do
|
||||
it "does stuff" do
|
||||
model = Ebooks::Model.load(path("data/0xabad1dea.model"))
|
||||
it "does not use a ridiculous amount of memory" do
|
||||
RubyProf.start
|
||||
Ebooks::Model.consume(path("data/0xabad1dea.json"))
|
||||
result = RubyProf.stop
|
||||
|
||||
require 'pry'; binding.pry
|
||||
|
||||
expect(report.total_retained).to be < 100000
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user