https://github.com/sonots/fluent-gcprofiler
Start and stop GC::Profiler from outside of fluentd
https://github.com/sonots/fluent-gcprofiler
fluentd gc profile ruby
Last synced: 8 months ago
JSON representation
Start and stop GC::Profiler from outside of fluentd
- Host: GitHub
- URL: https://github.com/sonots/fluent-gcprofiler
- Owner: sonots
- License: mit
- Created: 2014-08-11T10:26:50.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-21T05:15:36.000Z (almost 12 years ago)
- Last Synced: 2025-10-05T20:19:02.390Z (9 months ago)
- Topics: fluentd, gc, profile, ruby
- Language: Ruby
- Size: 156 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# fluent-gcprofiler
Using fluent-gcprofiler, you can start and stop [GC::Profiler](http://docs.ruby-lang.org/ja/2.1.0/class/GC=3a=3aProfiler.html) dynamically from outside of fluentd without any configuration changes.
## Installation
```
$ fluent-gem install fluent-gcprofiler
```
## Prerequisite
`in_debug_agent` plugin is required to be enabled.
```
type debug_agent
port 24230
```
GC::Profiler is a ruby built-in profiler, you do not need to install another gem.
## Usage
Start
```
$ fluent-gcprofiler start -h localhost -p 24230
```
Stop and write a profiling result.
```
$ fluent-gcprofiler stop -h localhost -p 24230 -o /tmp/fluent-gcprofiler.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-gcprofiler.txt|
## Sample Output
`/tmp/fluent-gcprofiler.txt` as default:
```
GC 21 invokes.
Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC Time(ms)
1 0.452 722640 1668720 83436 5.05216200000002046977
2 0.458 722600 1668720 83436 3.76476800000001832203
```
MEMO: `Invoke Time` is the elapsed *CPU* time from ruby starts.
## ChangeLog
See [CHANGELOG.md](./CHANGELOG.md)
## Contributing
1. Fork it ( http://github.com/sonots/fluent-gcprofiler/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)