Search
Project
General
Profile
Home
Projects
Help
Sign in
Register
Search
:
Ruby
All Projects
Ruby
Overview
Activity
Roadmap
Issues
Repository
Download (506 Bytes)
Bug #22487
» repro.rb
watson1978 (Shizuo Fujita)
, 10/29/2026 08:56 AM
rss
=
->
(
key
)
{
File
.
read
(
"/proc/self/status"
)[
/^
#{
key
}
:\s+(\d+)/
,
1
].
to_i
/
1024
}
total_gib
=
Integer
(
ARGV
[
0
]
||
1
)
GC
.
start
before
=
rss
.
(
"VmRSS"
)
gaps
=
[]
since
=
0
last
=
GC
.
count
(
total_gib
*
1024
).
times
do
String
.
new
(
capacity:
1
<<
20
)
<<
"x"
since
+=
1
next
if
GC
.
count
==
last
gaps
<<
since
since
=
0
last
=
GC
.
count
end
puts
"
#{
RUBY_DESCRIPTION
}
"
puts
"
#{
total_gib
}
GiB:
#{
gaps
.
size
}
GCs, peak RSS +
#{
rss
.
(
"VmHWM"
)
-
before
}
MiB"
puts
"MiB allocated between GCs:
#{
gaps
.
inspect
}
"
« Previous
1
2
3
4
Next »
(3-3/4)
Loading...