GithubHelp home page GithubHelp logo

hyperloop-rails / powerstation Goto Github PK

View Code? Open in Web Editor NEW
57.0 6.0 5.0 42.14 MB

A Tool for Detecting Performance Bugs in Rails Applications

Home Page: https://hyperloop-rails.github.io/

License: BSD 2-Clause "Simplified" License

Shell 0.47% JavaScript 0.52% CoffeeScript 0.01% CSS 1.03% Ruby 91.51% HTML 0.54% Python 3.40% C++ 0.23% Java 2.30%
rails rails-application webapp performance-analysis performance-tuning

powerstation's Issues

Still relevant to check `any?` & `where.first` ?

I believe more current versions of ActiveRecord address this. Notice that AR is using LIMIT 1 and isn't loading the result set into memory.

irb(main):007:0> User.where(email: 'email').exists?
  User Exists (1.0ms)  SELECT  1 AS one FROM `users` WHERE `users`.`email` = 'email' LIMIT 1
=> false
irb(main):008:0> User.where(email: 'email').any?
  User Exists (0.4ms)  SELECT  1 AS one FROM `users` WHERE `users`.`email` = 'email' LIMIT 1
=> false
irb(main):009:0> User.find_by(email: 'email')
  User Load (0.4ms)  SELECT  `users`.* FROM `users` WHERE `users`.`email` = 'email' LIMIT 1
=> nil
irb(main):010:0> User.where(email: 'email').first
  User Load (0.5ms)  SELECT  `users`.* FROM `users` WHERE `users`.`email` = 'email' ORDER BY `users`.`id` ASC LIMIT 1
=> nil

Credit to @mccallumjack.

Exclude `log` directory from analysis

It looks like the script greps everything inside the current directory.

Some directories should likely be excluded by default, like the /log directory, which frequently contains large files that don't have application code.

No results directory created

No errors reported by Analyze, but when calling Show, exception occurs :

When I check in the PW-src directory, there is No results directory created.

However something ran as the code from the project has been copied to PW-src

Error on show :
image

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.