File: parsing.rb

package info (click to toggle)
yard 0.8.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,056 kB
  • ctags: 2,621
  • sloc: ruby: 27,074; makefile: 18
file content (46 lines) | stat: -rw-r--r-- 1,545 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require "benchmark"
require 'yard'
require 'logger'

PATH_ORDER = [
  'lib/yard/autoload.rb',
  'lib/yard/code_objects/base.rb',
  'lib/yard/code_objects/namespace_object.rb',
  'lib/yard/handlers/base.rb',
  'lib/yard/generators/helpers/*.rb',
  'lib/yard/generators/base.rb',
  'lib/yard/generators/method_listing_generator.rb',
  'lib/yard/serializers/base.rb',
  'lib/**/*.rb'
]

Benchmark.bmbm do |x|
  x.report("parse in order") { YARD::Registry.clear; YARD.parse PATH_ORDER, [], Logger::ERROR }
  x.report("parse") { YARD::Registry.clear; YARD.parse 'lib/**/*.rb', [], Logger::ERROR }
end

=begin
load_order branch (2008-06-07):

Rehearsal --------------------------------------------------
parse in order   6.510000   0.050000   6.560000 (  6.563223)
parse            6.300000   0.040000   6.340000 (  6.362272)
---------------------------------------- total: 12.900000sec

                     user     system      total        real
parse in order   6.310000   0.060000   6.370000 (  6.390945)
parse            6.300000   0.050000   6.350000 (  6.366709)


api_changes branch before merge (2008-06-07)

Rehearsal --------------------------------------------------
parse in order   6.330000   0.050000   6.380000 (  6.397552)
parse            6.380000   0.050000   6.430000 (  6.446954)
---------------------------------------- total: 12.810000sec

                     user     system      total        real
parse in order   6.320000   0.040000   6.360000 (  6.394460)
parse            6.040000   0.040000   6.080000 (  6.099738)
=end