Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up the new subproject for debugging observable chains. #836

Merged
merged 2 commits into from
Feb 11, 2014

Conversation

abersnaze
Copy link
Contributor

By creating and registering this plugin you get a complete log of all the events (subscribe, onNext, onError, onCompleted and unsubscribe) that happen in all observables, observers and subscribers. The debug hook also takes a Func1 for transforming data before they are sent to actual onNext functions.

This pull request is for the raw data. There isn't any persistence or visualization of the data generated yet.

Here is an example of a simple observable chain

from(1, 3).flatMap({ it -> from(it, it + 1) }).take(3).subscribe()

And the stream of notifications sent.

{ "nano": 1391761208271225000, "thread": 1, "observer": "rx.Observable$27@3290a11e", "type": "Subscribe", "source": "rx.Observable$2@3541d281"}
{ "nano": 1391761208272832000, "thread": 1, "observer": "rx.operators.OperatorTake$1@f81c4a1", "type": "Subscribe", "source": "rx.Observable$2@10942dfb", "to": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208275469000, "thread": 1, "observer": "rx.operators.OperatorMerge$1@49c5146e", "type": "Subscribe", "source": "rx.Observable$2@29c06798", "to": "rx.operators.OperatorMerge@16d14192"}
{ "nano": 1391761208275644000, "thread": 1, "observer": "rx.operators.OperatorMap$1@427e3f2", "type": "Subscribe", "source": "rx.operators.OperatorFromIterable@56e626ff", "to": "rx.operators.OperatorMap@200a5beb"}
{ "nano": 1391761208276707000, "thread": 1, "observer": "rx.operators.OperatorMap$1@427e3f2", "type": "OnNext", "value": "1", "to": "rx.operators.OperatorMap@200a5beb"}
{ "nano": 1391761208276839000, "thread": 1, "observer": "rx.operators.OperatorMerge$1@49c5146e", "type": "OnNext", "value": "rx.Observable@299b78d4", "from": "rx.operators.OperatorMap@200a5beb", "to": "rx.operators.OperatorMerge@16d14192"}
{ "nano": 1391761208277012000, "thread": 1, "observer": "rx.operators.OperatorMerge$1$InnerObserver@2b6dd9c5", "type": "Subscribe", "source": "rx.operators.OperatorFromIterable@38f42ac9"}
{ "nano": 1391761208277075000, "thread": 1, "observer": "rx.operators.OperatorMerge$1$InnerObserver@2b6dd9c5", "type": "OnNext", "value": "1"}
{ "nano": 1391761208277166000, "thread": 1, "observer": "rx.operators.OperatorTake$1@f81c4a1", "type": "OnNext", "value": "1", "from": "rx.operators.OperatorMerge@16d14192", "to": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208277243000, "thread": 1, "observer": "rx.Observable$27@3290a11e", "type": "OnNext", "value": "1", "from": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208277338000, "thread": 1, "observer": "rx.operators.OperatorMerge$1$InnerObserver@2b6dd9c5", "type": "OnNext", "value": "2"}
{ "nano": 1391761208277397000, "thread": 1, "observer": "rx.operators.OperatorTake$1@f81c4a1", "type": "OnNext", "value": "2", "from": "rx.operators.OperatorMerge@16d14192", "to": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208277471000, "thread": 1, "observer": "rx.Observable$27@3290a11e", "type": "OnNext", "value": "2", "from": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208277557000, "thread": 1, "observer": "rx.operators.OperatorMerge$1$InnerObserver@2b6dd9c5", "type": "OnCompleted"}
{ "nano": 1391761208279076000, "thread": 1, "observer": "rx.operators.OperatorMap$1@427e3f2", "type": "OnNext", "value": "3", "to": "rx.operators.OperatorMap@200a5beb"}
{ "nano": 1391761208279154000, "thread": 1, "observer": "rx.operators.OperatorMerge$1@49c5146e", "type": "OnNext", "value": "rx.Observable@24d8116d", "from": "rx.operators.OperatorMap@200a5beb", "to": "rx.operators.OperatorMerge@16d14192"}
{ "nano": 1391761208279252000, "thread": 1, "observer": "rx.operators.OperatorMerge$1$InnerObserver@65601e00", "type": "Subscribe", "source": "rx.operators.OperatorFromIterable@951c5ff"}
{ "nano": 1391761208279322000, "thread": 1, "observer": "rx.operators.OperatorMerge$1$InnerObserver@65601e00", "type": "OnNext", "value": "3"}
{ "nano": 1391761208279409000, "thread": 1, "observer": "rx.operators.OperatorTake$1@f81c4a1", "type": "OnNext", "value": "3", "from": "rx.operators.OperatorMerge@16d14192", "to": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208279483000, "thread": 1, "observer": "rx.Observable$27@3290a11e", "type": "OnNext", "value": "3", "from": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208279562000, "thread": 1, "observer": "rx.Observable$27@3290a11e", "type": "OnCompleted", "from": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208279692000, "thread": 1, "observer": "rx.Observable$27@3290a11e", "type": "Unsubscribe", "from": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208279756000, "thread": 1, "observer": "rx.operators.OperatorTake$1@f81c4a1", "type": "Unsubscribe", "from": "rx.operators.OperatorMerge@16d14192", "to": "rx.operators.OperatorTake@7056c23d"}
{ "nano": 1391761208279830000, "thread": 1, "observer": "rx.operators.OperatorMerge$1@49c5146e", "type": "Unsubscribe", "from": "rx.operators.OperatorMap@200a5beb", "to": "rx.operators.OperatorMerge@16d14192"}
{ "nano": 1391761208279880000, "thread": 1, "observer": "rx.operators.OperatorMap$1@427e3f2", "type": "Unsubscribe", "to": "rx.operators.OperatorMap@200a5beb"}
{ "nano": 1391761208279946000, "thread": 1, "observer": "rx.operators.OperatorMerge$1$InnerObserver@2b6dd9c5", "type": "Unsubscribe"}
{ "nano": 1391761208280018000, "thread": 1, "observer": "rx.operators.OperatorMerge$1$InnerObserver@65601e00", "type": "Unsubscribe"}
{ "nano": 1391761208280085000, "thread": 1, "observer": "rx.operators.OperatorMap$1@427e3f2", "type": "OnCompleted", "to": "rx.operators.OperatorMap@200a5beb"}
{ "nano": 1391761208280150000, "thread": 1, "observer": "rx.operators.OperatorMerge$1@49c5146e", "type": "OnCompleted", "from": "rx.operators.OperatorMap@200a5beb", "to": "rx.operators.OperatorMerge@16d14192"}

@cloudbees-pull-request-builder

RxJava-pull-requests #757 FAILURE
Looks like there's a problem with this pull request

@benjchristensen
Copy link
Member

Something is conflicted so it needs to be rebased before I can merge.

Conflicts:
	rxjava-core/src/main/java/rx/Observable.java
@abersnaze
Copy link
Contributor Author

Sorry, forgot to push it up to the fork.

@cloudbees-pull-request-builder

RxJava-pull-requests #763 FAILURE
Looks like there's a problem with this pull request

@benjchristensen benjchristensen mentioned this pull request Feb 11, 2014
@benjchristensen benjchristensen merged commit 35e4507 into ReactiveX:master Feb 11, 2014
@abersnaze abersnaze deleted the debug branch February 13, 2014 07:02
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
…d inside of a CompletionException or ExecutionException, an exception specific fallback method is not found and invoked. (ReactiveX#836)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants