Skip to content

Commit 3584063

Browse files
committed
Perf docs and traceWhile should trace multiple times
1 parent a2f3f44 commit 3584063

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

docs/performance/getting-started.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,27 @@ ngOnInit() {
5151
}
5252
```
5353

54-
### `trace(name:string)`
54+
### `trace(name, options?)`
5555

5656
The most basic operator, `trace` will measure the amount of time it takes for your observable to either complete or emit its first value. Beyond the basic trace there are several other operators:
5757

58-
### `traceUntil(name:string, test: (T) => Boolean)`
58+
### `traceUntil(name, test: (T) => Boolean, options?)`
5959

6060
Trace the observable until the first emission that passes the provided test.
6161

62-
### `traceWhile(name:string, test: (T) => Boolean)`
62+
If the `orComplete` option is passed it will complete the trace when the observable completes, even if an emission never passed the provided test.
6363

64-
Trace the observable until the first emission that fails the provided test.
64+
### `traceWhile(name, test: (T) => Boolean, options?)`
6565

66-
### `traceUntilLast(name:string)`
66+
Trace the observable between emissions that pass and then fail the provided test.
67+
68+
If the `orComplete` option is passed it will complete any existing trace when the observable completes.
69+
70+
### `traceUntilLast(name, options?)`
6771

6872
Trace the observable until completion.
6973

70-
### `traceUntilFirst(name: string)`
74+
### `traceUntilFirst(name, options?)`
7175

7276
Traces the observable until the first emission.
7377

src/performance/performance.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export class AngularFirePerformance {
9393
traceSubscription = traceSubscription || this.trace$(name, options).subscribe();
9494
} else {
9595
traceSubscription && traceSubscription.unsubscribe();
96+
traceSubscription = undefined;
9697
}
9798
},
9899
() => {},

0 commit comments

Comments
 (0)