perf: task template to measure memory leaks

This commit is contained in:
Colin Darie 2024-01-16 19:13:40 +01:00
parent f2bc88d5c0
commit b8fdbff110
No known key found for this signature in database
GPG key ID: 8C76CADD40253590

View file

@ -131,4 +131,15 @@ namespace :benchmarks do
x.compare! x.compare!
end end
end end
desc "Inspect possible memory leaks"
task inspect_memory_leak: :environment do
10.times do
10_000.times do
# Write code here
end
puts `ps -o rss= -p #{$$}`
end
end
end end