To see how the Object Visualizer displays object activity, try the following example.
We will examine the behavior of the sample application VtExampleApp, an application which does some simple graph manipulation.
Note: You can follow the steps below, and get a feel for using the Object Visualizer, even if you are unfamiliar with graph theory and don't understand what the example application is supposed to do. In fact, even though you are just a casual observer, you may gain a bit of an understanding of the coarse structure of the application's behavior, just from this very brief visualization session!
![]() |
![]() |
![]() |
Note: When you first open an Object Visualizer, there may already be some classes listed in the Classes column. This is because the Object Visualizer remembers which classes were being visualized in the previous session and restores them at the start of the next session. If you wish, you can remove such classes by selecting them and choosing Remove Classes from the Class menu.
This example concerns a VtExampleList, a slightly random graph of VtExampleItems. During the setup, the items figure out which ones are successors of each other. This can be seen quite clearly as follows.
The VtExampleList will then send a message to each of the VtExampleItems. As each message is being sent and the corresponding method is being executed, a line appears between the two boxes that represent the sender and receiver of the message.
Then each VtExampleItem will send a message to each other VtExampleItem in turn.
In the next step, you will see that this behavior corresponds to initializing the items of the graph, and then computing the successor sets of the items, to connect the graph components.
![]() |
A window opens showing the methods that have been active for that object. For each method, there is a count of the number of times it has been invoked, and the amount of time that has been spent executing that method. The color of an entry provides a relative indication of how active the method has been.
The browser shows that VtExampleList>>initialize: has been the most active by far.
This browser shows that VtExampleItem>>shouldConnectTo: has been most active of the VtExampleItem methods.
If you want to understand the program execution more fully, open browsers on the application code, the methods VtExampleList>>initialize: and VtExampleItem>>shouldConnectTo: in particular, and see how the activity observed in the visualizer corresponds to the code.
![]() |
The boxes all become blue, as they were when they were first created.
Now, we will visualize a rather crude breadth-first search, looking for a "heavy path", that is, one whose total heaviness is more than 10,000. (See the code for the exact definition; but note that the example is contrived for illustration rather than realism.)
(VtExampleList the heavyPath: 10000 depth: 6) inspect
.
Watch as one VtExampleItem experiences a great deal of usage, a few others get some usage, and the rest are untouched. The heavily used node is the first one in the (sorted) list; the other heavily-used ones are presumably its successors. The heavy use of a few list items suggests the need for some improvements to the algorithm.
![]() |