mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to count
GC events strictly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
182cf90d30
commit
e93e38d165
2 changed files with 9 additions and 0 deletions
|
|
@ -25,11 +25,15 @@ class TestTracepointObj < Test::Unit::TestCase
|
|||
|
||||
stat1 = {}
|
||||
stat2 = {}
|
||||
GC.disable
|
||||
GC.stat(stat1)
|
||||
result = Bug.tracepoint_track_objspace_events{
|
||||
GC.enable
|
||||
1_000_000.times{''}
|
||||
GC.disable
|
||||
}
|
||||
GC.stat(stat2)
|
||||
GC.enable
|
||||
|
||||
newobj_count, free_count, gc_start_count, gc_end_count, *newobjs = *result
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue