Skip to content

Instantly share code, notes, and snippets.

@millisami
Created July 23, 2013 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save millisami/6061824 to your computer and use it in GitHub Desktop.
Save millisami/6061824 to your computer and use it in GitHub Desktop.
cache logger ugly
#FILE: config/environments/test.rb
class DisableAssetsLogger
def initialize(app)
@app = app
Rails.application.assets.logger = Logger.new('/dev/null')
end
def call(env)
previous_level = Rails.logger.level
Rails.logger.level = Logger::ERROR if env['PATH_INFO'].index("/cache/") == 0
@app.call(env)
ensure
Rails.logger.level = previous_level
end
end
Ror::Application.configure do
config.middleware.insert_before Rails::Rack::Logger, DisableAssetsLogger
.......
.......
end
## Running the acceptance spec:
zeus rspec ./spec/acceptance/invitations_spec.rb:8 1.9.3-p194@global
No DRb server is running. Running in local process instead ...
Run options: include {:locations=>{"./spec/acceptance/invitations_spec.rb"=>[8]}}
Invitations Followed by Create Account
Slow factory: "new_student" using strategy "create"
Slow factory: "new_student" using strategy "create"
cache: [GET /] miss
cache: [GET /home.1] miss
cache: [GET /sparkmaps/new?solo=true&type=student] miss
cache: [GET /assets/head.js] miss, store
cache: [GET /assets/application.css] miss, store
cache: [GET /assets/sparkon-logo.png] miss, store
cache: [GET /assets/application.js] miss, store
cache: [GET /media/W1siZiIsIi01MjYzMTA4Yi04MmIzLTQwZjItYTg2Yy04ZDNlMGNmZDFiN2ItNTMweDUzMC5wbmciXSxbInAiLCJ0aHVtYiIsIjM0eDM0Il1d?sha=f2450df1] miss, store
cache: [GET /assets/down_arrow.png] miss, store
cache: [GET /assets/sparkmap_images/overview_picture_frame.png] miss, store
cache: [GET /assets/MyriadPro-Regular.otf] miss, store
cache: [GET /assets/MinionPro-Regular.otf] miss, store
cache: [GET /assets/MyriadPro-BoldIt.otf] miss, store
cache: [GET /assets/MinionPro-Bold.otf] miss, store
cache: [GET /assets/MyriadPro-Semibold.otf] miss, store
cache: [GET /favicon.ico] miss, store
cache: [GET /users/1?panel=general] miss
cache: [GET /media/W1siZiIsIi01MjYzMTA4Yi04MmIzLTQwZjItYTg2Yy04ZDNlMGNmZDFiN2ItNTMweDUzMC5wbmciXSxbInAiLCJ0aHVtYiIsIjE1MHgxNTAiXV0?sha=04c0dbf6] miss, store
cache: [GET /add_new_family] miss
cache: [POST /create_family_member] invalidate, pass
cache: [GET /users/1] miss
cache: [GET /approve_relation?invitation=1&receiver_email=dad%40empower.me&sender=1&utm_campaign=Family&utm_source=email&utm_term=Parent] miss
cache: [GET /sign_up_landing?invitee%5Binvitation_id%5D=1] miss
cache: [GET /users/sign_up?invitee%5Binvitation_id%5D=1] miss
cache: [GET /assets/head.js] miss, store
cache: [GET /assets/application.css] miss, store
cache: [GET /assets/sparkon-logo.png] miss, store
cache: [GET /assets/bt-signin-from-signup.png] miss, store
cache: [GET /assets/application.js] miss, store
cache: [GET /assets/MyriadPro-Regular.otf] miss, store
cache: [GET /favicon.ico] miss, store
cache: [POST /users] invalidate, pass
cache: [GET /assets/icon-error.png] miss, store
cache: [GET /assets/fontawesome-webfont.woff] miss, store
cache: [GET /assets/fontawesome-webfont.woff] stale, valid, store
cache: [POST /users] invalidate, pass
cache: [GET /home] miss
2013-07-23 17:40:13 +0545 : Exception - type: OAuthException, code: 2500, message: An active access token must be used to query information about the current user. [HTTP 400]
cache: [GET /sparkmap-dashboard?solo=false&type=parent] miss
cache: [GET /media/W1siZiIsIjItMTgzYWZkNWUtOWExYy00YzMzLTgxYTItZTJiMTg3MjZjNjMxLTE1MHgxNTAucG5nIl0sWyJwIiwidGh1bWIiLCIzNHgzNCJdXQ?sha=24b4b3ba] miss, store
cache: [GET /assets/sparkmap_design/sparkmap_manifest.css] miss, store
cache: [GET /assets/down_arrow.png] miss, store
cache: [GET /assets/MyriadPro-Semibold.otf] miss, store
cache: [GET /media/W1siZiIsIjItMTgzYWZkNWUtOWExYy00YzMzLTgxYTItZTJiMTg3MjZjNjMxLTE1MHgxNTAucG5nIl0sWyJwIiwidGh1bWIiLCIxNzB4MTgwIl1d?sha=48832bfd] miss, store
cache: [GET /assets/sparkmap_common_manifest.js] miss, store
cache: [GET /assets/sparkmap_images/info_text_for_parents_dashboard.jpg] miss, store
cache: [GET /assets/MinionPro-Regular.otf] miss, store
cache: [GET /assets/MyriadPro-Semibold.otf] stale, valid, store
cache: [GET /assets/MinionPro-Regular.otf] miss, store
student signs up and invites parents to join
Top 1 slowest examples (42.52 seconds, 100.0% of total time):
Invitations Followed by Create Account student signs up and invites parents to join
42.52 seconds ./spec/acceptance/invitations_spec.rb:8
Finished in 42.85 seconds
1 example, 0 failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment