Skip to content

Commit e0e5213

Browse files
committed
Fix up bin/profile
1 parent 2276582 commit e0e5213

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/profile

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
require "bundler/setup"
55
require "stackprof"
66

7-
filepath = File.expand_path("../lib/syntax_tree", __dir__)
8-
require_relative filepath
7+
$:.unshift(File.expand_path("../lib", __dir__))
8+
require "syntax_tree"
99

1010
GC.disable
1111

1212
StackProf.run(mode: :cpu, out: "tmp/profile.dump", raw: true) do
13-
SyntaxTree.format(File.read("#{filepath}.rb"))
13+
filepath = File.expand_path("../lib/syntax_tree/node.rb", __dir__)
14+
SyntaxTree.format(File.read(filepath))
1415
end
1516

1617
GC.enable

0 commit comments

Comments
 (0)