@@ -104,8 +104,8 @@ class Profiler extends React.Component<ProfilerProps> {
104104
105105 public static defaultProps : Partial < ProfilerProps > = {
106106 disabled : false ,
107- hasRenderSpan : true ,
108- hasUpdateSpan : true ,
107+ includeRender : true ,
108+ includeUpdates : true ,
109109 } ;
110110
111111 public constructor ( props : ProfilerProps ) {
@@ -130,11 +130,11 @@ class Profiler extends React.Component<ProfilerProps> {
130130 this . mountActivity = null ;
131131 }
132132
133- public componentDidUpdate ( { updateProps, hasUpdateSpan = true } : ProfilerProps ) : void {
133+ public componentDidUpdate ( { updateProps, includeUpdates = true } : ProfilerProps ) : void {
134134 // Only generate an update span if hasUpdateSpan is true, if there is a valid mountSpan,
135135 // and if the updateProps have changed. It is ok to not do a deep equality check here as it is expensive.
136136 // We are just trying to give baseline clues for further investigation.
137- if ( hasUpdateSpan && this . mountSpan && updateProps !== this . props . updateProps ) {
137+ if ( includeUpdates && this . mountSpan && updateProps !== this . props . updateProps ) {
138138 // See what props haved changed between the previous props, and the current props. This is
139139 // set as data on the span. We just store the prop keys as the values could be potenially very large.
140140 const changedProps = Object . keys ( updateProps ) . filter ( k => updateProps [ k ] !== this . props . updateProps [ k ] ) ;
@@ -158,9 +158,9 @@ class Profiler extends React.Component<ProfilerProps> {
158158 // If a component is unmounted, we can say it is no longer on the screen.
159159 // This means we can finish the span representing the component render.
160160 public componentWillUnmount ( ) : void {
161- const { name, hasRenderSpan = true } = this . props ;
161+ const { name, includeRender = true } = this . props ;
162162
163- if ( this . mountSpan && hasRenderSpan ) {
163+ if ( this . mountSpan && includeRender ) {
164164 // If we were able to obtain the spanId of the mount activity, we should set the
165165 // next activity as a child to the component mount activity.
166166 this . mountSpan . startChild ( {
0 commit comments