{"_id":"54b8f06d5d85c00c00e035d0","project":"54345d5e0e8e2b0e003416d5","version":{"_id":"54b8f06c5d85c00c00e035cb","forked_from":"54b6d41b7379a90c00f53aec","__v":1,"project":"54345d5e0e8e2b0e003416d5","createdAt":"2015-01-16T11:05:16.490Z","releaseDate":"2015-01-16T11:05:16.490Z","categories":["54b8f06d5d85c00c00e035cc"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.1.10","version":"0.1.10"},"__v":0,"user":"54358f665e1b2020004381ba","category":{"_id":"54b8f06d5d85c00c00e035cc","project":"54345d5e0e8e2b0e003416d5","version":"54b8f06c5d85c00c00e035cb","__v":2,"pages":["54b8f06d5d85c00c00e035cd","54b8f06d5d85c00c00e035ce","54b8f06d5d85c00c00e035cf","54b8f06d5d85c00c00e035d0","54d1296a875f240d002cb7cc"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-07T21:38:38.308Z","from_sync":false,"order":9999,"slug":"documentation","title":"Documentation"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-01-08T19:10:43.246Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"## start_server\n\nRbkit 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.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Rbkit.start_server(pub_port: nil, request_port: nil)\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\nIf no values or nil is specified for `pub_port` and `request_port`, Rbkit will use `5555` and `5556`  ports for these services.\n\n#start_profiling\n\nBy 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. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Rbkit.start_profiling(\\n  pub_port: nil,\\n  request_port: nil,\\n  enable_object_trace: true,\\n  enable_gc_stats: true\\n)\\n\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\nArguments:\n\n|argument             | valid values | default value | description                                      |\n|---------------------|--------------|---------------|--------------------------------------------------|\n|pub_port             | nil, fixnum  | nil           | Override default message publishing port of 5555 |\n|request_port         | nil, fixnum  | nil           | Override default command listener port of 5556   |\n|enable_object_trace  | true/false   | true          | Enables object creation/deletion events          |\n|enable_gc_stats      | true/false   | true          | Enables GC stats which is sent every 5 seconds   |","excerpt":"","slug":"rbkit-api","type":"basic","title":"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. [block:code] { "codes": [ { "code": "Rbkit.start_server(pub_port: nil, request_port: nil)", "language": "ruby" } ] } [/block] 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. [block:code] { "codes": [ { "code": "Rbkit.start_profiling(\n pub_port: nil,\n request_port: nil,\n enable_object_trace: true,\n enable_gc_stats: true\n)\n", "language": "ruby" } ] } [/block] Arguments: |argument | valid values | default value | description | |---------------------|--------------|---------------|--------------------------------------------------| |pub_port | nil, fixnum | nil | Override default message publishing port of 5555 | |request_port | nil, fixnum | nil | Override default command listener port of 5556 | |enable_object_trace | true/false | true | Enables object creation/deletion events | |enable_gc_stats | true/false | true | Enables GC stats which is sent every 5 seconds |