lib/smallcage/commands/update.rb in smallcage-0.1.4 vs lib/smallcage/commands/update.rb in smallcage-0.1.5

- old
+ new

@@ -7,22 +7,27 @@ def initialize(opts) @opts = opts end def execute + start = Time.now target = Pathname.new(@opts[:path]) unless target.exist? raise "target directory or file does not exist.: " + target.to_s end @loader = SmallCage::Loader.new(target) @renderer = SmallCage::Renderer.new(@loader) urilist = render_smc_files + rendered = urilist.length if list_file.exist? urilist = delete_expired_files(urilist) end save_list(urilist) + elapsed = Time.now - start + + puts "-- #{rendered} files. #{"%.3f" % elapsed} sec. #{"%.3f" % (elapsed/rendered)} sec/file." end def render_smc_files urilist = [] @loader.each_smc_obj do |obj|