@@ -141,13 +141,26 @@ public void checkEmptyScreenAndReport() {
141
141
return ;
142
142
}
143
143
//2s limit of instance stayTime (case in\quit very fast case)
144
- final long DIFF_LIMIT = 2000 ;
145
- long useTime = 2001 ;
144
+ final long DIFF_LIMIT_FROM_RENDER_URL = 2000 ;
145
+ final long DIFF_LIMIT_FROM_RENDER_TEMPLATE = 1000 ;
146
+
147
+ long curTime = WXUtils .getFixUnixTime ();
146
148
Long startRequestTime = mStageMap .get (WXInstanceApm .KEY_PAGE_STAGES_DOWN_BUNDLE_START );
149
+ long useTime ;
150
+ String useTimeForm ;
151
+ boolean shouldReportByUseTime ;
147
152
if (null != startRequestTime ) {
148
- useTime = WXUtils .getFixUnixTime () - startRequestTime ;
153
+ useTime = curTime - startRequestTime ;
154
+ shouldReportByUseTime = useTime >= DIFF_LIMIT_FROM_RENDER_URL ;
155
+ useTimeForm = WXInstanceApm .KEY_PAGE_STAGES_DOWN_BUNDLE_START ;
156
+ }else {
157
+ Long startRenderTemplateTime = mStageMap .get (WXInstanceApm .KEY_PAGE_STAGES_RENDER_ORGIGIN );
158
+ useTime = null != startRenderTemplateTime ?curTime - startRenderTemplateTime :curTime ;
159
+ shouldReportByUseTime = useTime >= DIFF_LIMIT_FROM_RENDER_TEMPLATE ;
160
+ useTimeForm = WXInstanceApm .KEY_PAGE_STAGES_RENDER_ORGIGIN ;
149
161
}
150
- if (useTime < DIFF_LIMIT ) {
162
+
163
+ if (!shouldReportByUseTime ){
151
164
return ;
152
165
}
153
166
@@ -164,6 +177,7 @@ public void checkEmptyScreenAndReport() {
164
177
flagMap .put ("wxHasDegrade" ,String .valueOf (hasDegrade .get ()));
165
178
flagMap .put ("wxHasReportScreenEmpty" ,String .valueOf (mHasReportScreenEmpty ));
166
179
flagMap .put ("wxUseTime" , String .valueOf (useTime ));
180
+ flagMap .put ("wxUseTimeForm" , useTimeForm );
167
181
168
182
WXExceptionUtils .commitCriticalExceptionRT (
169
183
instanceId ,
0 commit comments