summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-23 23:08:48 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-23 23:08:48 +0000
commite93e38d165f510aefb541235491347bb69a80d62 (patch)
treea2edfd9824d3d3da9fd07c05c2f099c7027ffff8 /test/-ext-
parent182cf90d30f1319f094adcf4c37ea8921c348453 (diff)
* 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
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/tracepoint/test_tracepoint.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/-ext-/tracepoint/test_tracepoint.rb b/test/-ext-/tracepoint/test_tracepoint.rb
index efbf40b..7d07977 100644
--- a/test/-ext-/tracepoint/test_tracepoint.rb
+++ b/test/-ext-/tracepoint/test_tracepoint.rb
@@ -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