File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ interface IOptions {
2
+ shouldLog ?: boolean ;
3
+ port ?: number ;
4
+ components ?: string [ ] ;
5
+ }
6
+
7
+ interface IMeasureDetail {
8
+ averageTimeSpentMs : string ;
9
+ numberOfTimes : number ;
10
+ totalTimeSpentMs : number ;
11
+ }
12
+
13
+ interface IMeasure {
14
+ componentName : string ; // Name of the component
15
+ totalTimeSpent : number ; // Total time taken by the component combining all the phases
16
+ percentTimeSpent : string ; // Percent time
17
+ numberOfInstances : number ; // Number of instances of the component
18
+ mount : IMeasureDetail ; // Mount time
19
+ render : IMeasureDetail ; // Render time
20
+ update : IMeasureDetail ; // Update time
21
+ unmount : IMeasureDetail ; // Unmount time
22
+
23
+ // Time taken in lifecycle hooks
24
+ componentWillMount : IMeasureDetail ;
25
+ componentDidMount : IMeasureDetail ;
26
+ componentWillReceiveProps : IMeasureDetail ;
27
+ shouldComponentUpdate : IMeasureDetail ;
28
+ componentWillUpdate : IMeasureDetail ;
29
+ componentDidUpdate : IMeasureDetail ;
30
+ componentWillUnmount : IMeasureDetail ;
31
+ }
32
+
33
+ declare module 'react-perf-devtool' {
34
+ function registerObserver (
35
+ options ?: IOptions ,
36
+ callback ?: ( measures : Array < IMeasure > ) => void
37
+ ) : void
38
+ }
You can’t perform that action at this time.
0 commit comments