File: 1_group_1000_examples.rb

package info (click to toggle)
ruby-rspec 3.12.0c0e1m1s0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,752 kB
  • sloc: ruby: 69,818; sh: 1,861; makefile: 99
file content (63 lines) | stat: -rw-r--r-- 2,379 bytes parent folder | download | duplicates (6)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
require_relative "helper"

benchmark_allocations do
  RSpec.describe "one example group" do
    1000.times do |i|
      example "example #{i}" do
      end
    end
  end
end

__END__

Original stats:

               class_plus                 count
----------------------------------------  -----
String                                    22046
Hash                                       3006
Array<String>                              3002
Proc                                       2007
RubyVM::Env                                2007
Array                                      1013
Regexp                                     1001
RSpec::Core::Example::ExecutionResult      1001
Array<String,Fixnum>                       1001
RSpec::Core::Example                       1000
RSpec::Core::Metadata::ExampleHash         1000
RSpec::Core::Hooks::HookCollection            6
MatchData                                     4
Array<Module>                                 2
Module                                        2
RSpec::Core::Metadata::ExampleGroupHash       1
RSpec::Core::Hooks::AroundHookCollection      1
Class                                         1
Array<Hash>                                   1
RSpec::Core::Hooks::HookCollections           1
Array<RSpec::Core::Example>                   1

After my fixes:

               class_plus                 count
----------------------------------------  -----
String                                     6030
Hash                                       3006
Array<String>                              3002
RubyVM::Env                                2007
Proc                                       2007
Array                                      1013
RSpec::Core::Example::ExecutionResult      1001
Array<String,Fixnum>                       1001
RSpec::Core::Metadata::ExampleHash         1000
RSpec::Core::Example                       1000
RSpec::Core::Hooks::HookCollection            6
MatchData                                     4
Module                                        2
Array<Module>                                 2
RSpec::Core::Hooks::HookCollections           1
Array<RSpec::Core::Example>                   1
RSpec::Core::Hooks::AroundHookCollection      1
RSpec::Core::Metadata::ExampleGroupHash       1
Class                                         1
Array<Hash>                                   1