Skip to content

Commit 4123f2f

Browse files
author
Shizuo Fujita
committed
benchmark: Use IO#size instead of File.size to speed up file generation
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
1 parent b819ccf commit 4123f2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tasks/benchmark.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
loop do
1919
f.puts data
20-
break if File.size(BENCHMARK_FILE_PATH) > BENCHMARK_FILE_SIZE
20+
break if f.size > BENCHMARK_FILE_SIZE
2121
end
2222
end
2323
end

0 commit comments

Comments
 (0)