module PerfTools::SchedulerTrace

Defined in:

perf_tools/scheduler_trace.cr

Class Method Summary

Class Method Detail

def self.every(interval : Time::Span, details = false) : Nil #

Starts a thread that will call .print_runtime_status on every interval until the program terminates.

Set details to true to print individual fiber details.


[View source]
def self.on(signal : Signal, details : Bool = true) : Nil #

Installs a signal handler to call .print_runtime_status on demand.

You can use Signal::USR1 or another Signal. You must be careful not to reuse the signals used by the GC to stop or resume the world (see GC.sig_suspend and GC.sig_resume) that uses different signals depending on the target and configuration.

Set details to false to skip individual fiber details.


[View source]
def self.print_runtime_status(details = false) : Nil #

Stops the world, prints the status of all runtime schedulers to the standard error, then resumes the world.

Set details to true to print individual fiber details.


[View source]