File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -146,15 +146,15 @@ def stop
146146 # @parameter interval [Numeric] Seconds between samples.
147147 # @yields {|sample| ...} Called when a class shows significant growth.
148148 def run ( interval : 60 , &block )
149- start_time = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
150-
151149 while true
150+ start_time = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
151+
152152 sample! ( &block )
153153
154+ # Sleep for the remainder of the interval:
154155 now = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
155156 delta = interval - ( now - start_time )
156157 sleep ( delta ) if delta > 0
157- start_time = now
158158 end
159159 end
160160
Original file line number Diff line number Diff line change 11# Releases
22
3+ ## Unreleased
4+
5+ - Fix sampler loop interval handling.
6+
37## v1.1.12
48
59 - Use ` rb_obj_id ` for tracking object states to avoid compaction issues.
You can’t perform that action at this time.
0 commit comments