Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/julianrubisch/stimulus_reflex_profiler

A Rails engine with profiling options for StimulusReflex
https://github.com/julianrubisch/stimulus_reflex_profiler

Last synced: 15 days ago
JSON representation

A Rails engine with profiling options for StimulusReflex

Awesome Lists containing this project

README

        

# StimulusReflexProfiler
Bildschirmfoto_2020-10-30_um_14_08_06

Provides profiling functionality for [StimulusReflex](https://github.com/hopsoft/stimulus_reflex). Heavily inspired by [Rack Mini Profiler](https://github.com/MiniProfiler/rack-mini-profiler).

Currently implemented:

- Call Stack Profiling (Flamegraph)

## Usage
Mount `StimulusReflexProfiler` as an engine in your `routes.rb`.

```ruby
if Rails.env.development?
mount StimulusReflexProfiler::Engine, at: '/stimulus_reflex_profiler'
end
```

`http://localhost:3000/stimulus_reflex_profiler/flamegraph` will now display the flamegraph of the last triggered Reflex (see above).

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'stimulus_reflex_profiler'
```

For call-stack profiling/flamegraphs add the following gems, too:

```ruby
gem 'flamegraph'
gem 'stackprof'
```

And then execute:
```bash
$ bundle
```

## Contributing
Contribution directions go here.

## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).