GreenStepsChatt / greensteps

This is the web app for Green Steps, a community focused initiative that incentivizes litter cleanup in the Chattanooga area.
https://www.greenstepschatt.com/
MIT License
12 stars 31 forks source link

WIP Add miniprofiler with flamegraph (includes addition of developer role) #161

Closed crawfoal closed 6 months ago

crawfoal commented 6 years ago

Description

This PR adds mini-profiler and flamegraph.

These gems are supposed to be safe to run in production - in production environments, requests are only profiled if they are authorized in a controller filter. You write the filter so you determine how this happens. I added a developer role for the user model and wrote the filter so that it would only profile requests that come from users with this role. The spec that ensures that general requests aren't profiled is failing intermittently and we need to address this before this PR can be merged.

We should look at Heroku adds ons that can help us with profiling and monitoring performance. Maybe one of those is a better option than mini-profiler, or maybe we want to use both for different things.

Developer Checklist