cxfeng1 closed pull request #1483: [WEEX-599][iOS] add apm record isEnd flag
URL: https://github.com/apache/incubator-weex/pull/1483
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/ios/sdk/WeexSDK/Sources/Performance/WXInstanceApm.m
b/ios/sdk/WeexSDK/Sources/Performance/WXInstanceApm.m
index 4c11fba8ff..0c3050a23e 100644
--- a/ios/sdk/WeexSDK/Sources/Performance/WXInstanceApm.m
+++ b/ios/sdk/WeexSDK/Sources/Performance/WXInstanceApm.m
@@ -88,6 +88,7 @@ @interface WXApmForInstance ()
@property (nonatomic,strong) NSString* instanceId;
@property (nonatomic,strong) NSMutableDictionary<NSString*,NSNumber*>*
recordStatsMap;
@property (nonatomic,assign) BOOL isRecord;
+@property (nonatomic,assign) BOOL isEnd;
@property (nonatomic,strong) NSMutableDictionary<NSString*,NSNumber*>*
recordStageMap;
@property (nonatomic,strong) NSMutableArray<WXJSExceptionInfo*>* errorList;
@end
@@ -190,9 +191,10 @@ - (void) startRecord:(NSString*) instanceId
- (void) endRecord;
{
- if (nil == _apmProtocolInstance) {
+ if (nil == _apmProtocolInstance || self.isEnd) {
return;
}
+ self.isEnd = YES;
[self onStage:KEY_PAGE_STAGES_DESTROY];
[self.apmProtocolInstance onEnd];
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services