Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[WEEX-607][iOS] [weex monitor improvement (#1500)
Browse files Browse the repository at this point in the history
* [iOS] edit img size monitor  && report download faild

* [iOS] emptyscreen check,bad case fix (destroy but js not excute)

* [iOS] request type add
  • Loading branch information
lucky-chen authored and cxfeng1 committed Sep 6, 2018
1 parent 876c152 commit 5108cac
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 92 deletions.
24 changes: 7 additions & 17 deletions ios/sdk/WeexSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
042013AD1E66CD6A001FC79C /* WXValidateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 042013AC1E66CD6A001FC79C /* WXValidateProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
17036A4E20FDE72F0029AE3D /* WXApmForInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 17036A4C20FDE72F0029AE3D /* WXApmForInstance.h */; settings = {ATTRIBUTES = (Public, ); }; };
17036A4F20FDE72F0029AE3D /* WXApmForInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 17036A4C20FDE72F0029AE3D /* WXApmForInstance.h */; settings = {ATTRIBUTES = (Public, ); }; };
17036A5020FDE72F0029AE3D /* WXInstanceApm.m in Sources */ = {isa = PBXBuildFile; fileRef = 17036A4D20FDE72F0029AE3D /* WXInstanceApm.m */; };
17036A5120FDE72F0029AE3D /* WXInstanceApm.m in Sources */ = {isa = PBXBuildFile; fileRef = 17036A4D20FDE72F0029AE3D /* WXInstanceApm.m */; };
17036A5320FDE7490029AE3D /* WXApmProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 17036A5220FDE7490029AE3D /* WXApmProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
17036A5420FDE7490029AE3D /* WXApmProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 17036A5220FDE7490029AE3D /* WXApmProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
170B4664208733AF00562666 /* WXAnalyzerCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 17C74F092072145000AB4CAB /* WXAnalyzerCenter.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand All @@ -23,6 +21,8 @@
176BE43C209172330086B6AF /* WXComponent+Layout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 176BE43B209172330086B6AF /* WXComponent+Layout.mm */; };
176BE43D209172A30086B6AF /* WXScrollerComponent+Layout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 17C7B4FF20452E1800A2296A /* WXScrollerComponent+Layout.mm */; };
176BE43E209172E20086B6AF /* WXScrollerComponent+Layout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 17C7B4FF20452E1800A2296A /* WXScrollerComponent+Layout.mm */; };
1771795521412A5D006F39A9 /* WXApmForInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 1771795421412A5D006F39A9 /* WXApmForInstance.m */; };
1771795621412A5D006F39A9 /* WXApmForInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 1771795421412A5D006F39A9 /* WXApmForInstance.m */; };
178EDF0D204FEC1300917F6B /* WXScrollerComponent+Layout.h in Headers */ = {isa = PBXBuildFile; fileRef = 17C7B50020452E1800A2296A /* WXScrollerComponent+Layout.h */; };
178EDF0F204FF11700917F6B /* WXCoreLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 17C7B50420452E1800A2296A /* WXCoreLayout.h */; settings = {ATTRIBUTES = (Public, ); }; };
17B122212090AA9300387E33 /* WXSDKInstance_performance.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B1221F2090AA9300387E33 /* WXSDKInstance_performance.m */; };
Expand Down Expand Up @@ -652,11 +652,11 @@

/* Begin PBXFileReference section */
042013AC1E66CD6A001FC79C /* WXValidateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXValidateProtocol.h; sourceTree = "<group>"; };
1746EA7220E9D253007E55BD /* WXComponent_performance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXComponent_performance.h; sourceTree = "<group>"; };
17036A4C20FDE72F0029AE3D /* WXApmForInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApmForInstance.h; sourceTree = "<group>"; };
17036A4D20FDE72F0029AE3D /* WXInstanceApm.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXInstanceApm.m; sourceTree = "<group>"; };
17036A5220FDE7490029AE3D /* WXApmProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApmProtocol.h; sourceTree = "<group>"; };
1746EA7220E9D253007E55BD /* WXComponent_performance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXComponent_performance.h; sourceTree = "<group>"; };
176BE43B209172330086B6AF /* WXComponent+Layout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "WXComponent+Layout.mm"; path = "Layout/WXComponent+Layout.mm"; sourceTree = "<group>"; };
1771795421412A5D006F39A9 /* WXApmForInstance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXApmForInstance.m; sourceTree = "<group>"; };
17B1221F2090AA9300387E33 /* WXSDKInstance_performance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXSDKInstance_performance.m; sourceTree = "<group>"; };
17B122202090AA9300387E33 /* WXSDKInstance_performance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXSDKInstance_performance.h; sourceTree = "<group>"; };
17B122232090AAB000387E33 /* WXSDKError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXSDKError.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1035,21 +1035,11 @@
isa = PBXGroup;
children = (
17036A4C20FDE72F0029AE3D /* WXApmForInstance.h */,
17036A4D20FDE72F0029AE3D /* WXInstanceApm.m */,
1771795421412A5D006F39A9 /* WXApmForInstance.m */,
);
path = Performance;
sourceTree = "<group>";
};
17B12228209170CF00387E33 /* Recovered References */ = {
isa = PBXGroup;
children = (
8431F8DD1F9EFCC100C76E1E /* WXScrollerComponent+Layout.mm */,
59D3CA461CFC3CC0008835DC /* WXSliderComponent.mm */,
847E1DE01F9A1BCF00A48124 /* WXCoreStyle.h */,
);
name = "Recovered References";
sourceTree = "<group>";
};
2A42AF861C23B33E00818EA6 /* WeexSDK_MTL */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -2252,6 +2242,7 @@
74A4BA9B1CB3BAA100195969 /* WXThreadSafeMutableDictionary.m in Sources */,
77E65A1A1C155F25008B8775 /* WXScrollerComponent.mm in Sources */,
747A787D1D1BAAC900DED9D0 /* WXComponent+ViewManagement.mm in Sources */,
1771795521412A5D006F39A9 /* WXApmForInstance.m in Sources */,
C4E375371E5FCBD3009B2D9C /* WXComponent+BoxShadow.m in Sources */,
C43C03E91EC8ACA40044C7FF /* WXPrerenderManager.m in Sources */,
2A837AB51CD9DE9200AEDF03 /* WXLoadingIndicator.m in Sources */,
Expand Down Expand Up @@ -2324,7 +2315,6 @@
74862F821E03A24500B7A041 /* WXComponentMethod.m in Sources */,
77E65A121C155EA8008B8775 /* WXImageComponent.m in Sources */,
74CFDD3E1F459400007A1A66 /* WXRecycleListDataManager.m in Sources */,
17036A5020FDE72F0029AE3D /* WXInstanceApm.m in Sources */,
2A837AB31CD9DE9200AEDF03 /* WXLoadingComponent.mm in Sources */,
2AE5B7531CAB7DBD0082FDDB /* WXAComponent.m in Sources */,
176BE43C209172330086B6AF /* WXComponent+Layout.mm in Sources */,
Expand Down Expand Up @@ -2415,7 +2405,6 @@
DCA445511EFA55B300D0CFA8 /* WXCycleSliderComponent.mm in Sources */,
DCE2CF9D1F46D4370021BDC4 /* WXVoiceOverModule.m in Sources */,
DCA445531EFA55B300D0CFA8 /* WXCellComponent.mm in Sources */,
17036A5120FDE72F0029AE3D /* WXInstanceApm.m in Sources */,
DCA445541EFA55B300D0CFA8 /* WXListComponent.mm in Sources */,
DCA445551EFA55B300D0CFA8 /* WXIndicatorComponent.m in Sources */,
17E5ACDB2091F05700EE81F1 /* WXComponent+Layout.mm in Sources */,
Expand Down Expand Up @@ -2485,6 +2474,7 @@
DCA4458C1EFA55B300D0CFA8 /* WXServiceFactory.m in Sources */,
DCA4458D1EFA55B300D0CFA8 /* WXInvocationConfig.m in Sources */,
DCA4458E1EFA55B300D0CFA8 /* WXDatePickerManager.m in Sources */,
1771795621412A5D006F39A9 /* WXApmForInstance.m in Sources */,
DCA4458F1EFA55B300D0CFA8 /* WXSDKManager.m in Sources */,
DCA445901EFA55B300D0CFA8 /* WXBridgeManager.m in Sources */,
DCA445911EFA55B300D0CFA8 /* WXModuleFactory.m in Sources */,
Expand Down
23 changes: 13 additions & 10 deletions ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -429,20 +429,23 @@ - (void)updateImage
}
[strongSelf fireEvent:@"load" params:@{ @"success": error? @false : @true,@"size":sizeDict}];
}
NSString* curUrl = imageURL.absoluteString;
//check view/img size
if (!error && image && strongSelf.view) {
double imageSize = image.size.width * image.scale * image.size.height * image.scale;
double viewSize = strongSelf.view.frame.size.height * strongSelf.view.frame.size.width;
if (imageSize > viewSize+1) {
if (!error && image && imageView && ![curUrl isEqualToString:self.preUrl]) {
self.preUrl = curUrl;
CGFloat screenScale = [[UIScreen mainScreen] scale];
double imageSize = image.size.width*image.scale * image.size.height*image.scale;
double viewSize = imageView.frame.size.height *screenScale* imageView.frame.size.width * screenScale;
CGFloat sizeRatio = imageSize/viewSize;

//minDiffSize limt 40*40
if (sizeRatio>1.2 && (imageSize-viewSize) > 1600) {
self.weexInstance.performance.imgWrongSizeNum++;
[self.weexInstance.apmInstance updateDiffStats:KEY_PAGE_STATS_WRONG_IMG_SIZE_COUNT withDiffValue:1];
}
NSString* curUrl = imageURL.absoluteString;
if (![curUrl isEqualToString:self.preUrl]) {
self.preUrl = curUrl;
if (image.size.width >1080 && image.size.height > 1920) {
[self.weexInstance.apmInstance updateDiffStats:KEY_PAGE_STATS_LARGE_IMG_COUNT withDiffValue:1];
}

if (image.size.width* image.scale > 720 && image.size.height * image.scale> 1080) {
[self.weexInstance.apmInstance updateDiffStats:KEY_PAGE_STATS_LARGE_IMG_COUNT withDiffValue:1];
}
}
}];
Expand Down
4 changes: 3 additions & 1 deletion ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define WX_ERROR_TYPE_JS @"JS_ERROR"
#define WX_ERROR_TYPE_DEGRADE @"DEGRADE_ERROR"
#define WX_ERROR_TYPE_RENDER @"RENDER_ERROR"
#define WX_ERROR_TYPE_DOWNLOAD @"DOWN_LOAD_ERROR"


typedef NS_ENUM(int, WXSDKErrCode)
Expand Down Expand Up @@ -88,7 +89,8 @@ typedef NS_ENUM (NSInteger,WXSDKErrorType)
WX_JS_ERROR,
WX_NATIVE_ERROR,
WX_RENDER_ERROR,
WX_DEGRADE_ERROR
WX_DEGRADE_ERROR,
WX_DOWN_LOAD_ERROR
};

typedef NS_ENUM (NSInteger,WXSDKErrorGroup){
Expand Down
4 changes: 3 additions & 1 deletion ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ +(NSDictionary *) getMap

@(WX_KEY_EXCEPTION_SDK_INIT):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
@(WX_KEY_EXCEPTION_INVOKE):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
@(WX_KEY_EXCEPTION_JS_DOWNLOAD):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
@(WX_KEY_EXCEPTION_JS_DOWNLOAD):@{ERROR_TYPE:@(WX_DOWN_LOAD_ERROR),ERROR_GROUP:@(WX_NATIVE)},
@(WX_KEY_EXCEPTION_DOM):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
@(WX_KEY_EXCEPTION_WXBRIDGE):@{ERROR_TYPE:@(WX_JS_ERROR),ERROR_GROUP:@(WX_JS)},

Expand Down Expand Up @@ -115,6 +115,8 @@ + (NSString *) convertTypeToStringName:(WXSDKErrorType)type
return WX_ERROR_TYPE_RENDER;
case WX_DEGRADE_ERROR:
return WX_ERROR_TYPE_DEGRADE;
case WX_DOWN_LOAD_ERROR:
return WX_ERROR_TYPE_DOWNLOAD;
case WX_NATIVE_ERROR:
default:
return WX_ERROR_TYPE_NATIVE;
Expand Down
28 changes: 22 additions & 6 deletions ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ - (void)setFrame:(CGRect)frame
#endif
if (!CGRectEqualToRect(frame, _frame)) {
_frame = frame;
CGFloat screenHeight = [[UIScreen mainScreen] bounds].size.height;
if (screenHeight>0) {
CGFloat pageRatio = frame.size.height/screenHeight *100;
pageRatio = pageRatio>100?100:pageRatio;
[self.apmInstance setStatistic:KEY_PAGE_STATS_BODY_RATIO withValue:pageRatio];
}
WXPerformBlockOnMainThread(^{
if (_rootView) {
_rootView.frame = frame;
Expand Down Expand Up @@ -398,7 +404,6 @@ - (void)_renderWithRequest:(WXResourceRequest *)request options:(NSDictionary *)
[self.apmInstance onStage:KEY_PAGE_STAGES_DOWN_BUNDLE_START];
_mainBundleLoader.onFinished = ^(WXResourceResponse *response, NSData *data) {
__strong typeof(weakSelf) strongSelf = weakSelf;
[strongSelf.apmInstance onStage:KEY_PAGE_STAGES_DOWN_BUNDLE_END];
NSError *error = nil;
if ([response isKindOfClass:[NSHTTPURLResponse class]] && ((NSHTTPURLResponse *)response).statusCode != 200) {
error = [NSError errorWithDomain:WX_ERROR_DOMAIN
Expand All @@ -414,22 +419,30 @@ - (void)_renderWithRequest:(WXResourceRequest *)request options:(NSDictionary *)
}

if (error) {
WXJSExceptionInfo * jsExceptionInfo = [[WXJSExceptionInfo alloc] initWithInstanceId:@"" bundleUrl:[request.URL absoluteString] errorCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_JS_DOWNLOAD] functionName:@"_renderWithRequest:options:data:" exception:[error localizedDescription] userInfo:nil];
[WXExceptionUtils commitCriticalExceptionRT:jsExceptionInfo];
[WXExceptionUtils commitCriticalExceptionRT:strongSelf.instanceId
errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_JS_DOWNLOAD]
function:@"_renderWithRequest:options:data:"
exception:[NSString stringWithFormat:@"download bundle error :%@",[error localizedDescription]]
extParams:nil];

strongSelf.apmInstance.isDownLoadFailed = YES;
[strongSelf.apmInstance setProperty:KEY_PROPERTIES_ERROR_CODE withValue:[@(WX_KEY_EXCEPTION_JS_DOWNLOAD) stringValue]];
return;
}

if (!data) {
NSString *errorMessage = [NSString stringWithFormat:@"Request to %@ With no data return", request.URL];
WX_MONITOR_FAIL_ON_PAGE(WXMTJSDownload, WX_ERR_JSBUNDLE_DOWNLOAD, errorMessage, strongSelf.pageName);

WXJSExceptionInfo * jsExceptionInfo = [[WXJSExceptionInfo alloc] initWithInstanceId:@"" bundleUrl:[request.URL absoluteString] errorCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_JS_DOWNLOAD] functionName:@"_renderWithRequest:options:data:" exception:@"no data return" userInfo:nil];
[WXExceptionUtils commitCriticalExceptionRT:jsExceptionInfo];
[WXExceptionUtils commitCriticalExceptionRT:strongSelf.instanceId
errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_JS_DOWNLOAD]
function:@"_renderWithRequest:options:data:"
exception:@"no data return"
extParams:nil];

if (strongSelf.onFailed) {
strongSelf.onFailed(error);
}
strongSelf.apmInstance.isDownLoadFailed = YES;
[strongSelf.apmInstance setProperty:KEY_PROPERTIES_ERROR_CODE withValue:[@(WX_KEY_EXCEPTION_JS_DOWNLOAD) stringValue]];
return;
}
Expand Down Expand Up @@ -458,7 +471,10 @@ - (void)_renderWithRequest:(WXResourceRequest *)request options:(NSDictionary *)
return;
}
}


[strongSelf.apmInstance onStage:KEY_PAGE_STAGES_DOWN_BUNDLE_END];
[strongSelf.apmInstance updateExtInfoFromResponseHeader:response.allHeaderFields];
[strongSelf _renderWithMainBundleString:jsBundleString];
[WXTracingManager setBundleJSType:jsBundleString instanceId:weakSelf.instanceId];
[WXMonitor performanceFinishWithState:DebugAfterRequest instance:strongSelf];
Expand Down
4 changes: 4 additions & 0 deletions ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ - (void) _handleRenderTime:(WXComponent*)targetComponent withModifyTime:(double)
NSStringFromCGRect(targetComponent.weexInstance.rootView.frame)
);
#endif
if (!targetComponent.weexInstance.apmInstance.hasRecordFirstInterationView) {
targetComponent.weexInstance.apmInstance.hasRecordFirstInterationView = YES;
[targetComponent.weexInstance.apmInstance onStage:KEY_PAGE_STAGES_FIRST_INTERACTION_VIEW];
}
[targetComponent.weexInstance.apmInstance onStage:KEY_PAGE_STAGES_INTERACTION];
self.interactionLimitAddOpCount++;
self.interactionAddCount = self.interactionAddCountRecord;
Expand Down
4 changes: 2 additions & 2 deletions ios/sdk/WeexSDK/Sources/Monitor/WXAnalyzerCenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ +(void)transErrorInfo:(WXJSExceptionInfo *)errorInfo
return;
}
NSDictionary *dic= @{
@"errorCode":errorInfo.errorCode,
@"errorCode":errorInfo.errorCode?:@"-1",
@"errorGroup":@"",
@"errorMsg":errorInfo.exception
@"errorMsg":errorInfo.exception?:@"unSetException"
};

[self _transDataToAnaylzer:instance
Expand Down
17 changes: 16 additions & 1 deletion ios/sdk/WeexSDK/Sources/Monitor/WXExceptionUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,22 @@ + (void)commitCriticalExceptionRT:(NSString *)instanceId errCode:(NSString *)err
}
[extInfo setObject:[self _convertInstanceStageToStr:instance] forKey:@"wxStageList"];
[extInfo setObject:instance.pageName?:@"unKnowPageNameCaseUnSet" forKey:@"wxPageName"];
[extInfo setObject:instance.bundleTemplate?:@"has recycle" forKey:@"wxTemplateOfBundle"];
NSString* bundleTemplateCommit = @"has recycle";
if (nil != instance.bundleTemplate) {
NSUInteger strLength = instance.bundleTemplate.length;
bundleTemplateCommit = [instance.bundleTemplate substringWithRange:NSMakeRange(0, strLength>300?300:strLength)];
}
[extInfo setObject:bundleTemplateCommit forKey:@"wxTemplateOfBundle"];
[extInfo setObject:[instance.apmInstance templateInfo] forKey:@"templateInfo"];
NSNumber* pageStartTime = [instance.apmInstance.stageDic objectForKey:KEY_PAGE_STAGES_DOWN_BUNDLE_START];
if (nil == pageStartTime) {
pageStartTime = [instance.apmInstance.stageDic objectForKey:KEY_PAGE_STAGES_RENDER_ORGIGIN];
}
if (nil != pageStartTime) {
long useTime = [WXUtility getUnixFixTimeMillis] - pageStartTime.longValue;
[extInfo setObject:@(useTime) forKey:@"wxUseTime"];
}

}else if([instanceIdCommit hasPrefix:@"WX_KEY_EXCEPTION"]){
bundleUrlCommit = instanceId;
}
Expand Down
9 changes: 8 additions & 1 deletion ios/sdk/WeexSDK/Sources/Performance/WXApmForInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ extern NSString* const KEY_PAGE_STATS_IMG_LOAD_FAIL_NUM;
extern NSString* const KEY_PAGE_STATS_NET_NUM;
extern NSString* const KEY_PAGE_STATS_NET_SUCCESS_NUM;
extern NSString* const KEY_PAGE_STATS_NET_FAIL_NUM;
extern NSString* const KEY_PAGE_STAGES_FIRST_INTERACTION_VIEW;
extern NSString* const KEY_PAGE_STATS_BODY_RATIO;

///************** value *****************/
extern NSString* const VALUE_ERROR_CODE_DEFAULT;
Expand All @@ -83,6 +85,8 @@ extern NSString* const VALUE_ERROR_CODE_DEFAULT;
@property (nonatomic, assign) BOOL hasAddView;
@property (nonatomic, assign) BOOL isDegrade;
@property (nonatomic, assign) BOOL isStartRender;
@property (nonatomic,assign) BOOL hasRecordFirstInterationView;
@property (nonatomic, assign) BOOL isDownLoadFailed;

#pragma mark - basic method

Expand All @@ -99,7 +103,7 @@ extern NSString* const VALUE_ERROR_CODE_DEFAULT;
- (void) updateFSDiffStats:(NSString *)name withDiffValue:(double)diff;
- (void) updateDiffStats:(NSString *)name withDiffValue:(double)diff;
- (void) updateMaxStats:(NSString *)name curMaxValue:(double)maxValue;
- (void) updateExtInfo:(NSDictionary*) extInfo;
- (void) updateExtInfoFromResponseHeader:(NSDictionary*) extInfo;


#pragma mark - called by IWXHttpAdapter implementer
Expand All @@ -114,4 +118,7 @@ extern NSString* const VALUE_ERROR_CODE_DEFAULT;
#pragma mark record top5 errorMsg
- (void) recordErrorMsg:(WXJSExceptionInfo *)exception;
- (NSDictionary<NSString*,NSNumber*>*) stageDic;

#pragma templateinfo
- (NSString*) templateInfo;
@end
Loading

0 comments on commit 5108cac

Please sign in to comment.