How could I write a graph of current computations?


#1

I’m looking to create a tool that shows the relationships between the computations currently being monitored by Tracker.

My example code I’d like to visualize is:

var Session = new ReactiveDict;

Tracker.autorun(function (){ 
  var firstValue = Session.get("a") || Session.get("b")
  console.log("Autorun 1::First Value:: ", firstValue);
  
  Tracker.autorun(function (){ 
    var lastValue = Session.get("a") && Session.get("b")
    console.log("Autorun 2::Last Value:: ", lastValue);
  });
});

Could anyone show me how to derive a digaram from these that show which know about which ? I’ve investigated the Tracker._computations object, but I think I’m still missing something, thanks.