* 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:
ko1 2013-07-23 23:08:48 +00:00
parent 182cf90d30
commit e93e38d165
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Wed Jul 24 08:04:49 2013 Koichi Sasada <ko1@atdot.net>
* test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to count
GC events strictly.
Tue Jul 23 23:19:24 2013 NARUSE, Yui <naruse@ruby-lang.org>
* ext/openssl/extconf.rb (CRYPTO_THREADID): check exist or not.

View File

@ -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