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

Commit

Permalink
[WEEX-599][iOS] add apm record isEnd flag (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky-chen authored and cxfeng1 committed Aug 29, 2018
1 parent 3606120 commit 2fca54f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/sdk/WeexSDK/Sources/Performance/WXInstanceApm.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 2fca54f

Please sign in to comment.