https://github.com/peek/peek-rblineprof
Peek into how much each line of your Rails application takes throughout a request.
https://github.com/peek/peek-rblineprof
peek ruby
Last synced: 5 months ago
JSON representation
Peek into how much each line of your Rails application takes throughout a request.
- Host: GitHub
- URL: https://github.com/peek/peek-rblineprof
- Owner: peek
- License: mit
- Created: 2013-04-19T17:29:11.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-10-22T08:24:51.000Z (almost 5 years ago)
- Last Synced: 2024-05-16T13:24:00.865Z (over 1 year ago)
- Topics: peek, ruby
- Language: Ruby
- Homepage:
- Size: 24.4 KB
- Stars: 235
- Watchers: 11
- Forks: 31
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Peek::Rblineprof
Peek into how much time each line of your Rails application takes throughout a request.
Things this peek view provides:
- Total time it takes to render individual lines within your codebase
- Total network time spent waiting per lineYou can also drill down to only certain parts of your codebase like:
- app, everything within `Rails.root/(app|lib)`
- views, everything within `Rails.root/app/view`
- gems, everything within `Rails.root/vendor/gems`
- all, everything within `Rails.root`
- stdlib
## Installation
Add this line to your application's Gemfile:
gem 'peek-rblineprof'
And then execute:
$ bundle
Or install it yourself as:
$ gem install peek-rblineprof
## Usage
Add the following to your `config/initializers/peek.rb`:
```ruby
Peek.into Peek::Views::Rblineprof
```You'll then need to add the following CSS and CoffeeScript:
CSS:
```scss
//= require peek
//= require peek/views/rblineprof
```CoffeeScript:
```coffeescript
#= require peek
#= require peek/views/rblineprof
```## Integration with pygments.rb
By default peek-rblineprof renders the code of each file in plain text with no
syntax highlighting for performance reasons. If you'd like to have your code
highlighted as it does on GitHub.com, just include the [pygments.rb](https://github.com/tmm1/pygments.rb) gem:```ruby
gem 'pygments.rb', :require => false
```peek-rblineprof will now highlight each file for you, but there's one more thing...
To use the default theme that peek-rblineprof provides just add the following
to your peek specific or application stylesheet:```scss
//= require peek/views/rblineprof/pygments
```That's it! Now your code will look :sparkles:
## Contributors
- [@tmm1](https://github.com/tmm1) for [rblineprof](https://github.com/tmm1/rblineprof)
- [@dewski](https://github.com/dewski) 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