Visual Rx – Part 2

2012/08/12

Visual Rx – Part 2

this is the second post in the Visual Rx series.
this post will focus on the viewer side.

you can see this series TOC in here.

as we saw in the previous post the main view of the Visual Rx viewer is using a tab control (the default tab is the "All" tab) out of the box the viewer is also having a grid tab, additional tab will be added per keyword.
(the grid is actually a plugin and it can be remove by deleting it from the relative Plugins folder).

all tabs except of the grid tab is presenting the data using a marble diagrams.

the Visual Rx viewer is a plug-able application and you can have a custom tabs if you want to present the data in a different way (more on this topic in latter posts).

Application Level

on the top left you can see 3 buttons, Pause, Clear and About.

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

the Clear button will clear the current presenting data on all tabs.

Pause will freeze the view (without loosing data).
it is essential for analyzing a fast stream at runtime.
this is a toggle button which will change between Pause and Resume. the data continue to be collected while the viewer is in a pause mode (even those this data doesn’t display).
Resume will immediately display all the data that was collected during the pause phase and resume to display a new data.

Single Tab level

under each tab you can find the "show tab actions" link (marked by yellow) which will expand a tab’s level actions (those actions will affect the only current tab).

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

clicking on this link will expand / collapse the tab’s level actions.

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

the tab’s level actions include the following functionalities:

  • Clear will clear the diagrams from the current tab (while preserving other tabs diagrams).
  • Global Time, Private Time and Sequence are different ways of ordering the marbles on the marble line:
    • Global time will show the marble on a timeline with a correlation between all marble diagrams within the current tab (this is useful when the diagram streams are related to each other, like the case of Rx combinators like Merge).
    • Private time will conduct the diagram timeline on a single diagram base.
    • Sequence will present the marbles in correlation to their creation order regardless of the creation time (it is useful for operators like Range or when multiple marble were produce at the same time).

on the previous post we was looking at the following code:

Code Snippet
  1. var inputA1 = Observable.Interval(TimeSpan.FromSeconds(1.5)).Take(7);
  2. inputA1 = inputA1.Monitor("Input A1", 1, "ScenarioA", "Input");
  3. var inputA2 = Observable.Interval(TimeSpan.FromSeconds(2)).Take(5);
  4. inputA2 = inputA2.Monitor("Input A2", 2, "ScenarioA", "Input");
  5. var outputA = Observable.Merge(inputA1, inputA2);
  6. outputA = outputA.Monitor("Output A", 3, "ScenarioA", "Output");
  7. var inputB = Observable.Interval(TimeSpan.FromSeconds(1)).Take(10);
  8. inputB = inputB.Monitor("Input B", 4, "ScenarioB", "Input");
  9. var outputB = from item in inputB
  10. group item by item % 3 into g
  11. select g;
  12. outputB = outputB.MonitorGroup("Output B", 5, "ScenarioB", "Output");
  13. outputA.Subscribe();
  14. outputB.Subscribe(g => g.Subscribe());

the default Global Time view will present the data as follow:

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

as you can see the diagrams time line is in correlation with each other, Private Time will shift the diagram marble to the left:

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

still the time ratio were preserved on per diagram based.

the Sequence option will ignore the time ratio and present the data in a simple sequence:

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

let resume the the rest of the actions:

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

  • Scroll To End is a toggle button which will automatically keep the horizontal scrolling bar attached to the right end, which mean that the newest data will always be visible
  • the Track-bar is a zooming bar
  • and though the combo-box you can define the presented time scale (fast stream time scale may better present in millisecond units).

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

Marble diagram level

at the marble diagram level you can find a popup action bar which response to click on the marble title.

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

the action includes:

  • Refresh – which refresh the marble view.
  • Global Time, Private Time and Sequence on a single marble level.

the last functionality is collapse ability.
clicking on the marble collapser will collapse the marble:

Profile, Rx, Diagnostic, Contrib, Marble, Bnaya, Dubug, Trace, Visual Rx

Summary

the Visual Rx viewer is a reach viewer which was design to support Rx dataflow analysis.
you can take it further by using a custom plug-ins but this will be discuss on latter posts.

you can download the Viewer and the SDK from codeplex and the SDK can also be download from NuGet (search for VisualRx).

you can vote for feature at the CodePlex site under the Issue Tracker tab.

kick it on DotNetKicks.com Shout it

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*