Sha256: f52cad1d861af1a1d480e1d6fc0939dbf68b7d4b0df81b5fd68dec1f92ff4377

Contents?: true

Size: 681 Bytes

Versions: 9

Compression:

Stored size: 681 Bytes

Contents

#!/usr/bin/env ratch

# Load check all libs.

#

require 'benchmark'

$:.unshift('lib')

scripts_core, scripts_more = [], []
Dir.chdir('lib') do
  scripts_more = glob('facets/*.rb')
  scripts_more.collect!{ |s| File.expand_path(s) }
  scripts_more.uniq!

  scripts_core = glob('facets/*/*.rb')
  scripts_core.collect!{ |s| File.expand_path(s) }
  scripts_core.uniq!
end

$VERBOSE = nil

def require_scripts(scripts)
  scripts.each do |file|
    begin
      require file
    rescue Exception => e
      puts file
      puts e.message
    end
  end
end

Benchmark.bm do |x|
  x.report("core"){ require_scripts(scripts_core) }
  x.report("more"){ require_scripts(scripts_more) }
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
facets-2.0.0 task/load
facets-2.0.1 task/load
facets-2.0.2 task/load
ratch-0.3.0 lib/ratch/toolset/ruby/test/load
ratch-0.4.0 lib/ratch/toolset/ruby/test/load
ratch-0.2.1 data/ratch/rubyproject/load
ratch-0.4.1 lib/ratch/toolset/ruby/test/load
ratch-0.2.2 data/ratch/rubyproject/load
ratch-0.2.3 lib/ratch/toolset/ruby/load