You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2018/12/28 08:34:48 UTC

[GitHub] lucky-chen closed pull request #1343: [WEEX-520][iOS] calibration performance of interactionTime

lucky-chen closed pull request #1343: [WEEX-520][iOS] calibration performance of interactionTime
URL: https://github.com/apache/incubator-weex/pull/1343
 
 
   

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.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 6b0bfb2210..92753ed8f9 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -11,6 +11,9 @@
 		170B4664208733AF00562666 /* WXAnalyzerCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 17C74F092072145000AB4CAB /* WXAnalyzerCenter.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		170B4665208733BF00562666 /* WXAnalyzerCenter+Transfer.h in Headers */ = {isa = PBXBuildFile; fileRef = 17C74F082072145000AB4CAB /* WXAnalyzerCenter+Transfer.h */; };
 		170B4668208733E500562666 /* WXAnalyzerCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 17C74F0A2072145100AB4CAB /* WXAnalyzerCenter.m */; };
+		1746EA7320E9D253007E55BD /* WXComponent_performance.h in Headers */ = {isa = PBXBuildFile; fileRef = 1746EA7220E9D253007E55BD /* WXComponent_performance.h */; };
+		1746EA7420E9D253007E55BD /* WXComponent_performance.h in Headers */ = {isa = PBXBuildFile; fileRef = 1746EA7220E9D253007E55BD /* WXComponent_performance.h */; };
+		1746EA7520E9D25E007E55BD /* WXSDKInstance_performance.h in Headers */ = {isa = PBXBuildFile; fileRef = 17B122202090AA9300387E33 /* WXSDKInstance_performance.h */; };
 		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 */; };
@@ -643,6 +646,7 @@
 
 /* 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>"; };
 		176BE43B209172330086B6AF /* WXComponent+Layout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "WXComponent+Layout.mm"; path = "Layout/WXComponent+Layout.mm"; 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>"; };
@@ -1384,6 +1388,7 @@
 		77D1611B1C02DD3C0010B15B /* Model */ = {
 			isa = PBXGroup;
 			children = (
+				1746EA7220E9D253007E55BD /* WXComponent_performance.h */,
 				17B122202090AA9300387E33 /* WXSDKInstance_performance.h */,
 				17B1221F2090AA9300387E33 /* WXSDKInstance_performance.m */,
 				77D161221C02DDD10010B15B /* WXSDKInstance.h */,
@@ -1689,6 +1694,7 @@
 				59A582FC1CF5B17B0081FD3E /* WXBridgeContext.h in Headers */,
 				77D161621C02ED790010B15B /* WXLog.h in Headers */,
 				77D1614B1C02E3790010B15B /* WXConvert.h in Headers */,
+				1746EA7320E9D253007E55BD /* WXComponent_performance.h in Headers */,
 				59A596221CB6311F0012CD52 /* WXNavigatorModule.h in Headers */,
 				C47B78CE1F2998EE001D3B0C /* WXExtendCallNativeManager.h in Headers */,
 				749DC27B1D40827B009E1C91 /* WXMonitor.h in Headers */,
@@ -1816,6 +1822,7 @@
 				DCA445B61EFA578B00D0CFA8 /* WXIndicatorComponent.h in Headers */,
 				DCA445BF1EFA57C300D0CFA8 /* WXComponent.h in Headers */,
 				DCA445A71EFA572300D0CFA8 /* WXRootViewController.h in Headers */,
+				1746EA7520E9D25E007E55BD /* WXSDKInstance_performance.h in Headers */,
 				74B81AE91F73C3E900D3A61D /* WXRecycleListUpdateManager.h in Headers */,
 				DCA445C01EFA57C900D0CFA8 /* WXBridgeProtocol.h in Headers */,
 				DCA445AC1EFA574A00D0CFA8 /* WXNetworkProtocol.h in Headers */,
@@ -1825,6 +1832,7 @@
 				DCA4459F1EFA56EC00D0CFA8 /* WXURLRewriteProtocol.h in Headers */,
 				DCA445A21EFA570100D0CFA8 /* WXScrollerComponent.h in Headers */,
 				DCA445B71EFA579200D0CFA8 /* WXImgLoaderProtocol.h in Headers */,
+				1746EA7420E9D253007E55BD /* WXComponent_performance.h in Headers */,
 				DCA445C21EFA57D700D0CFA8 /* WXBaseViewController.h in Headers */,
 				DCA445AB1EFA574100D0CFA8 /* WXPrerenderManager.h in Headers */,
 				DCA445BB1EFA57AA00D0CFA8 /* WXDebugTool.h in Headers */,
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm
index 67d1c7a2ba..a3510a697b 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.mm
@@ -305,12 +305,10 @@ - (void)_recursivelyAddComponent:(NSDictionary *)componentData toSupercomponent:
     
     if (!component->_isTemplate) {
         __weak typeof(self) weakSelf = self;
-        BOOL isFSCreateFinish = [self weexInstance].isJSCreateFinish;
         [self _addUITask:^{
             [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:componentData[@"ref"] className:nil name:componentData[@"type"] phase:WXTracingBegin functionName:@"addElement" options:@{@"threadName":WXTUIThread}];
             [supercomponent insertSubview:component atIndex:index];
             [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:componentData[@"ref"] className:nil name:componentData[@"type"] phase:WXTracingEnd functionName:@"addElement" options:@{@"threadName":WXTUIThread}];
-            [weakSelf onElementChange:isFSCreateFinish];
         }];
     }
     
@@ -374,7 +372,6 @@ - (void)removeComponent:(NSString *)ref
     [_indexDict removeObjectForKey:ref];
     
     __weak typeof(self) weakSelf = self;
-    BOOL isFSCreateFinish = [self weexInstance].isJSCreateFinish;
     [self _addUITask:^{
         [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:ref className:nil name:nil phase:WXTracingBegin functionName:@"removeElement" options:@{@"threadName":WXTUIThread}];
         if (component.supercomponent) {
@@ -382,37 +379,12 @@ - (void)removeComponent:(NSString *)ref
         }
         [component removeFromSuperview];
         [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:ref className:nil name:nil phase:WXTracingEnd functionName:@"removeElement" options:@{@"threadName":WXTUIThread}];
-        [weakSelf onElementChange:isFSCreateFinish];
     }];
     
     [self _checkFixedSubcomponentToRemove:component];
     
 }
 
-- (void)onElementChange:(BOOL)isFSCreateFinish
-{
-    if (!isFSCreateFinish) {
-        return;
-    }
-    
-    UIView *root = [self weexInstance].rootView;
-    BOOL hasEvent = TRUE;
-    if (root && [root isKindOfClass:[WXRootView class]]) {
-        WXRootView* wxRootView = (WXRootView *)root;
-        hasEvent = [wxRootView isHasEvent];
-    }
-    if (hasEvent) {
-        return;
-    }
-    double current = CACurrentMediaTime()*1000;
-    
-    double diff =  current - [self weexInstance].performance.jsCreateFinishTime;
-    if (diff > 8000) {
-        return;
-    }
-    [self weexInstance].performance.interactionTime = current - self.weexInstance.performance.renderTimeOrigin;
-}
-
 - (void)recordMaximumVirtualDom:(WXComponent*) component
 {
     WXAssertComponentExist(component);
@@ -512,12 +484,7 @@ - (WXComponent *)_buildComponentForData:(NSDictionary *)data supercomponent:(WXC
     [component readyToRender];// notify redyToRender event when init
     
     double diffTime = CACurrentMediaTime()*1000 - buildSartTime;
-    if (!(self.weexInstance.isJSCreateFinish)) {
-        self.weexInstance.performance.fsComponentCount++;
-        self.weexInstance.performance.fsComponentCreateTime+=diffTime;
-    }
-    self.weexInstance.performance.componentCount++;
-    self.weexInstance.performance.componentCreateTime+=diffTime;
+    [self.weexInstance.performance recordComponentCreatePerformance:diffTime forComponent:component];
     
     return component;
 }
@@ -748,6 +715,7 @@ - (void)createFinish
     WXSDKInstance *instance  = self.weexInstance;
     [self _addUITask:^{
         UIView *rootView = instance.rootView;
+        [instance.performance onInstanceCreateFinish];
         
         WX_MONITOR_INSTANCE_PERF_END(WXPTFirstScreenRender, instance);
         WX_MONITOR_INSTANCE_PERF_END(WXPTAllRender, instance);
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
index 467a6b7ef5..acdeb30d7d 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.mm
@@ -42,6 +42,8 @@
 #import "WXComponent+Layout.h"
 #import "WXConfigCenterProtocol.h"
 #import "WXSDKEngine.h"
+#import "WXSDKInstance_performance.h"
+#import "WXComponent_performance.h"
 
 #pragma clang diagnostic ignored "-Wincomplete-implementation"
 #pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
@@ -442,6 +444,7 @@ - (UIView *)view
 
         [self _handleFirstScreenTime];
         
+        [self.weexInstance.performance onViewLoad:self];
         return _view;
     }
 }
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent_performance.h b/ios/sdk/WeexSDK/Sources/Model/WXComponent_performance.h
new file mode 100644
index 0000000000..99b8d6ab88
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent_performance.h
@@ -0,0 +1,9 @@
+#import "WXComponent.h"
+
+@interface WXComponent()
+
+@property (nonatomic,assign) bool hasAdd;
+
+
+
+@end
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.h b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.h
index b731797dba..855997b958 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.h
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.h
@@ -18,6 +18,7 @@
  */
 
 #import "WXSDKInstance.h"
+#import "WXImageComponent.h"
 
 @interface WXPerformance : NSObject
 
@@ -48,14 +49,22 @@
 //time of user could interace : firsrScreen view or async load veiew(net lazyload) are show)
 @property (nonatomic, assign) double interactionTime;
 
-//in firsrScreen ,create component count
-@property (nonatomic,assign) double fsComponentCount;
-//in firsrScreen ,create component time
-@property (nonatomic,assign) double fsComponentCreateTime;
+//in interactionTime ,add component count
+@property (nonatomic,assign) double interactionAddCount;
+@property (nonatomic,assign) double interactionLimitAddOpCount;
+
 //all componentCreate count in instance life
 @property (nonatomic,assign) double componentCount;
 //all componentCreate time in instance life
 @property (nonatomic,assign) double componentCreateTime;
+
+@property (nonatomic,assign) double newFsRenderTime;
+//for performance record
+
+- (void)onViewLoad:(WXComponent *)targetComponent;
+- (void)recordComponentCreatePerformance:(double) diffTime forComponent:(WXComponent *)targetComponent;
+- (void)onInstanceCreateFinish;
+
 @end
 
 
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
index 0af52d1292..9aa6807fa3 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
@@ -20,9 +20,150 @@
 #import <Foundation/Foundation.h>
 #import "WXSDKInstance_performance.h"
 #import "WXMonitor.h"
+#import "WXRootView.h"
+#import "WXLog.h"
+#import "WXComponent_performance.h"
+#import "WXTextComponent.h"
+#import "WXCellComponent.h"
+#import "WXImageComponent.h"
+#import "WXUtility.h"
+
+@interface WXPerformance()
+@property (nonatomic ,assign) bool hasRecordFsRenderTimeByPosition;
+@property (nonatomic ,assign) double interactionAddCountRecord;
+@end
 
 @implementation WXPerformance
 
+
+
+- (void) recordComponentCreatePerformance:(double) diffTime forComponent:(WXComponent *)targetComponent
+{
+    self.componentCount++;
+    self.componentCreateTime+=diffTime;
+}
+
+/** on UI thread **/
+- (void)onViewLoad:(WXComponent *)targetComponent{
+    if (targetComponent.hasAdd) {
+        return;
+    }
+    targetComponent.hasAdd = true;
+    double modifyTime =  CACurrentMediaTime()*1000;
+    
+    dispatch_async(dispatch_get_main_queue(), ^{
+        if(![self _verifyComponent:targetComponent]){
+            return;
+        }
+        self.interactionAddCountRecord++;
+        
+        [self _handleRenderTime:targetComponent withModifyTime:modifyTime];
+    });
+}
+
+- (void) _handleRenderTime:(WXComponent*)targetComponent withModifyTime:(double)modifyTime
+{
+    double diff = modifyTime - self.renderTimeOrigin;
+    if (diff > 8000) {
+        return;
+    }
+    
+    if (diff < self.interactionTime) {
+        //useless calulcate ,for imporove performance
+        return;
+    }
+    
+    CGRect absoluteFrame = [targetComponent.view.superview convertRect:targetComponent.view.frame toView:targetComponent.weexInstance.rootView];
+    CGRect rootFrame = targetComponent.weexInstance.rootView.frame;
+    CGPoint leftTop = absoluteFrame.origin;
+    CGPoint rightBottom = CGPointMake(absoluteFrame.origin.x+absoluteFrame.size.width, absoluteFrame.origin.y+absoluteFrame.size.height);
+
+    
+    if (!self.hasRecordFsRenderTimeByPosition && rightBottom.y > rootFrame.size.height +1 && ![self _isViewGroup:targetComponent] ) {
+        self.newFsRenderTime = diff;
+        self.hasRecordFsRenderTimeByPosition = true;
+    }
+    
+    UIView *root = targetComponent.weexInstance.rootView;
+    if (root && [root isKindOfClass:[WXRootView class]]) {
+        WXRootView* wxRootView = (WXRootView *)root;
+        if ([wxRootView isHasEvent]) {
+            return;
+        }
+    }
+    
+    if ([targetComponent.type isEqualToString:@"videoplus"]) {
+        return;
+    }
+    
+    bool inScreen = CGRectContainsPoint(rootFrame, leftTop) || CGRectContainsPoint(rootFrame, rightBottom);
+    if (!inScreen) {
+        return;
+    }
+    
+#ifdef DEBUG
+    WXLogDebug(@"onElementChange _-> size, count :%f,inScreen:%d,  lefttop:%@,rightBottom:%@, rootFrame:%@",
+          self.interactionAddCountRecord,
+          inScreen,
+          NSStringFromCGPoint(leftTop),
+          NSStringFromCGPoint(rightBottom),
+          NSStringFromCGRect(targetComponent.weexInstance.rootView.frame)
+          );
+#endif
+    self.interactionLimitAddOpCount++;
+    self.interactionAddCount = self.interactionAddCountRecord;
+    self.interactionTime = self.interactionTime < diff ? diff :self.interactionTime;
+}
+
+- (bool) _verifyComponent:(WXComponent*)targetComponent
+{
+    bool isViewloaded = targetComponent && targetComponent.weexInstance && [targetComponent isViewLoaded];
+    
+    if (!isViewloaded) {
+        return false;
+    }
+    
+    UIView* curView = targetComponent.view;
+    while (curView != nil) {
+        if (curView == targetComponent.weexInstance.rootView) {
+            return true;
+        }
+        curView = curView.superview;
+    }
+    return false;
+}
+
+- (bool) _isViewGroup:(WXComponent *)targetComponent
+{
+    UIView* targetView = targetComponent.view;
+    
+    bool isViewGroup = true;
+    if ([targetComponent isKindOfClass:WXTextComponent.class]
+        || [targetView isKindOfClass:UILabel.class]
+        || [targetView isKindOfClass:UITextView.class]
+        || [targetView isKindOfClass:UIPickerView.class]
+        || [targetView isKindOfClass:UIProgressView.class]
+        || [targetView isKindOfClass:UIPickerView.class]
+        || [targetView isKindOfClass:UIImageView.class]
+        || [targetView isKindOfClass:UIButton.class]
+        || [targetView isKindOfClass:UIDatePicker.class]
+        || [targetView isKindOfClass:UITextField.class]
+        || [targetView isKindOfClass:UISwitch.class]
+        || [targetView isKindOfClass:UIActivityIndicatorView.class]) {
+        
+        isViewGroup =false;
+    }
+    return isViewGroup;
+}
+
+- (void)onInstanceCreateFinish
+{
+    if (self.hasRecordFsRenderTimeByPosition) {
+        return;
+    }
+    self.newFsRenderTime = CACurrentMediaTime()*1000 - self.renderTimeOrigin;
+}
+
 @end
 
 @implementation WXSDKInstance (Performance)
@@ -38,8 +179,6 @@ - (void) updatePerDicAfterCreateFinish
     WX_MONITOR_PERF_SET(WXPTFsCallNativeTime, self.performance.fsCallNativeTime, self);
     WX_MONITOR_PERF_SET(WXPTFsReqNetNum, self.performance.fsReqNetNum, self);
     WX_MONITOR_PERF_SET(WXPTTimerNum, self.performance.timerNum, self);
-    WX_MONITOR_PERF_SET(WXPTFsComponentCount,self.performance.fsComponentCount,self);
-    WX_MONITOR_PERF_SET(WXPTFsComponentCreateTime,self.performance.fsComponentCreateTime,self);
 }
 
 
@@ -51,6 +190,9 @@ - (void)updatePerDicBeforExit
     WX_MONITOR_PERF_SET(WXPTInteractionTime,self.performance.interactionTime,self);
     WX_MONITOR_PERF_SET(WXPTComponentCount,self.performance.componentCount,self);
     WX_MONITOR_PERF_SET(WXPTComponentCreateTime,self.performance.componentCreateTime,self);
+    WX_MONITOR_PERF_SET(WXPTInteractionAddCount,self.performance.interactionAddCount,self);
+    WX_MONITOR_PERF_SET(WXPTInteractionLimitAddCount,self.performance.interactionLimitAddOpCount,self);
+    WX_MONITOR_PERF_SET(WXPNewFSRenderTime,self.performance.newFsRenderTime,self);
 }
 
 @end
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXAnalyzerCenter.m b/ios/sdk/WeexSDK/Sources/Monitor/WXAnalyzerCenter.m
index 8ab9259b26..0796602c43 100644
--- a/ios/sdk/WeexSDK/Sources/Monitor/WXAnalyzerCenter.m
+++ b/ios/sdk/WeexSDK/Sources/Monitor/WXAnalyzerCenter.m
@@ -134,10 +134,11 @@ + (NSDictionary *) getKeys:(BOOL) measureOrDimen
                              M_IMG_WRONG_SIZE_NUM:          [NSNumber numberWithInt:DebugAfterExist],
                              M_TIMER_NUM:                   [NSNumber numberWithInt:DebugAfterFSFinish],
                              M_INTERACTION_TIME:            [NSNumber numberWithInt:DebugAfterExist],
-                             M_COMPONENT_FS_TIME:           @(DebugAfterFSFinish),
-                             M_COMPONENT_FS_COUNT:          @(DebugAfterFSFinish),
+                             M_INTERACTION_ADD_COUNT:       @(DebugAfterFSFinish),
+                             M_INTERACTION_LIMIT_ADD_COUNT: @(DebugAfterFSFinish),
                              COMPONENTCOUNT:                @(DebugAfterExist),
-                             M_COMPONENT_TIME:              @(DebugAfterExist)
+                             M_COMPONENT_TIME:              @(DebugAfterExist),
+                             M_NEW_FS_RENDER_TIME:                  @(DebugAfterExist),
                              };
         
     });
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h
index cfc8b46669..c50d40d92f 100644
--- a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h
+++ b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.h
@@ -49,10 +49,11 @@ typedef enum : NSUInteger {
     WXPTTimerNum,
     WXPTInteractionTime,
     WXPTWrongImgSize,
-    WXPTFsComponentCount,
-    WXPTFsComponentCreateTime,
+    WXPTInteractionAddCount,
+    WXPTInteractionLimitAddCount,
     WXPTComponentCount,
     WXPTComponentCreateTime,
+    WXPNewFSRenderTime,
     //end
     WXPTEnd
 } WXPerformanceTag;
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
index 954d9c48d0..87eeb72162 100644
--- a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
+++ b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
@@ -181,10 +181,11 @@ + (void)commitPerformanceWithDict:(NSMutableDictionary *)commitDict instance:(WX
                           @(WXPTWrongImgSize):M_IMG_WRONG_SIZE_NUM,
                           @(WXPTInteractionTime):M_INTERACTION_TIME,
                           @(WXPTFsReqNetNum):M_FS_REQUEST_NET_NUM,
-                          @(WXPTFsComponentCreateTime):M_COMPONENT_FS_TIME,
-                          @(WXPTFsComponentCount):M_COMPONENT_FS_COUNT,
                           @(WXPTComponentCreateTime):M_COMPONENT_TIME,
-                          @(WXPTComponentCount):COMPONENTCOUNT
+                          @(WXPTComponentCount):COMPONENTCOUNT,
+                          @(WXPTInteractionAddCount):M_INTERACTION_ADD_COUNT,
+                          @(WXPTInteractionLimitAddCount):M_INTERACTION_LIMIT_ADD_COUNT,
+                          @(WXPNewFSRenderTime):M_NEW_FS_RENDER_TIME
                           };
     });
     
diff --git a/ios/sdk/WeexSDK/Sources/Protocol/WXAppMonitorProtocol.h b/ios/sdk/WeexSDK/Sources/Protocol/WXAppMonitorProtocol.h
index 56d901a8de..71120972a3 100644
--- a/ios/sdk/WeexSDK/Sources/Protocol/WXAppMonitorProtocol.h
+++ b/ios/sdk/WeexSDK/Sources/Protocol/WXAppMonitorProtocol.h
@@ -65,9 +65,9 @@
 #define M_TIMER_NUM             @"timerCount"
 #define M_WRONG_IMG_NUM         @"imgSizeCount"
 #define M_INTERACTION_TIME      @"interactionTime"
-#define M_COMPONENT_FS_COUNT    @"fsComponentCount"
-#define M_COMPONENT_FS_TIME     @"fsComponentCreateTime"
-
+#define M_INTERACTION_ADD_COUNT    @"interactionViewAddCount"
+#define M_INTERACTION_LIMIT_ADD_COUNT    @"interactionViewAddLimitCount"
+#define M_NEW_FS_RENDER_TIME             @"newFsRenderTime"
 
 
 @protocol WXAppMonitorProtocol <WXModuleProtocol>


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services