Thread Visualization with Typemock Racer - ISerializable - Roy Osherove's Blog

Thread Visualization with Typemock Racer

Here’s what you can find on the latest typemock racer build. I think it’s pretty cool.

Published Thursday, September 11, 2008 11:58 AM by RoyOsherove

Comments

Thursday, September 11, 2008 12:09 PM by Peter Ritchie

# re: Thread Visualization with Typemock Racer

Cool.  Does the Visualizer use a standard threading diagramming notation?

Thursday, September 11, 2008 12:36 PM by RoyOsherove

# re: Thread Visualization with Typemock Racer

peter: not at the moment.

got good links for examples?

Thursday, September 11, 2008 1:59 PM by Peter Ritchie

# re: Thread Visualization with Typemock Racer

I don't know what/if there are any industry standards.  UML Sequence diagrams come to mind as a recent standard.  It seems a little convoluted for showing the current synchronization state.  It could have swim lanes for the two threads and another lane for the locked objects; but that seems a little obtuse.

A UML state diagram seems a little better, simply showing the current state; with a "waiting on object x" state shared between two threads to signify a deadlock.  I suppose that assumes you show a fork to delineate the threads, but you could simply show x arrows as threads coming from the top...  It would certainly offer a notation for spawning and joining threads...

Thursday, September 11, 2008 3:10 PM by Avish

# re: Thread Visualization with Typemock Racer

Oh, no, that would never work. The gradient is all wrong, and those arrows are like so 90's.

Seriously though: this is mega-cool, and could really become a revolutionary new must-have item in the modern programmer's toolbox.

The challenge now is to make the diagrams clear and understandable when the racing scenarios get more complex - maybe even interactive so you can dive in for details like method names etc.

Also, do you have any easy way to get a visualization of a racing scenario whenever Racer finds it, or does one have to re-run the test with the "try this permutation first" attribute and then visualize?

Thursday, September 11, 2008 7:39 PM by RoyOsherove

# re: Thread Visualization with Typemock Racer

avish:

when a deadlock or other problem is found in a test, the visualization image of the thread state is saved and shown as a clickable link in the output window so you don't have to re-run the see the visualization.

Making it interactive is the direction, I agree. it also need to be much nicer looking and understandable.

since we do incremental work, this should get better and better on the nightly builds and in the stable (bi-weekly) builds. both build types are available on the site and I want more feedback like yours.

Thursday, September 25, 2008 4:41 PM by josh

# re: Thread Visualization with Typemock Racer

sorry.. was there a vid.. was busy rocking out to the background music. kidding. its very interesting.