Visual Rx - Part 2
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).
on the top left you can see 3 buttons, Pause, Clear and About.
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).
clicking on this link will expand / collapse the tab's level actions.
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:
- var inputA1 = Observable.Interval(TimeSpan.FromSeconds(1.5)).Take(7);
- inputA1 = inputA1.Monitor("Input A1", 1, "ScenarioA", "Input");
- var inputA2 = Observable.Interval(TimeSpan.FromSeconds(2)).Take(5);
- inputA2 = inputA2.Monitor("Input A2", 2, "ScenarioA", "Input");
- var outputA = Observable.Merge(inputA1, inputA2);
- outputA = outputA.Monitor("Output A", 3, "ScenarioA", "Output");
- var inputB = Observable.Interval(TimeSpan.FromSeconds(1)).Take(10);
- inputB = inputB.Monitor("Input B", 4, "ScenarioB", "Input");
- var outputB = from item in inputB
- group item by item % 3 into g
- select g;
- outputB = outputB.MonitorGroup("Output B", 5, "ScenarioB", "Output");
- outputB.Subscribe(g => g.Subscribe());
the default Global Time view will present the data as follow:
as you can see the diagrams time line is in correlation with each other, Private Time will shift the diagram marble to the left:
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:
let resume the the rest of the actions:
- 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).
Marble diagram level
at the marble diagram level you can find a popup action bar which response to click on the marble title.
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:
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.