ruby-changes:30095
From: ko1 <ko1@a...>
Date: Wed, 24 Jul 2013 08:08:59 +0900 (JST)
Subject: [ruby-changes:30095] ko1:r42147 (trunk): * test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to count
ko1 2013-07-24 08:08:48 +0900 (Wed, 24 Jul 2013) New Revision: 42147 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42147 Log: * test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to count GC events strictly. Modified files: trunk/ChangeLog trunk/test/-ext-/tracepoint/test_tracepoint.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 42146) +++ ChangeLog (revision 42147) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Jul 24 08:04:49 2013 Koichi Sasada <ko1@a...> + + * 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@r...> * ext/openssl/extconf.rb (CRYPTO_THREADID): check exist or not. Index: test/-ext-/tracepoint/test_tracepoint.rb =================================================================== --- test/-ext-/tracepoint/test_tracepoint.rb (revision 42146) +++ test/-ext-/tracepoint/test_tracepoint.rb (revision 42147) @@ -25,11 +25,15 @@ class TestTracepointObj < Test::Unit::Te https://github.com/ruby/ruby/blob/trunk/test/-ext-/tracepoint/test_tracepoint.rb#L25 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/