Skip to content

Commit 78631d6

Browse files
committed
Bench the given path
1 parent 2d1e9e0 commit 78631d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/bench

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require "benchmark"
77
$:.unshift(File.expand_path("../lib", __dir__))
88
require "syntax_tree/prism"
99

10-
filepaths = Dir[File.expand_path("../../rails/rails/activerecord/**/*.rb")]
10+
filepaths = Dir[ARGV.first]
1111
puts "Formatting #{filepaths.length} files"
1212

1313
Benchmark.bmbm do |x|

bin/profile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require "vernier"
77
$:.unshift(File.expand_path("../lib", __dir__))
88
require "syntax_tree/prism"
99

10-
results = Dir[File.expand_path("../../rails/rails/activerecord/**/*.rb")].map { |filepath| Prism.parse_file(filepath) }
10+
results = Dir[ARGV.first].map { |filepath| Prism.parse_file(filepath) }
1111
puts "Profiling #{results.length} files"
1212

1313
Vernier.trace(out: "profile.json") { results.each(&:format) }

0 commit comments

Comments
 (0)