[前][次][番号順一覧][スレッド一覧]

ruby-changes:61027

From: Nobuyoshi <ko1@a...>
Date: Thu, 7 May 2020 05:23:05 +0900 (JST)
Subject: [ruby-changes:61027] 01e0e4c473 (master): Cut down warm-up loops and gain main/warm-up ratio

https://git.ruby-lang.org/ruby.git/commit/?id=01e0e4c473

From 01e0e4c4732b2019166a45b21fbf2b400554e403 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 7 May 2020 02:51:58 +0900
Subject: Cut down warm-up loops and gain main/warm-up ratio


diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index 569b888..ff246f1 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -525,10 +525,12 @@ class TestSymbol < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_symbol.rb#L525
 
   def test_symbol_fstr_leak
     bug10686 = '[ruby-core:67268] [Bug #10686]'
-    x = x = 0
-    assert_no_memory_leak([], '200_000.times { |i| i.to_s.to_sym }; GC.start', "#{<<-"begin;"}\n#{<<-"end;"}", bug10686, limit: 1.71, rss: true, timeout: 20)
+    assert_no_memory_leak([], "#{<<~"begin;"}\n#{<<~'else;'}", "#{<<~'end;'}", bug10686, limit: 1.71, rss: true, timeout: 20)
     begin;
-      200_000.times { |i| (i + 200_000).to_s.to_sym }
+      n = 100_000
+      n.times { |i| i.to_s.to_sym }
+    else;
+      (2 * n).times { |i| (i + n).to_s.to_sym }
     end;
   end
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]