Sha256: 18fde51964ae56ccd24231056d86e1101b0613a2dbd44279e686f9c081436e79

Contents?: true

Size: 454 Bytes

Versions: 2

Compression:

Stored size: 454 Bytes

Contents

# frozen_string_literal: true
require File.dirname(__FILE__) + "/../lib/yard"
require "benchmark"
include YARD::CLI

class YARD::CLI::YRI
  def print_object(object) end
end

def remove_cache
  File.unlink(YRI::CACHE_FILE)
end

TIMES = 10
NAME = 'YARD'
remove_cache; YRI.run(NAME)
Benchmark.bmbm do |x|
  x.report("cache   ") { TIMES.times { YRI.run(NAME) } }
  x.report("no-cache") { TIMES.times { remove_cache; YRI.run(NAME) } }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yard-0.9.18 benchmarks/yri_cache.rb
yard-0.9.17 benchmarks/yri_cache.rb