https://github.com/pvande/peek-sql
Peek into the SQL queries being run in your application
https://github.com/pvande/peek-sql
Last synced: 2 months ago
JSON representation
Peek into the SQL queries being run in your application
- Host: GitHub
- URL: https://github.com/pvande/peek-sql
- Owner: pvande
- Created: 2014-11-24T03:29:02.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-24T18:21:33.000Z (about 11 years ago)
- Last Synced: 2025-02-12T13:55:59.587Z (10 months ago)
- Language: Ruby
- Size: 113 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Peek::SQL
Peek into the SQL queries being run in your application.
Things this peek view provides:
- Total time taken in SQL queries
- Per-Model time taken in SQL queries
- Per-Model SQL query counts
- Query cache statistics
## Installation
Add this line to your application's Gemfile:
gem 'peek-sql'
And then execute:
$ bundle
Or install it yourself as:
$ gem install peek-sql
## Usage
Add the following to your `config/initializers/peek.rb`:
```ruby
Peek.into Peek::Views::SQL
```
You'll then need to add the following CSS and CoffeeScript:
CSS:
```scss
//= require peek
//= require peek/views/sql
```
CoffeeScript:
```coffeescript
#= require peek
#= require peek/views/sql
```
## Contributors
- [@pvande](https://github.com/pvande) for this
## Contributing
1. Fork it
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