benchmark.rb in ob64-0.2.0 vs benchmark.rb in ob64-0.3.0
- old
+ new
@@ -2,12 +2,12 @@
require "securerandom"
require "ob64"
require "base64"
-$run_encode_benchmark = false
-$run_decode_benchmark = false
-$run_urlsafe_encode_benchmark = false
+$run_encode_benchmark = true
+$run_decode_benchmark = true
+$run_urlsafe_encode_benchmark = true
$run_urlsafe_decode_benchmark = true
def to_size(bytes)
bytes >= 2**20 ? "#{bytes / 2**20} MB" : "#{bytes / 2**10} kB"
end