Sha256: 635df98b89429b7a3e74f5b38ae1500132418a60863736cb199b31b82c0ed3ed
Contents?: true
Size: 616 Bytes
Versions: 7
Compression:
Stored size: 616 Bytes
Contents
# encoding: UTF-8 require 'winrm-fs' require 'benchmark' def files # This is a fairly short list of small files, may also want a benchmark with larger files `git ls-files`.lines.map(&:strip) end def create_zip(factory, file) WinRM::FS::Core::TempZipFile.new(Dir.pwd, zip_file: file, via: factory, X: true) do | temp_zip | temp_zip.add(*files) end end Benchmark.bm do | benchmark | benchmark.report('zip cmd') { `git ls-files | zip zip_command.zip -X --names-stdin` } benchmark.report('shell') { create_zip(:shell, 'shell.zip') } benchmark.report('ruby') { create_zip(:rubyzip, 'ruby.zip') } end
Version data entries
7 entries across 7 versions & 3 rubygems