SamSaffron / flamegraph

Flamegraph profiling support for Ruby 2.0
MIT License
382 stars 36 forks source link

Switch protocol-relative URLs to SSL for CloudFlare CDN assets #1

Closed adammeghji closed 10 years ago

adammeghji commented 10 years ago

I use flamegraph in conjunction with rack-mini-profiler extensively to test our app locally, with flamegraph output saved to disk (via cURL, via Save As ..., etc).

This worked amazingly well with rack-mini-profiler 0.1.26, but breaks on HEAD of the extracted flamegraph gem. CloudFlare CDN assets look like:

file://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js

This fails.

Not sure how you feel about this, but always using https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js would work in all protocols (http, https, file) :+1:

SamSaffron commented 10 years ago

im fine with this, btw I added an option to embed with, pp=flamegraph_embed

adammeghji commented 10 years ago

Awesome, thanks a bunch!

p.s. I'm a huge fan of your rack-mini-profiler + flamegraph approach to performance tuning Rails apps. We're a large Toronto-based Ember + Rails app, so we follow the Discourse project keenly, and were blown away when you revealed this technique. We've since made some amazing gains in performance in our Rails app, so thanks for your community contributions here. :bow: It's been a big win for us. :facepunch: :smile: