Coder Social home page Coder Social logo

brynary / peek-rblineprof Goto Github PK

View Code? Open in Web Editor NEW

This project forked from peek/peek-rblineprof

0.0 1.0 1.0 100 KB

Peek into how much each line of your Rails application takes throughout a request.

License: MIT License

Ruby 97.58% CoffeeScript 2.42%

peek-rblineprof's Introduction

Peek::Rblineprof

Peek into how much 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 line

You 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

screen shot 2013-05-06 at 5 08 45 pm

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:

Peek.into Peek::Views::Rblineprof

You'll then need to add the following CSS and CoffeeScript:

CSS:

//= require peek
//= require peek/views/rblineprof

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 gem:

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:

//= require peek/views/rblineprof/pygments

That's it! Now your code will look โœจ

Contributors

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

peek-rblineprof's People

Contributors

dewski avatar brynary avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.