added support for ruby-prof, make trees jump to nearest vertex position.

This commit is contained in:
2018-07-08 14:39:57 -05:00
parent f21032935b
commit ded012a9e0
5 changed files with 21 additions and 5 deletions

View File

@@ -63,4 +63,18 @@ require_relative "lib/window"
MODEL_METER_SCALE = 0.001 # Objects exported from blender using the millimeter object scale will be close to 1 GL unit
IMICFPS::Window.new.show
if ARGV.join.include?("--profile")
begin
require "ruby-prof"
RubyProf.start
IMICFPS::Window.new.show
result = RubyProf.stop
printer = RubyProf::MultiPrinter.new(result)
printer.print(path: ".", profile: "profile", min_percent: 2)
rescue LoadError
puts "ruby-prof not installed!"
end
else
IMICFPS::Window.new.show
end