From 14504ddd01323f91c5557df6b5eed7c106c9b141 Mon Sep 17 00:00:00 2001 From: Adnan Ali Date: Thu, 29 Nov 2018 03:37:08 -0500 Subject: [PATCH 1/3] update for ruby 2.4, add autorun for minitest. --- .gitignore | 1 + Gemfile | 2 +- test/test_helper.rb | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3beccbc..e260961 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ test/version_tmp tmp *.swp demo/graph.html +tags diff --git a/Gemfile b/Gemfile index a000450..07973fd 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,5 @@ gemspec # both are optional, depending on platform gem 'fast_stack' -gem 'stackprof', platform: [:mri_21, :mri_22, :mri_23] +gem 'stackprof', platform: [:mri_21, :mri_22, :mri_23, :mri_24] diff --git a/test/test_helper.rb b/test/test_helper.rb index e7a3bfe..547bf5a 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,3 @@ require 'flamegraph' +require 'minitest/autorun' require 'minitest/pride' - - From 664b045db24a665b2260a7ea5e5db34e82eb748a Mon Sep 17 00:00:00 2001 From: Adnan Ali Date: Thu, 29 Nov 2018 21:21:55 -0500 Subject: [PATCH 2/3] Covert flamegraph.html to erb. Add TEST env var for easier testing during dev. --- .gitignore | 3 ++- .../{flamegraph.html => flamegraph.html.erb} | 13 ++++++++++++- lib/flamegraph/renderer.rb | 3 ++- 3 files changed, 16 insertions(+), 3 deletions(-) rename lib/flamegraph/{flamegraph.html => flamegraph.html.erb} (98%) diff --git a/.gitignore b/.gitignore index e260961..68076b9 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,6 @@ test/tmp test/version_tmp tmp *.swp -demo/graph.html +demo/graph*.html +demo/data.json tags diff --git a/lib/flamegraph/flamegraph.html b/lib/flamegraph/flamegraph.html.erb similarity index 98% rename from lib/flamegraph/flamegraph.html rename to lib/flamegraph/flamegraph.html.erb index 175fc25..5555412 100644 --- a/lib/flamegraph/flamegraph.html +++ b/lib/flamegraph/flamegraph.html.erb @@ -74,7 +74,18 @@

Frame Info