Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Marble Diagrams [closed]

The Marble diagrams are frequently from the Rx team explaining how certain operators in Rx work. Are there any tool to create the marble diagrams?

marble diagram

like image 378
Santin Avatar asked Oct 07 '13 20:10

Santin


People also ask

What is marble diagrams?

A marble diagram exposes graphically a sequence of observable items in a time fashion. This simple diagram is the standard de facto of exposing observable sequences when composed with observable operators, such as merge , delay , scan , and so on.

What is a marble test?

What is marble testing? Marble testing allows you to test asynchronous RxJS code synchronously and step-by-step with the help of RxJS TestScheduler test utility and using virtual time steps. There are also marble diagrams which demonstrate what is happening with a particular operation in the observable stream.

What is frame in marble testing?

In the context of TestScheduler, a marble diagram is a string containing special syntax representing events happening over virtual time. Time progresses by frames. The first character of any marble string always represents the zero frame, or the start of time. Inside of testScheduler.

Who keeps the sense of timings in Marble testing?

During the tests, the sens of time (when values are emitted) is handle by the RxJS TestScheduler. - (dash): simulate the passage of time, one dash correspond to a frame which can be perceived as 10ms in our tests, —--- is 40 ms.


1 Answers

I've thought about creating a tool like this a fair bit having created quite a few of them in Visio (look on my blog for examples). I looked around to see if anyone else had done it and couldn't find anything terribly useful. At first blush, it seemed like an obvious tool to write - but I think almost every useful (i.e. complex/interesting) scenario I've worked with has required a uniquely "human" approach to diagram sensibly.

like image 194
James World Avatar answered Oct 02 '22 13:10

James World