Fluent::Rubyprof

Using fluent-rubyprof, you can start and stop ruby-prof dynamically from outside of fluentd without any configuration changes.

Prerequisite

in_debug_agent plugin is required to be enabled.

<source>
  type debug_agent
  port 24230
</source>

And, ruby-prof gem is required.

$ fluent-gem install ruby-prof

Installation

$ fluent-gem install fluent-rubyprof

Usage

Start

$ fluent-rubyprof start -h localhost -p 24230

Stop and write a profiling result.

$ fluent-rubyprof stop -h localhost -p 24230 -o /tmp/fluent-rubyprof.txt

Options

parameter description default
-h, --host HOST fluent host 127.0.0.1
-p, --port PORT debug_agent port 24230
-u, --unix PATH use unix socket instead of tcp
-o, --output PATH output file /tmp/fluent-rubyprof.txt
-m, --measure_mode MEASURE_MODE ruby-prof measure mode. See ruby-prof#measurements PROCESS_TIME
-P, --printer PRINTER ruby-prof print format. See ruby-prof#printers flat

Further Reading

ChangeLog

See CHANGELOG.md

Contributing

  1. Fork it ( http://github.com/sonots/fluent-rubyprof/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

See LICENSE.txt

Special Thanks

I refered implemention of fluent-tail. Thanks!