mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 20:01:14 +08:00
playing with my script, feel free to ignore
This commit is contained in:
@ -2,9 +2,18 @@
|
|||||||
#
|
#
|
||||||
require 'objspace'
|
require 'objspace'
|
||||||
require 'benchmark'
|
require 'benchmark'
|
||||||
require 'ruby-prof'
|
# require 'ruby-prof'
|
||||||
|
|
||||||
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
require 'memory_profiler'
|
||||||
|
|
||||||
|
|
||||||
|
result = MemoryProfiler.report do
|
||||||
|
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
|
||||||
|
# require 'ruby-prof'
|
||||||
|
end
|
||||||
|
result.pretty_print
|
||||||
|
|
||||||
|
exit
|
||||||
|
|
||||||
|
|
||||||
def profile_allocations(name)
|
def profile_allocations(name)
|
||||||
|
Reference in New Issue
Block a user