mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Cut down warm-up loops and gain main/warm-up ratio
This commit is contained in:
parent
eb0125957b
commit
01e0e4c473
1 changed files with 5 additions and 3 deletions
|
@ -525,10 +525,12 @@ class TestSymbol < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_symbol_fstr_leak
|
def test_symbol_fstr_leak
|
||||||
bug10686 = '[ruby-core:67268] [Bug #10686]'
|
bug10686 = '[ruby-core:67268] [Bug #10686]'
|
||||||
x = x = 0
|
assert_no_memory_leak([], "#{<<~"begin;"}\n#{<<~'else;'}", "#{<<~'end;'}", bug10686, limit: 1.71, rss: true, timeout: 20)
|
||||||
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)
|
|
||||||
begin;
|
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;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue