Project

fast_stack

0.07
No commit activity in last 3 years
No release in over 3 years
Fast method for collecting stack traces in Ruby 2.1+
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Fast stack Build Status

Very efficient collection of ruby backtraces, even under heavy CPU load

How do you use it?

require 'fast_stack'

Usage

def fib( n )
  return  n  if ( 0..1 ).include? n
  ( fib( n - 1 ) + fib( n - 2 ) )
end

stacks = FastStack.profile do
  fib(30)
end

puts stacks.count # => 30

Notes

This technique was conceived by https://github.com/tmm1 , big thank you.

Ruby 2.0 uses #backtrace_locations, 1.9.3 uses #backtrace

(gem template based on https://github.com/CodeMonkeySteve/fast_xor )