Sha256: 9bc71798b4f0f895402dcadcc402dae3912b5fb3fe1cbb7cdb2f08cfa1b687fc

Contents?: true

Size: 1.78 KB

Versions: 1

Compression:

Stored size: 1.78 KB

Contents

# Fluent::Rubyprof

Using fluent-rubyprof, you can start and stop [ruby-prof](https://github.com/ruby-prof/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](https://github.com/ruby-prof/ruby-prof#measurements)|PROCESS_TIME|
|-P, --printer PRINTER|ruby-prof print format. See [ruby-prof#printers](https://github.com/ruby-prof/ruby-prof#printers)|flat|

## Further Reading

* [Fluentd の debug_agent 経由で ruby-prof を起動する](http://qiita.com/sonots/items/749280547176d82f3e2c) (Japanese)

## ChangeLog

See [CHANGELOG.md](./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

## Copyright

See [LICENSE.txt](./LICENSE.txt)

## Special Thanks

I refered implemention of [fluent-tail](https://github.com/choplin/fluent-tail). Thanks!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-rubyprof-0.2.0 README.md