Rbkit API

start_server

Rbkit starts a Server where clients can connect to and receive profiling data. Rbkit server can be started without starting profiling and in this mode, Rbkit adds zero overhead to the application being profiled. A client can easily connect to such a Ruby app and start the profling whenever required.

Rbkit.start_server(pub_port: nil, request_port: nil)

If no values or nil is specified for pub_port and request_port, Rbkit will use 5555 and 5556 ports for these services.

start_profiling

By default above method starts Rbkit server on ports 5555 and 5556 and enables object trace on the application being profiled. For most applications, this should be enough and desired way of using Rbkit.

Rbkit.start_profiling(
  pub_port: nil,
  request_port: nil,
  enable_object_trace: true,
  enable_gc_stats: true
)

Arguments:

argumentvalid valuesdefault valuedescription
pub_portnil, fixnumnilOverride default message publishing port of 5555
request_portnil, fixnumnilOverride default command listener port of 5556
enable_object_tracetrue/falsetrueEnables object creation/deletion events
enable_gc_statstrue/falsetrueEnables GC stats which is sent every 5 seconds