Add some time measurement output
This commit is contained in:
parent
dcca449de1
commit
ab536284f3
|
@ -4,7 +4,9 @@ require 'rails/all'
|
|||
|
||||
# Require the gems listed in Gemfile, including any gems
|
||||
# you've limited to :test, :development, or :production.
|
||||
start = Time.now
|
||||
Bundler.require(*Rails.groups)
|
||||
puts 'processing time of bundler require: ' + "#{(Time.now - start).round(3).to_s.ljust(5, '0')}s".light_green
|
||||
|
||||
module Justask
|
||||
class Application < Rails::Application
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
require File.expand_path('../application', __FILE__)
|
||||
|
||||
# Initialize the Rails application.
|
||||
start = Time.now
|
||||
Rails.application.initialize!
|
||||
puts 'processing time of Rails.application.initialize!: ' + "#{(Time.now - start).round(3).to_s.ljust(5, '0')}s".light_green
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'sidekiq/web'
|
||||
Rails.application.routes.draw do
|
||||
start = Time.now
|
||||
|
||||
# Admin panel
|
||||
mount RailsAdmin::Engine => '/justask_admin', as: 'rails_admin'
|
||||
|
@ -125,4 +126,6 @@ Rails.application.routes.draw do
|
|||
match '/:username/friends(/p/:page)', to: 'user#friends', via: 'get', as: :show_user_friends, defaults: {page: 1}
|
||||
match '/:username/groups(/p/:page)', to: 'user#groups', via: 'get', as: :show_user_groups, defaults: {page: 1}
|
||||
match '/:username/questions(/p/:page)', to: 'user#questions', via: 'get', as: :show_user_questions, defaults: {page: 1}
|
||||
|
||||
puts 'processing time of routes.rb: ' + "#{(Time.now - start).round(3).to_s.ljust(5, '0')}s".light_green
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue