@amadeus-it-group/ngrx-devtool 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -0
- package/index.js +52 -0
- package/ngrx-devtool/fesm2022/amadeus-it-group-ngrx-devtool.mjs +1354 -0
- package/ngrx-devtool/fesm2022/amadeus-it-group-ngrx-devtool.mjs.map +1 -0
- package/ngrx-devtool/types/amadeus-it-group-ngrx-devtool.d.ts +468 -0
- package/ngrx-devtool-ui/3rdpartylicenses.txt +556 -0
- package/ngrx-devtool-ui/browser/amadeus.png +0 -0
- package/ngrx-devtool-ui/browser/index.html +17 -0
- package/ngrx-devtool-ui/browser/main-EDJFMLO7.js +249 -0
- package/ngrx-devtool-ui/browser/polyfills-DOYHMSTV.js +2 -0
- package/ngrx-devtool-ui/browser/styles-MZWFNK5Y.css +1 -0
- package/ngrx-devtool-ui/prerendered-routes.json +3 -0
- package/package.json +19 -0
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
import { Action, Selector, MemoizedSelector, ActionReducer } from '@ngrx/store';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { OnDestroy, Provider } from '@angular/core';
|
|
4
|
+
import { ReplaySubject, Observable } from 'rxjs';
|
|
5
|
+
import { EffectSources } from '@ngrx/effects';
|
|
6
|
+
|
|
7
|
+
type EffectLifecycle = 'triggered' | 'emitted' | 'executed' | 'error';
|
|
8
|
+
interface EffectEvent {
|
|
9
|
+
readonly effectName: string;
|
|
10
|
+
readonly sourceName: string;
|
|
11
|
+
readonly propertyName: string;
|
|
12
|
+
readonly lifecycle: EffectLifecycle;
|
|
13
|
+
readonly timestamp: number;
|
|
14
|
+
readonly triggerAction?: Action;
|
|
15
|
+
readonly action?: Action;
|
|
16
|
+
readonly error?: unknown;
|
|
17
|
+
readonly duration?: number;
|
|
18
|
+
readonly executionId?: string;
|
|
19
|
+
readonly dispatch?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface EffectMetadataInfo {
|
|
22
|
+
readonly propertyName: string;
|
|
23
|
+
readonly dispatch: boolean;
|
|
24
|
+
readonly functional: boolean;
|
|
25
|
+
readonly useEffectsErrorHandler: boolean;
|
|
26
|
+
}
|
|
27
|
+
type ActionSource = 'user' | 'effect';
|
|
28
|
+
type EffectStatus = 'completed' | 'error';
|
|
29
|
+
interface TrackedAction {
|
|
30
|
+
readonly action: string;
|
|
31
|
+
readonly payload: unknown;
|
|
32
|
+
readonly timestamp: number;
|
|
33
|
+
readonly source: ActionSource;
|
|
34
|
+
readonly correlationId?: string;
|
|
35
|
+
readonly effectName?: string;
|
|
36
|
+
}
|
|
37
|
+
interface TrackedEffect {
|
|
38
|
+
readonly effectName: string;
|
|
39
|
+
readonly sourceName: string | null;
|
|
40
|
+
readonly propertyName: string;
|
|
41
|
+
readonly triggerAction?: string;
|
|
42
|
+
readonly resultAction?: string;
|
|
43
|
+
readonly startTime: number;
|
|
44
|
+
readonly endTime?: number;
|
|
45
|
+
readonly duration?: number;
|
|
46
|
+
readonly status: EffectStatus;
|
|
47
|
+
readonly error?: unknown;
|
|
48
|
+
}
|
|
49
|
+
type DevToolMessageType = 'ACTION_TRACKED' | 'EFFECT_EVENT' | 'TIMELINE_CLEARED';
|
|
50
|
+
interface DevToolMessage {
|
|
51
|
+
readonly type: DevToolMessageType;
|
|
52
|
+
readonly action?: string;
|
|
53
|
+
readonly payload?: unknown;
|
|
54
|
+
readonly isEffectResult?: boolean;
|
|
55
|
+
readonly effectName?: string;
|
|
56
|
+
readonly correlationId?: string;
|
|
57
|
+
readonly effectEvent?: DevToolEffectEventPayload;
|
|
58
|
+
readonly timestamp: string;
|
|
59
|
+
}
|
|
60
|
+
interface DevToolEffectEventPayload {
|
|
61
|
+
readonly name: string;
|
|
62
|
+
readonly lifecycle: string;
|
|
63
|
+
readonly duration?: number;
|
|
64
|
+
readonly executionId?: string;
|
|
65
|
+
readonly dispatch?: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare class ActionsInterceptorService implements OnDestroy {
|
|
69
|
+
private readonly actions$;
|
|
70
|
+
private readonly effectTracker;
|
|
71
|
+
private readonly webSocketService;
|
|
72
|
+
private readonly destroy$;
|
|
73
|
+
private initialized;
|
|
74
|
+
initialize(wsUrl?: string): void;
|
|
75
|
+
getTimeline(): readonly TrackedAction[];
|
|
76
|
+
clearTimeline(): void;
|
|
77
|
+
ngOnDestroy(): void;
|
|
78
|
+
private setupMessageListener;
|
|
79
|
+
private setupActionInterception;
|
|
80
|
+
private setupEffectEventForwarding;
|
|
81
|
+
private sendMessage;
|
|
82
|
+
private sanitizePayload;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionsInterceptorService, never>;
|
|
84
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ActionsInterceptorService>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare class EffectTrackerService implements OnDestroy {
|
|
88
|
+
private readonly effectSources;
|
|
89
|
+
private readonly destroy$;
|
|
90
|
+
private actionTimeline;
|
|
91
|
+
private effectTimeline;
|
|
92
|
+
private readonly effectActionPatterns;
|
|
93
|
+
private readonly pendingCorrelations;
|
|
94
|
+
private correlationCounter;
|
|
95
|
+
private lastTriggerAction;
|
|
96
|
+
readonly effectEvents$: ReplaySubject<EffectEvent>;
|
|
97
|
+
constructor();
|
|
98
|
+
private subscribeToEffectEvents;
|
|
99
|
+
private handleEffectEvent;
|
|
100
|
+
isEffectAction(actionType: string): boolean;
|
|
101
|
+
trackAction(action: Action): TrackedAction;
|
|
102
|
+
getTimeline(): readonly TrackedAction[];
|
|
103
|
+
clearTimeline(): void;
|
|
104
|
+
private createCorrelation;
|
|
105
|
+
private findCorrelation;
|
|
106
|
+
private findEffectNameForAction;
|
|
107
|
+
ngOnDestroy(): void;
|
|
108
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EffectTrackerService, never>;
|
|
109
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EffectTrackerService>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
interface EffectSourceInstance {
|
|
113
|
+
ngrxOnIdentifyEffects?(): string;
|
|
114
|
+
constructor: {
|
|
115
|
+
name?: string;
|
|
116
|
+
};
|
|
117
|
+
[key: string]: unknown;
|
|
118
|
+
}
|
|
119
|
+
declare class DevToolsEffectSources extends EffectSources implements OnDestroy {
|
|
120
|
+
readonly effectEvents$: ReplaySubject<EffectEvent>;
|
|
121
|
+
private readonly registeredEffects;
|
|
122
|
+
private executionCounter;
|
|
123
|
+
constructor();
|
|
124
|
+
addEffects(effectSourceInstance: EffectSourceInstance): void;
|
|
125
|
+
getRegisteredEffects(): ReadonlyMap<string, readonly EffectMetadataInfo[]>;
|
|
126
|
+
ngOnDestroy(): void;
|
|
127
|
+
private instrumentEffects;
|
|
128
|
+
private wrapEffectObservable;
|
|
129
|
+
private copyEffectMetadata;
|
|
130
|
+
private extractEffectMetadata;
|
|
131
|
+
private resolveSourceName;
|
|
132
|
+
private isValidClassName;
|
|
133
|
+
private isObservable;
|
|
134
|
+
private parseEffectName;
|
|
135
|
+
private generateExecutionId;
|
|
136
|
+
private emitEvent;
|
|
137
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DevToolsEffectSources, never>;
|
|
138
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DevToolsEffectSources>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
interface WebSocketMessage {
|
|
142
|
+
readonly type: string;
|
|
143
|
+
}
|
|
144
|
+
declare class WebSocketService implements OnDestroy {
|
|
145
|
+
private readonly platformId;
|
|
146
|
+
private readonly isBrowser;
|
|
147
|
+
private socket;
|
|
148
|
+
private messageBuffer;
|
|
149
|
+
private wsUrl;
|
|
150
|
+
private initialized;
|
|
151
|
+
private readonly connectionState$;
|
|
152
|
+
private readonly incomingMessages$;
|
|
153
|
+
get isConnected(): boolean;
|
|
154
|
+
get connected$(): Observable<boolean>;
|
|
155
|
+
get messages$(): Observable<WebSocketMessage | null>;
|
|
156
|
+
initialize(wsUrl?: string): void;
|
|
157
|
+
send<T extends WebSocketMessage>(message: T): void;
|
|
158
|
+
sendRaw(payload: string): void;
|
|
159
|
+
ngOnDestroy(): void;
|
|
160
|
+
private close;
|
|
161
|
+
private setupWebSocket;
|
|
162
|
+
private flushBuffer;
|
|
163
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WebSocketService, never>;
|
|
164
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WebSocketService>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
interface ActionDispatchedPayload {
|
|
168
|
+
readonly actionType: string;
|
|
169
|
+
readonly previousState: Record<string, unknown>;
|
|
170
|
+
readonly action: Record<string, unknown>;
|
|
171
|
+
readonly nextState: Record<string, unknown>;
|
|
172
|
+
}
|
|
173
|
+
interface PerformanceMetrics {
|
|
174
|
+
readonly reducerExecutionTime: number;
|
|
175
|
+
readonly stateSize: number;
|
|
176
|
+
readonly stateSizeChange: number;
|
|
177
|
+
readonly memoryUsage?: MemoryInfo;
|
|
178
|
+
readonly actionPayloadSize: number;
|
|
179
|
+
}
|
|
180
|
+
interface MemoryInfo {
|
|
181
|
+
readonly usedJSHeapSize: number;
|
|
182
|
+
readonly totalJSHeapSize: number;
|
|
183
|
+
readonly jsHeapSizeLimit: number;
|
|
184
|
+
}
|
|
185
|
+
interface PerformanceWarning {
|
|
186
|
+
readonly type: PerformanceWarningType;
|
|
187
|
+
readonly message: string;
|
|
188
|
+
readonly severity: 'low' | 'medium' | 'high';
|
|
189
|
+
readonly suggestion?: string;
|
|
190
|
+
}
|
|
191
|
+
declare enum PerformanceWarningType {
|
|
192
|
+
SLOW_REDUCER = "SLOW_REDUCER",
|
|
193
|
+
LARGE_STATE = "LARGE_STATE",
|
|
194
|
+
LARGE_STATE_CHANGE = "LARGE_STATE_CHANGE",
|
|
195
|
+
FREQUENT_ACTIONS = "FREQUENT_ACTIONS",
|
|
196
|
+
LARGE_PAYLOAD = "LARGE_PAYLOAD",
|
|
197
|
+
MEMORY_PRESSURE = "MEMORY_PRESSURE",
|
|
198
|
+
HIGH_RENDER_IMPACT = "HIGH_RENDER_IMPACT"
|
|
199
|
+
}
|
|
200
|
+
interface PerformanceThresholds {
|
|
201
|
+
readonly maxReducerTime: number;
|
|
202
|
+
readonly maxStateSize: number;
|
|
203
|
+
readonly maxStateChangeSize: number;
|
|
204
|
+
readonly maxActionsPerSecond: number;
|
|
205
|
+
readonly maxPayloadSize: number;
|
|
206
|
+
}
|
|
207
|
+
interface ActionTypeStats {
|
|
208
|
+
count: number;
|
|
209
|
+
totalTime: number;
|
|
210
|
+
avgTime: number;
|
|
211
|
+
maxTime: number;
|
|
212
|
+
lastExecuted: number;
|
|
213
|
+
}
|
|
214
|
+
interface ActionPerformanceEntry {
|
|
215
|
+
readonly actionType: string;
|
|
216
|
+
readonly timestamp: number;
|
|
217
|
+
readonly metrics: PerformanceMetrics;
|
|
218
|
+
readonly warnings: readonly PerformanceWarning[];
|
|
219
|
+
}
|
|
220
|
+
interface RenderImpactData {
|
|
221
|
+
readonly score: number;
|
|
222
|
+
readonly level: 'low' | 'medium' | 'high' | 'critical';
|
|
223
|
+
readonly estimatedComponentsAffected: number;
|
|
224
|
+
readonly factors: readonly RenderImpactFactorData[];
|
|
225
|
+
readonly recommendations: readonly string[];
|
|
226
|
+
}
|
|
227
|
+
interface RenderImpactFactorData {
|
|
228
|
+
readonly name: string;
|
|
229
|
+
readonly description: string;
|
|
230
|
+
readonly impact: number;
|
|
231
|
+
readonly details?: string;
|
|
232
|
+
}
|
|
233
|
+
interface SelectorMetricsData {
|
|
234
|
+
readonly name: string;
|
|
235
|
+
readonly invocationCount: number;
|
|
236
|
+
readonly recomputationCount: number;
|
|
237
|
+
readonly totalComputationTime: number;
|
|
238
|
+
readonly avgComputationTime: number;
|
|
239
|
+
maxComputationTime: number;
|
|
240
|
+
cacheHitRate: number;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
interface RenderPerformanceEntry {
|
|
244
|
+
readonly actionType: string;
|
|
245
|
+
readonly timestamp: number;
|
|
246
|
+
readonly renderTime: number;
|
|
247
|
+
}
|
|
248
|
+
interface RenderPerformanceStats {
|
|
249
|
+
readonly avgRenderTime: number;
|
|
250
|
+
readonly maxRenderTime: number;
|
|
251
|
+
readonly slowestAction: string | null;
|
|
252
|
+
readonly totalActions: number;
|
|
253
|
+
}
|
|
254
|
+
interface AggregatedPerformanceStats {
|
|
255
|
+
readonly totalActions: number;
|
|
256
|
+
readonly avgReducerTime: number;
|
|
257
|
+
readonly maxReducerTime: number;
|
|
258
|
+
readonly slowestAction: string | null;
|
|
259
|
+
readonly currentStateSize: number;
|
|
260
|
+
readonly actionsPerSecond: number;
|
|
261
|
+
readonly performanceScore: number;
|
|
262
|
+
readonly actionTypeStats: Map<string, ActionTypeStats>;
|
|
263
|
+
}
|
|
264
|
+
interface WarningsSummary {
|
|
265
|
+
readonly type: PerformanceWarningType;
|
|
266
|
+
readonly count: number;
|
|
267
|
+
readonly severity: 'low' | 'medium' | 'high';
|
|
268
|
+
}
|
|
269
|
+
declare class PerformanceTrackerService {
|
|
270
|
+
private entries;
|
|
271
|
+
private warnings;
|
|
272
|
+
private readonly platformId;
|
|
273
|
+
private readonly injector;
|
|
274
|
+
private readonly isBrowser;
|
|
275
|
+
private thresholds;
|
|
276
|
+
private firstActionTime;
|
|
277
|
+
measureRenderTime<State>(actionType: string, reducer: () => State, callback: (renderTime: number) => void): State;
|
|
278
|
+
getEntries(): readonly RenderPerformanceEntry[];
|
|
279
|
+
getStats(): RenderPerformanceStats;
|
|
280
|
+
getAggregatedStats(): AggregatedPerformanceStats;
|
|
281
|
+
getThresholds(): PerformanceThresholds;
|
|
282
|
+
setThresholds(thresholds: Partial<PerformanceThresholds>): void;
|
|
283
|
+
getWarningsSummary(): WarningsSummary[];
|
|
284
|
+
getSlowestRenders(limit?: number): readonly RenderPerformanceEntry[];
|
|
285
|
+
clear(): void;
|
|
286
|
+
private getActionTypeStats;
|
|
287
|
+
private calculatePerformanceScore;
|
|
288
|
+
private maxSeverity;
|
|
289
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PerformanceTrackerService, never>;
|
|
290
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PerformanceTrackerService>;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
interface PerformanceRecommendation {
|
|
294
|
+
readonly category: 'reducer' | 'state' | 'actions' | 'memory' | 'general';
|
|
295
|
+
readonly title: string;
|
|
296
|
+
readonly description: string;
|
|
297
|
+
readonly impact: 'low' | 'medium' | 'high';
|
|
298
|
+
readonly codeExample?: string;
|
|
299
|
+
readonly learnMoreUrl?: string;
|
|
300
|
+
}
|
|
301
|
+
interface PerformanceReport {
|
|
302
|
+
readonly timestamp: string;
|
|
303
|
+
readonly overallScore: number;
|
|
304
|
+
readonly scoreGrade: 'A' | 'B' | 'C' | 'D' | 'F';
|
|
305
|
+
readonly stats: AggregatedPerformanceStats;
|
|
306
|
+
readonly recommendations: readonly PerformanceRecommendation[];
|
|
307
|
+
readonly hotspots: readonly HotspotInfo[];
|
|
308
|
+
readonly trends: PerformanceTrends;
|
|
309
|
+
}
|
|
310
|
+
interface HotspotInfo {
|
|
311
|
+
readonly actionType: string;
|
|
312
|
+
readonly issue: string;
|
|
313
|
+
readonly avgTime: number;
|
|
314
|
+
readonly callCount: number;
|
|
315
|
+
readonly totalTime: number;
|
|
316
|
+
readonly percentOfTotal: number;
|
|
317
|
+
}
|
|
318
|
+
interface PerformanceTrends {
|
|
319
|
+
readonly reducerTimesTrend: 'improving' | 'stable' | 'degrading';
|
|
320
|
+
readonly stateSizeTrend: 'stable' | 'growing' | 'shrinking';
|
|
321
|
+
readonly actionFrequencyTrend: 'stable' | 'increasing' | 'decreasing';
|
|
322
|
+
}
|
|
323
|
+
declare class PerformanceAnalyzerService {
|
|
324
|
+
private previousStats;
|
|
325
|
+
private readonly performanceTracker;
|
|
326
|
+
generateReport(): PerformanceReport;
|
|
327
|
+
getQuickSummary(): {
|
|
328
|
+
score: number;
|
|
329
|
+
grade: string;
|
|
330
|
+
mainIssue: string | null;
|
|
331
|
+
actionCount: number;
|
|
332
|
+
avgReducerTime: number;
|
|
333
|
+
};
|
|
334
|
+
analyzeActionType(actionType: string): {
|
|
335
|
+
stats: ActionTypeStats | undefined;
|
|
336
|
+
isProblematic: boolean;
|
|
337
|
+
issues: string[];
|
|
338
|
+
suggestions: string[];
|
|
339
|
+
};
|
|
340
|
+
private generateRecommendations;
|
|
341
|
+
private identifyHotspots;
|
|
342
|
+
private analyzeTrends;
|
|
343
|
+
private getScoreGrade;
|
|
344
|
+
private getWarningDescription;
|
|
345
|
+
private formatBytes;
|
|
346
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PerformanceAnalyzerService, never>;
|
|
347
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PerformanceAnalyzerService>;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
interface RenderImpactEstimate {
|
|
351
|
+
readonly score: number;
|
|
352
|
+
readonly level: 'low' | 'medium' | 'high' | 'critical';
|
|
353
|
+
readonly estimatedComponentsAffected: number;
|
|
354
|
+
readonly factors: readonly RenderImpactFactor[];
|
|
355
|
+
readonly recommendations: readonly string[];
|
|
356
|
+
}
|
|
357
|
+
interface RenderImpactFactor {
|
|
358
|
+
readonly name: string;
|
|
359
|
+
readonly description: string;
|
|
360
|
+
readonly impact: number;
|
|
361
|
+
readonly details?: string;
|
|
362
|
+
}
|
|
363
|
+
interface StateChangeAnalysis {
|
|
364
|
+
rootPropertiesChanged: number;
|
|
365
|
+
totalPropertiesChanged: number;
|
|
366
|
+
arrayChanges: ArrayChangeInfo[];
|
|
367
|
+
largeObjectChanges: LargeObjectChange[];
|
|
368
|
+
maxChangeDepth: number;
|
|
369
|
+
}
|
|
370
|
+
interface ArrayChangeInfo {
|
|
371
|
+
readonly path: string;
|
|
372
|
+
readonly previousLength: number;
|
|
373
|
+
readonly newLength: number;
|
|
374
|
+
readonly itemsAdded: number;
|
|
375
|
+
readonly itemsRemoved: number;
|
|
376
|
+
}
|
|
377
|
+
interface LargeObjectChange {
|
|
378
|
+
readonly path: string;
|
|
379
|
+
readonly size: number;
|
|
380
|
+
readonly changeType: 'added' | 'modified' | 'replaced';
|
|
381
|
+
}
|
|
382
|
+
declare function estimateRenderImpact(prevState: unknown, nextState: unknown): RenderImpactEstimate;
|
|
383
|
+
|
|
384
|
+
interface SelectorMetrics {
|
|
385
|
+
readonly name: string;
|
|
386
|
+
invocationCount: number;
|
|
387
|
+
recomputationCount: number;
|
|
388
|
+
totalComputationTime: number;
|
|
389
|
+
avgComputationTime: number;
|
|
390
|
+
maxComputationTime: number;
|
|
391
|
+
lastComputationTime: number;
|
|
392
|
+
cacheHitRate: number;
|
|
393
|
+
lastInvoked: number;
|
|
394
|
+
triggeringActions: string[];
|
|
395
|
+
}
|
|
396
|
+
interface SelectorInvocation {
|
|
397
|
+
readonly selectorName: string;
|
|
398
|
+
readonly timestamp: number;
|
|
399
|
+
readonly computationTime: number;
|
|
400
|
+
readonly wasRecomputed: boolean;
|
|
401
|
+
readonly inputChanged: boolean;
|
|
402
|
+
readonly triggeringAction?: string;
|
|
403
|
+
}
|
|
404
|
+
interface EndToEndTiming {
|
|
405
|
+
readonly actionType: string;
|
|
406
|
+
readonly actionDispatchTime: number;
|
|
407
|
+
readonly reducerCompleteTime: number;
|
|
408
|
+
readonly selectorsCompleteTime: number;
|
|
409
|
+
readonly totalTime: number;
|
|
410
|
+
readonly reducerTime: number;
|
|
411
|
+
readonly selectorTime: number;
|
|
412
|
+
readonly affectedSelectors: readonly string[];
|
|
413
|
+
}
|
|
414
|
+
declare class SelectorTrackerService {
|
|
415
|
+
private readonly selectorMetrics;
|
|
416
|
+
private recentInvocations;
|
|
417
|
+
private pendingAction;
|
|
418
|
+
private endToEndTimings;
|
|
419
|
+
markActionDispatch(actionType: string): void;
|
|
420
|
+
markReducerComplete(reducerTime: number): void;
|
|
421
|
+
recordSelectorInvocation(selectorName: string, computationTime: number, wasRecomputed: boolean, inputChanged: boolean): void;
|
|
422
|
+
markSelectorsComplete(): EndToEndTiming | null;
|
|
423
|
+
getAllMetrics(): ReadonlyMap<string, SelectorMetrics>;
|
|
424
|
+
getMetrics(selectorName: string): SelectorMetrics | undefined;
|
|
425
|
+
getSlowestSelectors(limit?: number): readonly SelectorMetrics[];
|
|
426
|
+
getInefficientSelectors(cacheHitThreshold?: number): readonly SelectorMetrics[];
|
|
427
|
+
getEndToEndTimings(): readonly EndToEndTiming[];
|
|
428
|
+
getAverageEndToEndTime(): number;
|
|
429
|
+
clear(): void;
|
|
430
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectorTrackerService, never>;
|
|
431
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SelectorTrackerService>;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
declare function setSelectorTracker(tracker: SelectorTrackerService): void;
|
|
435
|
+
declare function trackSelector<State, Result>(name: string, selector: MemoizedSelector<State, Result>): MemoizedSelector<State, Result>;
|
|
436
|
+
declare function createTrackedSelector<State, S1, Result>(name: string, s1: Selector<State, S1>, projector: (s1: S1) => Result): MemoizedSelector<State, Result>;
|
|
437
|
+
declare function createTrackedSelector<State, S1, S2, Result>(name: string, s1: Selector<State, S1>, s2: Selector<State, S2>, projector: (s1: S1, s2: S2) => Result): MemoizedSelector<State, Result>;
|
|
438
|
+
declare function createTrackedSelector<State, S1, S2, S3, Result>(name: string, s1: Selector<State, S1>, s2: Selector<State, S2>, s3: Selector<State, S3>, projector: (s1: S1, s2: S2, s3: S3) => Result): MemoizedSelector<State, Result>;
|
|
439
|
+
declare function createTrackedSelector<State, S1, S2, S3, S4, Result>(name: string, s1: Selector<State, S1>, s2: Selector<State, S2>, s3: Selector<State, S3>, s4: Selector<State, S4>, projector: (s1: S1, s2: S2, s3: S3, s4: S4) => Result): MemoizedSelector<State, Result>;
|
|
440
|
+
declare function TrackedSelector(name: string): (target: Record<string, unknown>, propertyKey: string) => void;
|
|
441
|
+
|
|
442
|
+
interface RenderPerformanceData {
|
|
443
|
+
readonly renderTime: number;
|
|
444
|
+
}
|
|
445
|
+
interface StateChangeMessage {
|
|
446
|
+
type: 'STATE_CHANGE';
|
|
447
|
+
action: Action;
|
|
448
|
+
prevState: unknown;
|
|
449
|
+
nextState: unknown;
|
|
450
|
+
timestamp: string;
|
|
451
|
+
renderPerformance?: RenderPerformanceData;
|
|
452
|
+
}
|
|
453
|
+
interface DevToolMetaReducerConfig {
|
|
454
|
+
readonly wsUrl?: string;
|
|
455
|
+
readonly enablePerformanceTracking?: boolean;
|
|
456
|
+
}
|
|
457
|
+
declare function createDevToolMetaReducer(wsUrlOrConfig?: string | DevToolMetaReducerConfig): <State>(reducer: ActionReducer<State>) => ActionReducer<State>;
|
|
458
|
+
declare function loggerMetaReducer<State>(reducer: ActionReducer<State>): ActionReducer<State>;
|
|
459
|
+
|
|
460
|
+
interface DevToolConfig {
|
|
461
|
+
readonly wsUrl?: string;
|
|
462
|
+
readonly trackEffects?: boolean;
|
|
463
|
+
}
|
|
464
|
+
declare function provideNgrxDevTool(config?: DevToolConfig): Provider[];
|
|
465
|
+
declare function provideEffectTracking(): Provider;
|
|
466
|
+
|
|
467
|
+
export { ActionsInterceptorService, DevToolsEffectSources, EffectTrackerService, PerformanceAnalyzerService, PerformanceTrackerService, PerformanceWarningType, SelectorTrackerService, TrackedSelector, WebSocketService, createDevToolMetaReducer, createTrackedSelector, estimateRenderImpact, loggerMetaReducer, provideEffectTracking, provideNgrxDevTool, setSelectorTracker, trackSelector };
|
|
468
|
+
export type { ActionDispatchedPayload, ActionPerformanceEntry, ActionSource, ActionTypeStats, AggregatedPerformanceStats, ArrayChangeInfo, DevToolConfig, DevToolEffectEventPayload, DevToolMessage, DevToolMessageType, DevToolMetaReducerConfig, EffectEvent, EffectLifecycle, EffectMetadataInfo, EffectStatus, EndToEndTiming, HotspotInfo, LargeObjectChange, MemoryInfo, PerformanceMetrics, PerformanceRecommendation, PerformanceReport, PerformanceThresholds, PerformanceTrends, PerformanceWarning, RenderImpactData, RenderImpactEstimate, RenderImpactFactor, RenderImpactFactorData, RenderPerformanceData, RenderPerformanceEntry, RenderPerformanceStats, SelectorInvocation, SelectorMetrics, SelectorMetricsData, StateChangeAnalysis, StateChangeMessage, TrackedAction, TrackedEffect, WarningsSummary, WebSocketMessage };
|