# Map Ruby Program Call Hierarchy

**URL:** <https://www.ruby-forum.com/t/map-ruby-program-call-hierarchy/167263>\
**Category:** Ruby\
**Created:** [May 6, 2009, 6:57am UTC](https://www.ruby-forum.com/t/map-ruby-program-call-hierarchy/167263 "2009-05-06T06:57:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roxah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/54ee81/32.png) [@roxah](https://www.ruby-forum.com/u/roxah)\
**Post date:** [May 6, 2009, 6:57am UTC](https://www.ruby-forum.com/t/map-ruby-program-call-hierarchy/167263/1 "2009-05-06T06:57:42Z")

</div>

Hello all,

I’m wondering if a Ruby library exists that makes it possible to map the  
call hierarchy of a Ruby program. For example, given a command-line  
program with different options, I’d like to be able to run the program  
multiple times, each time with different arguments, and map the ‘route’  
the code takes. I’d like to be able to see what methods of what classes  
are called as the program executed. Does anyone know if anything like  
this exists?

–  
Thanks!  
Bryan

---

<div class="post-metadata">

**Author:** ![roxah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/54ee81/32.png) [@roxah](https://www.ruby-forum.com/u/roxah)\
**Post date:** [May 6, 2009, 10:29am UTC](https://www.ruby-forum.com/t/map-ruby-program-call-hierarchy/167263/2 "2009-05-06T10:29:21Z")

</div>

On May 5, 2009, at 21:57 , Bryan R. wrote:

> I’m wondering if a Ruby library exists that makes it possible to map  
> the  
> call hierarchy of a Ruby program. For example, given a command-line  
> program with different options, I’d like to be able to run the program  
> multiple times, each time with different arguments, and map the  
> ‘route’  
> the code takes. I’d like to be able to see what methods of what  
> classes  
> are called as the program executed. Does anyone know if anything like  
> this exists?

look at tracer.rb
