-
Notifications
You must be signed in to change notification settings - Fork 441
Profile page using rack mini profiler
If you need to profile component, we suggest to use https://github.com/MiniProfiler/rack-mini-profiler
To avoid to change the development permanently, you can do it on demand.
Start your frontend container as:
docker compose run --rm --service-ports frontend bash -c "bundle exec rake ts:start && bash"
Edit your Gemfile and add the following lines:
gem 'rack-mini-profiler'
gem 'flamegraph'
gem 'stackprof'
gem 'memory_profiler'
Then run bundle install
and start the server with rails s -b 0.0.0.0
Open your browser, navigate to the page that you want profile and voilà
Because it's noted that it can behave bad with the cache leading to unexpected behavior, We prefer to keep it out for now.
To have it installed and disabled and being able to load it when necessary could be an option too.
It would be even possible to setup in Production:
Some reference with screenshots: https://stackify.com/rack-mini-profiler-a-complete-guide-on-rails-performance/
- Development Environment Overview
- Development Environment Tips & Tricks
- Spec-Tips
- Code Style
- Rubocop
- Testing with VCR
- Authentication
- Authorization
- Autocomplete
- BS Requests
- Events
- ProjectLog
- Notifications
- Feature Toggles
- Build Results
- Attrib classes
- Flags
- The BackendPackage Cache
- Maintenance classes
- Cloud uploader
- Delayed Jobs
- Staging Workflow
- StatusHistory
- OBS API
- Owner Search
- Search
- Links
- Distributions
- Repository
- Data Migrations
- next_rails
- Ruby Update
- Rails Profiling
- Installing a local LDAP-server
- Remote Pairing Setup Guide
- Factory Dashboard
- osc
- Setup an OBS Development Environment on macOS
- Run OpenQA smoketest locally
- Responsive Guidelines
- Importing database dumps
- Problem Statement & Solution
- Kickoff New Stuff
- New Swagger API doc
- Documentation and Communication
- GitHub Actions
- How to Introduce Software Design Patterns
- Query Objects
- Services
- View Components
- RFC: Core Components
- RFC: Decorator Pattern
- RFC: Backend models