You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by kf...@apache.org on 2017/08/10 12:37:39 UTC
[1/5] incubator-weex git commit: + [ios] if not set , set weex default
Repository: incubator-weex
Updated Branches:
refs/heads/0.16-dev 63c9c8624 -> d1bdd73bc
+ [ios] if not set , set weex default
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e4e0f491
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e4e0f491
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e4e0f491
Branch: refs/heads/0.16-dev
Commit: e4e0f491569da13429f8d2d3cce70e0917f7ddc2
Parents: 5951404
Author: 齐山 <su...@163.com>
Authored: Mon Jul 31 11:23:13 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Mon Jul 31 11:23:13 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e4e0f491/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
index beb401b..732ec13 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
@@ -134,6 +134,8 @@
task.bundleJSType = @"Vue";
}else if([searchStr rangeOfString:@"Rax"].location != NSNotFound){
task.bundleJSType = @"Rax";
+ }else{
+ task.bundleJSType = @"Weex";
}
}
}
[2/5] incubator-weex git commit: + [ios] update tracing logic
Posted by kf...@apache.org.
+ [ios] update tracing logic
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/4b80dac2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/4b80dac2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/4b80dac2
Branch: refs/heads/0.16-dev
Commit: 4b80dac218e41490e447978e03005a275cbad639
Parents: e4e0f49
Author: 齐山 <su...@163.com>
Authored: Fri Aug 4 15:40:37 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Fri Aug 4 15:40:37 2017 +0800
----------------------------------------------------------------------
.../WeexSDK/Sources/Bridge/WXBridgeContext.m | 35 ++++---
ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m | 10 +-
.../WeexSDK/Sources/Manager/WXBridgeManager.m | 4 +
.../Sources/Manager/WXComponentFactory.h | 1 +
.../Sources/Manager/WXComponentFactory.m | 23 ++++
.../Sources/Manager/WXComponentManager.m | 18 +++-
.../WeexSDK/Sources/Manager/WXModuleFactory.h | 6 ++
.../WeexSDK/Sources/Manager/WXModuleFactory.m | 24 +++++
.../WeexSDK/Sources/Manager/WXTracingManager.h | 20 +++-
.../WeexSDK/Sources/Manager/WXTracingManager.m | 104 ++++++++++++++-----
ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 1 -
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 6 +-
.../Sources/View/WXComponent+ViewManagement.m | 1 -
13 files changed, 195 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
index 781dd05..ca57dc2 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXBridgeContext.m
@@ -126,15 +126,16 @@ _Pragma("clang diagnostic pop") \
if(![weakSelf checkInstance:instance]) {
return -1;
}
-
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:elementData[@"ref"] className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"addElement" options:nil];
WXPerformBlockOnComponentThread(^{
- [WXTracingManager startTracingWithInstanceId:instanceId ref:elementData[@"ref"] className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"addElement" options:nil];
WXComponentManager *manager = instance.componentManager;
if (!manager.isValid) {
return;
}
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:elementData[@"ref"] className:nil name:WXTDomCall phase:WXTracingBegin functionName:@"addElement" options:@{@"threadName":WXTDOMThread}];
[manager startComponentTasks];
[manager addComponent:elementData toSupercomponent:parentRef atIndex:index appendingInTree:NO];
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:elementData[@"ref"] className:nil name:WXTDomCall phase:WXTracingEnd functionName:@"addElement" options:@{@"threadName":WXTDOMThread}];
});
return 0;
@@ -148,15 +149,17 @@ _Pragma("clang diagnostic pop") \
if(![weakSelf checkInstance:instance]) {
return -1;
}
-
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:bodyData[@"ref"] className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"createBody" options:@{@"threadName":WXTJSBridgeThread}];
WXPerformBlockOnComponentThread(^{
WXComponentManager *manager = instance.componentManager;
if (!manager.isValid) {
return;
}
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:bodyData[@"ref"] className:nil name:WXTDomCall phase:WXTracingBegin functionName:@"createBody" options:@{@"threadName":WXTDOMThread}];
[manager startComponentTasks];
[manager createRoot:bodyData];
- [WXTracingManager startTracingWithInstanceId:instanceId ref:bodyData[@"ref"] className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"createBody" options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:bodyData[@"ref"] className:nil name:WXTDomCall phase:WXTracingEnd functionName:@"createBody" options:@{@"threadName":WXTDOMThread}];
+
});
return 0;
@@ -170,15 +173,16 @@ _Pragma("clang diagnostic pop") \
if(![weakSelf checkInstance:instance]) {
return -1;
}
-
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"removeElement" options:nil];
WXPerformBlockOnComponentThread(^{
WXComponentManager *manager = instance.componentManager;
if (!manager.isValid) {
return;
}
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTDomCall phase:WXTracingBegin functionName:@"removeElement" options:@{@"threadName":WXTDOMThread}];
[manager startComponentTasks];
[manager removeComponent:ref];
- [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"removeElement" options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTDomCall phase:WXTracingEnd functionName:@"removeElement" options:@{@"threadName":WXTDOMThread}];
});
return 0;
@@ -192,7 +196,7 @@ _Pragma("clang diagnostic pop") \
if(![weakSelf checkInstance:instance]) {
return -1;
}
-
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"moveElement" options:nil];
WXPerformBlockOnComponentThread(^{
WXComponentManager *manager = instance.componentManager;
if (!manager.isValid) {
@@ -200,7 +204,6 @@ _Pragma("clang diagnostic pop") \
}
[manager startComponentTasks];
[manager moveComponent:ref toSuper:parentRef atIndex:index];
- [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"moveElement" options:nil];
});
return 0;
@@ -215,14 +218,16 @@ _Pragma("clang diagnostic pop") \
return -1;
}
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"updateAttrs" options:@{@"threadName":WXTJSBridgeThread}];
WXPerformBlockOnComponentThread(^{
WXComponentManager *manager = instance.componentManager;
if (!manager.isValid) {
return;
}
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTDomCall phase:WXTracingBegin functionName:@"updateAttrs" options:@{@"threadName":WXTDOMThread}];
[manager startComponentTasks];
[manager updateAttributes:attrsData forComponent:ref];
- [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"updateAttrs" options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTDomCall phase:WXTracingEnd functionName:@"updateAttrs" options:@{@"threadName":WXTDOMThread}];
});
return 0;
@@ -236,7 +241,7 @@ _Pragma("clang diagnostic pop") \
if(![weakSelf checkInstance:instance]) {
return -1;
}
-
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"updateStyles" options:@{@"threadName":WXTJSBridgeThread}];
WXPerformBlockOnComponentThread(^{
WXComponentManager *manager = instance.componentManager;
if (!manager.isValid) {
@@ -244,7 +249,7 @@ _Pragma("clang diagnostic pop") \
}
[manager startComponentTasks];
[manager updateStyles:stylesData forComponent:ref];
- [WXTracingManager startTracingWithInstanceId:instanceId ref:ref className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"updateStyles" options:nil];
+
});
return 0;
@@ -302,15 +307,17 @@ _Pragma("clang diagnostic pop") \
if(![weakSelf checkInstance:instance]) {
return -1;
}
-
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:nil className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"createFinish" options:@{@"threadName":WXTJSBridgeThread}];
WXPerformBlockOnComponentThread(^{
WXComponentManager *manager = instance.componentManager;
if (!manager.isValid) {
return;
}
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:nil className:nil name:WXTDomCall phase:WXTracingBegin functionName:@"createFinish" options:@{@"threadName":WXTDOMThread}];
[manager startComponentTasks];
[manager createFinish];
- [WXTracingManager startTracingWithInstanceId:instanceId ref:nil className:nil name:WXTJSCall phase:WXTracingEnd functionName:@"createFinish" options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:nil className:nil name:WXTDomCall phase:WXTracingEnd functionName:@"createFinish" options:@{@"threadName":WXTDOMThread}];
+
});
return 0;
@@ -398,7 +405,7 @@ _Pragma("clang diagnostic pop") \
NSString *moduleName = task[@"module"];
NSDictionary *options = task[@"options"];
WXModuleMethod *method = [[WXModuleMethod alloc] initWithModuleName:moduleName methodName:methodName arguments:arguments options:options instance:instance];
- [WXTracingManager startTracingWithInstanceId:instanceId ref:nil className:nil name:task[@"module"] phase:WXTracingBegin functionName:task[@"method"] options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceId ref:nil className:nil name:task[@"module"] phase:WXTracingBegin functionName:task[@"method"] options:@{@"threadName":WXTJSBridgeThread}];
[method invoke];
}
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
index 13d8578..09dc9d8 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
@@ -207,7 +207,7 @@
NSDictionary *componentData = [element toDictionary];
NSString *parentRef = [ref toString];
NSInteger insertIndex = [[index toNumber] integerValue];
- [WXTracingManager startTracingWithInstanceId:instanceIdString ref:componentData[@"ref"] className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"addElement" options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceIdString ref:componentData[@"ref"] className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"addElement" options:@{@"threadName":WXTJSBridgeThread}];
WXLogDebug(@"callAddElement...%@, %@, %@, %ld", instanceIdString, parentRef, componentData, (long)insertIndex);
return [JSValue valueWithInt32:(int32_t)callAddElement(instanceIdString, parentRef, componentData, insertIndex) inContext:[JSContext currentContext]];
@@ -224,7 +224,7 @@
NSDictionary *bodyData = [body toDictionary];
WXLogDebug(@"callCreateBody...%@, %@,", instanceIdString, bodyData);
- [WXTracingManager startTracingWithInstanceId:instanceIdString ref:bodyData[@"ref"] className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"createBody" options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceIdString ref:bodyData[@"ref"] className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"createBody" options:@{@"threadName":WXTJSBridgeThread}];
return [JSValue valueWithInt32:(int32_t)callCreateBody(instanceIdString, bodyData) inContext:[JSContext currentContext]];
};
@@ -272,7 +272,7 @@
NSDictionary *attrsData = [attrs toDictionary];
WXLogDebug(@"callUpdateAttrs...%@, %@, %@", instanceIdString, refString,attrsData);
- [WXTracingManager startTracingWithInstanceId:instanceIdString ref:refString className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"updateAttrs" options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceIdString ref:refString className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"updateAttrs" options:@{@"threadName":WXTJSBridgeThread}];
return [JSValue valueWithInt32:(int32_t)callUpdateAttrs(instanceIdString, refString,attrsData) inContext:[JSContext currentContext]];
};
@@ -288,7 +288,7 @@
NSDictionary *stylessData = [styles toDictionary];
WXLogDebug(@"callUpdateStyle...%@, %@, %@", instanceIdString, refString,stylessData);
- [WXTracingManager startTracingWithInstanceId:instanceIdString ref:refString className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"updateStyle" options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceIdString ref:refString className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"updateStyle" options:@{@"threadName":WXTJSBridgeThread}];
return [JSValue valueWithInt32:(int32_t)callUpdateStyle(instanceIdString, refString,stylessData) inContext:[JSContext currentContext]];
};
@@ -334,7 +334,7 @@
NSString *instanceIdString = [instanceId toString];
WXLogDebug(@"callRCreateFinish...%@", instanceIdString);
- [WXTracingManager startTracingWithInstanceId:instanceIdString ref:nil className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"createFinish" options:nil];
+ [WXTracingManager startTracingWithInstanceId:instanceIdString ref:nil className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"createFinish" options:@{@"threadName":WXTJSBridgeThread}];
return [JSValue valueWithInt32:(int32_t)callCreateFinish(instanceIdString) inContext:[JSContext currentContext]];
};
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m
index 07762ed..0bf5aca 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.m
@@ -28,6 +28,7 @@
#import "WXResourceRequest.h"
#import "WXResourceLoader.h"
#import "WXDebugTool.h"
+#import "WXTracingManager.h"
@interface WXBridgeManager ()
@@ -143,10 +144,13 @@ void WXPerformBlockOnBridgeThread(void (^block)())
}
__weak typeof(self) weakSelf = self;
WXPerformBlockOnBridgeThread(^(){
+ [WXTracingManager startTracingWithInstanceId:instance ref:nil className:nil name:WXTExecJS phase:WXTracingBegin functionName:@"createInstance" options:@{@"threadName":WXTJSBridgeThread}];
[weakSelf.bridgeCtx createInstance:instance
template:temp
options:options
data:data];
+ [WXTracingManager startTracingWithInstanceId:instance ref:nil className:nil name:WXTExecJS phase:WXTracingEnd functionName:@"createInstance" options:@{@"threadName":WXTJSBridgeThread}];
+
});
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.h b/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.h
index 9ff7034..f2d2f6a 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.h
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.h
@@ -37,6 +37,7 @@
+ (void)registerComponents:(NSArray *)components;
+ (NSMutableDictionary *)componentMethodMapsWithName:(NSString *)name;
++ (NSMutableDictionary *)componentSelectorMapsWithName:(NSString *)name;
+ (SEL)methodWithComponentName:(NSString *)name withMethod:(NSString *)method;
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m b/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m
index aa79bad..6970376 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.m
@@ -114,6 +114,11 @@
return [[self sharedInstance] _componentMethodMapsWithName:name];
}
++ (NSMutableDictionary *)componentSelectorMapsWithName:(NSString *)name
+{
+ return [[self sharedInstance] _componentSelectorMapsWithName:name];
+}
+
#pragma mark Private
- (NSMutableDictionary *)_componentMethodMapsWithName:(NSString *)name
@@ -134,6 +139,24 @@
return dict;
}
+- (NSMutableDictionary *)_componentSelectorMapsWithName:(NSString *)name
+{
+ NSMutableDictionary *dict = [NSMutableDictionary dictionary];
+ NSMutableArray *methods = [NSMutableArray array];
+
+ [_configLock lock];
+ [dict setValue:methods forKey:@"methods"];
+
+ WXComponentConfig *config = _componentConfigs[name];
+ void (^mBlock)(id, id, BOOL *) = ^(id mKey, id mObj, BOOL * mStop) {
+ [methods addObject:mObj];
+ };
+ [config.asyncMethods enumerateKeysAndObjectsUsingBlock:mBlock];
+ [_configLock unlock];
+
+ return dict;
+}
+
- (SEL)_methodWithComponetName:(NSString *)name withMethod:(NSString *)method
{
WXAssert(name && method, @"Fail to find selector with module name and method, please check if the parameters are correct !");
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m
index 5513b64..76a8cf3 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m
@@ -206,9 +206,11 @@ static NSThread *WXComponentThread;
[self _initRootCSSNode];
__weak typeof(self) weakSelf = self;
[self _addUITask:^{
+ [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:data[@"ref"] className:nil name:data[@"type"] phase:WXTracingBegin functionName:@"createBody" options:@{@"threadName":WXTUIThread}];
__strong typeof(self) strongSelf = weakSelf;
strongSelf.weexInstance.rootView.wx_component = strongSelf->_rootComponent;
[strongSelf.weexInstance.rootView addSubview:strongSelf->_rootComponent.view];
+ [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:data[@"ref"] className:nil name:data[@"type"] phase:WXTracingEnd functionName:@"createBody" options:@{@"threadName":WXTUIThread}];
}];
}
@@ -257,9 +259,11 @@ static css_node_t * rootNodeGetChild(void *context, int i)
component->_lazyCreateView = YES;
}
+ __weak typeof(self) weakSelf = self;
[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}];
}];
NSArray *subcomponentsData = [componentData valueForKey:@"children"];
@@ -293,9 +297,11 @@ static css_node_t * rootNodeGetChild(void *context, int i)
}
[component _moveToSupercomponent:newSupercomponent atIndex:index];
-
+ __weak typeof(self) weakSelf = self;
[self _addUITask:^{
+ [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:ref className:nil name:nil phase:WXTracingBegin functionName:@"addElement" options:@{@"threadName":WXTUIThread}];
[component moveToSuperview:newSupercomponent atIndex:index];
+ [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:ref className:nil name:nil phase:WXTracingEnd functionName:@"addElement" options:@{@"threadName":WXTUIThread}];
}];
}
@@ -311,11 +317,14 @@ static css_node_t * rootNodeGetChild(void *context, int i)
[_indexDict removeObjectForKey:ref];
+ __weak typeof(self) weakSelf = self;
[self _addUITask:^{
+ [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:ref className:nil name:nil phase:WXTracingBegin functionName:@"removeElement" options:@{@"threadName":WXTUIThread}];
if (component.supercomponent) {
[component.supercomponent willRemoveSubview:component];
}
[component removeFromSuperview];
+ [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:ref className:nil name:nil phase:WXTracingEnd functionName:@"removeElement" options:@{@"threadName":WXTUIThread}];
}];
[self _checkFixedSubcomponentToRemove:component];
@@ -444,9 +453,12 @@ static css_node_t * rootNodeGetChild(void *context, int i)
WXAssertComponentExist(component);
[component _updateAttributesOnComponentThread:attributes];
+ __weak typeof(self) weakSelf = self;
[self _addUITask:^{
+ [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:ref className:nil name:nil phase:WXTracingBegin functionName:@"updateAttrs" options:@{@"threadName":WXTUIThread}];
[component _updateAttributesOnMainThread:attributes];
[component readyToRender];
+ [WXTracingManager startTracingWithInstanceId:weakSelf.weexInstance.instanceId ref:ref className:nil name:nil phase:WXTracingEnd functionName:@"updateAttrs" options:@{@"threadName":WXTUIThread}];
}];
}
@@ -522,7 +534,7 @@ static css_node_t * rootNodeGetChild(void *context, int i)
WX_MONITOR_SUCCESS(WXMTNativeRender);
if(instance.renderFinish){
- [WXTracingManager startTracingWithInstanceId:instance.instanceId ref:nil className:nil name:nil phase:WXTracingInstant functionName:WXTRenderFinish options:nil];
+ [WXTracingManager startTracingWithInstanceId:instance.instanceId ref:nil className:nil name:nil phase:WXTracingInstant functionName:WXTRenderFinish options:@{@"threadName":WXTUIThread}];
instance.renderFinish(rootView);
}
}];
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.h b/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.h
index c4c13fc..53e6f0d 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.h
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.h
@@ -56,6 +56,12 @@
**/
+ (NSMutableDictionary *)moduleMethodMapsWithName:(NSString *)name;
+/**
+ * @abstract Returns the export Selector in the specific module
+ *
+ * @param name The Selector name
+ **/
++ (NSMutableDictionary *)moduleSelectorMapsWithName:(NSString *)name;
/**
* @abstract Returns the registered modules.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.m b/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.m
index a2b9963..6a05afd 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXModuleFactory.m
@@ -152,6 +152,25 @@ static WXModuleFactory *_sharedInstance = nil;
return dict;
}
+- (NSMutableDictionary *)_moduleSelctorMapsWithName:(NSString *)name
+{
+ NSMutableDictionary *dict = [NSMutableDictionary dictionary];
+ NSMutableArray *methods = [self _defaultModuleMethod];
+
+ [_moduleLock lock];
+ [dict setValue:methods forKey:name];
+
+ WXModuleConfig *config = _moduleMap[name];
+ void (^mBlock)(id, id, BOOL *) = ^(id mKey, id mObj, BOOL * mStop) {
+ [methods addObject:mObj];
+ };
+ [config.syncMethods enumerateKeysAndObjectsUsingBlock:mBlock];
+ [config.asyncMethods enumerateKeysAndObjectsUsingBlock:mBlock];
+ [_moduleLock unlock];
+
+ return dict;
+}
+
// module common method
- (NSMutableArray*)_defaultModuleMethod
{
@@ -196,4 +215,9 @@ static WXModuleFactory *_sharedInstance = nil;
return [[self _sharedInstance] _moduleMethodMapsWithName:name];
}
++ (NSMutableDictionary *)moduleSelectorMapsWithName:(NSString *)name
+{
+ return [[self _sharedInstance] _moduleSelctorMapsWithName:name];
+}
+
@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
index f2becd2..9c3634e 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
@@ -20,11 +20,17 @@
#import <Foundation/Foundation.h>
#import "WXSDKInstance.h"
-#define WXTNetworkHanding @"loadjs"
-#define WXTExecJS @"execjs"
+#define WXTNetworkHanding @"downloadBundleJS"
+#define WXTExecJS @"executeBundleJS"
#define WXTJSCall @"jsCall"
+#define WXTDomCall @"domCall"
#define WXTRender @"render"
-#define WXTRenderFinish @"RenderFinish"
+#define WXTRenderFinish @"renderFinish"
+
+#define WXTJSBridgeThread @"JSThread"
+#define WXTDOMThread @"DOMThread"
+#define WXTUIThread @"UIThread"
+#define WXTMainThread @"MainThread"
#define WXTracingBegin @"B"
#define WXTracingEnd @"E"
@@ -61,8 +67,9 @@ typedef enum : NSUInteger {
@property (nonatomic) NSTimeInterval duration;
@property (nonatomic, copy) NSString *fName; // functionName
@property (nonatomic, copy) NSString *iid; // instance id
-@property (nonatomic, copy) NSString *parentId;// parent event id
+@property (nonatomic) long long parentId;// parent event id
@property (nonatomic, copy) NSString *bundleUrl;
+@property (nonatomic, copy) NSString *threadName;
-(NSDictionary *)dictionary;
@end
@@ -112,6 +119,11 @@ typedef enum : NSUInteger {
+(void)clearTracingData;
/**
+ * @discusstion get current time
+ */
++(NSTimeInterval)getCurrentTime;
+
+/**
* @discusstion set bundle type
* @param jsBundleString the bundle source.
* @param iid the instance id.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
index 732ec13..b4b19d5 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
@@ -31,7 +31,7 @@
@implementation WXTracing
-(NSDictionary *)dictionary {
- return [NSDictionary dictionaryWithObjectsAndKeys:self.ref?:@"",@"ref",self.parentRef?:@"",@"parentRef",self.className?:@"",@"className",self.name?:@"",@"name",self.ph?:@"",@"ph",@(self.ts),@"ts",@(self.traceId),@"traceId",@(self.duration),@"duration",self.fName?:@"",@"fName",self.iid?:@"",@"iid",self.parentId?:@"",@"parentId", nil];
+ return [NSDictionary dictionaryWithObjectsAndKeys:self.ref?:@"",@"ref",self.parentRef?:@"",@"parentRef",self.className?:@"",@"className",self.name?:@"",@"name",self.ph?:@"",@"ph",@(self.ts),@"ts",@(self.traceId),@"traceId",@(self.duration),@"duration",self.fName?:@"",@"fName",self.iid?:@"",@"iid",@(self.parentId)?:0,@"parentId",self.threadName?:@"",@"tName", nil];
}
@end
@@ -147,15 +147,28 @@
[WXTracingManager sharedInstance].tracingTasks = nil;
}
++(NSTimeInterval)getCurrentTime
+{
+ if([self isTracing]){
+ return [[NSDate date] timeIntervalSince1970]*1000;
+ }
+ return 0;
+}
+
+(void)startTracingWithInstanceId:(NSString *)iid ref:(NSString*)ref className:(NSString *)className name:(NSString *)name phase:(NSString *)phase functionName:(NSString *)functionName options:(NSDictionary *)options
{
if([self isTracing]){
WXTracing *tracing = [WXTracing new];
+ tracing.parentId = -1;
if(ref.length>0){
tracing.ref = ref;
+ }else {
+ tracing.ref = @"";
}
if(className.length>0){
tracing.className = className;
+ }else {
+ tracing.className = @"";
}
if(name.length>0){
tracing.name = name;
@@ -182,6 +195,9 @@
if(options && options[@"bundleUrl"]){
tracing.bundleUrl = options[@"bundleUrl"];
}
+ if(options && options[@"threadName"]){
+ tracing.threadName = options[@"threadName"];
+ }
[self startTracing:tracing];
}
}
@@ -210,7 +226,7 @@
if(tracing.iid.length>0){
newTracing.iid = tracing.iid;
}
- if(tracing.parentId.length>0){
+ if(tracing.parentId>0){
newTracing.parentId = tracing.parentId;
}
if(tracing.traceId>0){
@@ -219,6 +235,9 @@
if(tracing.ts>0){
newTracing.ts = tracing.ts;
}
+ if(tracing.threadName.length>0){
+ newTracing.threadName = tracing.threadName;
+ }
return newTracing;
}
@@ -237,12 +256,27 @@
return className;
}
-+(void)updateTracings:(WXTracingTask *)task tracing:(WXTracing *)tracing
++(NSInteger )getParentId:(WXTracingTask *)task tracing:(WXTracing *)tracing
{
- if(![WXTJSCall isEqualToString:tracing.name]){
- tracing.className = [self getclassName:tracing];
+ NSMutableArray *tracings = task.tracings;
+ if([tracing.threadName isEqualToString:WXTJSBridgeThread]) {
+ return -1;
}
-
+ if(tracings && [tracings count]>0){
+ for (NSInteger i = [tracings count] - 1; i >= 0; i--) {
+ WXTracing *t = tracings[i];
+ if([t.threadName isEqualToString:WXTJSBridgeThread]&& [t.ref isEqualToString:tracing.ref] && ([t.name isEqualToString:tracing.name] || [t.name isEqualToString:WXTJSCall])){
+ if([t.fName isEqualToString:tracing.fName]){
+ return t.traceId;
+ }
+ }
+ }
+ }
+ return -1;
+}
+
++(void)updateTracings:(WXTracingTask *)task tracing:(WXTracing *)tracing
+{
if([WXTNetworkHanding isEqualToString:task.tag]){
if([WXTExecJS isEqualToString:tracing.name]){
NSMutableArray *tracings = task.tracings;
@@ -262,24 +296,24 @@
}
}
- if([WXTExecJS isEqualToString:task.tag]){
- if([WXTJSCall isEqualToString:tracing.name]){
- NSMutableArray *tracings = task.tracings;
- [tracings enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(WXTracing *bTracing, NSUInteger idx, BOOL *stop) {
- if(([WXTExecJS isEqualToString:bTracing.name] || [bTracing.ref isEqualToString:tracing.ref])&&[WXTracingBegin isEqualToString:bTracing.ph]){
- WXTracing *newTracing = [self copyTracing:bTracing];
- newTracing.iid = tracing.iid;
- newTracing.ph = WXTracingEnd;
- newTracing.ts = tracing.ts ;
- newTracing.duration = newTracing.ts - bTracing.ts ;
- bTracing.duration = newTracing.duration;
- [task.tracings addObject:newTracing];
- *stop = YES;
- }
- }];
- task.tag = WXTRender;
- }
- }
+// if([WXTExecJS isEqualToString:task.tag]){
+// if([WXTJSCall isEqualToString:tracing.name]){
+// NSMutableArray *tracings = task.tracings;
+// [tracings enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(WXTracing *bTracing, NSUInteger idx, BOOL *stop) {
+// if(([WXTExecJS isEqualToString:bTracing.name] || [bTracing.ref isEqualToString:tracing.ref])&&[WXTracingBegin isEqualToString:bTracing.ph]){
+// WXTracing *newTracing = [self copyTracing:bTracing];
+// newTracing.iid = tracing.iid;
+// newTracing.ph = WXTracingEnd;
+// newTracing.ts = tracing.ts ;
+// newTracing.duration = newTracing.ts - bTracing.ts ;
+// bTracing.duration = newTracing.duration;
+// [task.tracings addObject:newTracing];
+// *stop = YES;
+// }
+// }];
+// task.tag = WXTRender;
+// }
+// }
if([WXTracingBegin isEqualToString:tracing.ph]){
if(tracing.ref.length>0){
@@ -292,8 +326,20 @@
if(com.supercomponent){
tracing.parentRef = com.supercomponent.ref;
}
+ tracing.name = com.type;
+ if(tracing.parentId == -1){
+ tracing.parentId = [self getParentId:task tracing:tracing];
+ }
+ if(tracing.className.length == 0){
+ tracing.className = [self getclassName:tracing];
+ }
});
+ } else {
+ if(tracing.parentId == -1){
+ tracing.parentId = [self getParentId:task tracing:tracing];
+ }
}
+
}
if([WXTracingEnd isEqualToString:tracing.ph]){ // deal end
NSMutableArray *tracings = task.tracings;
@@ -304,7 +350,7 @@
}
}
- if([bTracing.fName isEqualToString:tracing.fName] &&[WXTracingBegin isEqualToString:bTracing.ph]){
+ if([bTracing.fName isEqualToString:tracing.fName] &&[WXTracingBegin isEqualToString:bTracing.ph] ){
tracing.iid = bTracing.iid;
if(bTracing.ref.length > 0){
tracing.ref = bTracing.ref;
@@ -312,9 +358,12 @@
if(bTracing.parentRef.length > 0){
tracing.parentRef = bTracing.parentRef;
}
+ tracing.parentId = bTracing.parentId;
tracing.duration = tracing.ts - bTracing.ts ;
tracing.traceId = bTracing.traceId;
+ tracing.threadName = bTracing.threadName;
bTracing.duration = tracing.duration;
+ tracing.name = bTracing.name;
*stop = YES;
}
}];
@@ -327,6 +376,7 @@
if(![self isTracing]){
return nil;
}
+
return [WXTracingManager sharedInstance].tracingTasks;
}
@@ -342,7 +392,7 @@
NSDictionary *componentConfigs = [WXComponentFactory componentConfigs];
void (^componentBlock)(id, id, BOOL *) = ^(id mKey, id mObj, BOOL * mStop) {
NSMutableDictionary *componentConfig = [mObj mutableCopy];
- NSDictionary *cDict = [WXComponentFactory componentMethodMapsWithName:componentConfig[@"name"]];
+ NSDictionary *cDict = [WXComponentFactory componentSelectorMapsWithName:componentConfig[@"name"]];
if(cDict && [cDict count]>0 && [cDict[@"methods"] count]>0){
[componentConfig setObject:cDict[@"methods"] forKey:@"methods"];
}
@@ -354,7 +404,7 @@
}
NSDictionary *moduleConfigs = [WXModuleFactory moduleConfigs];
void (^moduleBlock)(id, id, BOOL *) = ^(id mKey, id mObj, BOOL * mStop) {
- NSDictionary *mDict = [WXModuleFactory moduleMethodMapsWithName:mKey];
+ NSDictionary *mDict = [WXModuleFactory moduleSelectorMapsWithName:mKey];
NSMutableDictionary *subDict = [NSMutableDictionary new];
[subDict setObject:mKey forKey:@"name"];
[subDict setObject:mObj forKey:@"class"];
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
index bd5549b..d8da1a3 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXComponent.m
@@ -126,7 +126,6 @@
[self _initCompositingAttribute:_attributes];
[self _handleBorders:styles isUpdating:NO];
- [WXTracingManager startTracingWithInstanceId:self.weexInstance.instanceId ref:ref className:nil name:type phase:WXTracingBegin functionName:WXTRender options:nil];
}
return self;
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index c527ae1..9516b55 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -147,7 +147,7 @@ typedef enum : NSUInteger {
WXResourceRequest *request = [WXResourceRequest requestWithURL:url resourceType:WXResourceTypeMainBundle referrer:@"" cachePolicy:NSURLRequestUseProtocolCachePolicy];
[self _renderWithRequest:request options:options data:data];
- [WXTracingManager startTracingWithInstanceId:self.instanceId ref:nil className:nil name:WXTNetworkHanding phase:WXTracingBegin functionName:@"renderWithURL" options:@{@"bundleUrl":url?[url absoluteString]:@""}];
+ [WXTracingManager startTracingWithInstanceId:self.instanceId ref:nil className:nil name:WXTNetworkHanding phase:WXTracingBegin functionName:@"renderWithURL" options:@{@"bundleUrl":url?[url absoluteString]:@"",@"threadName":WXTMainThread}];
}
- (void)renderView:(NSString *)source options:(NSDictionary *)options data:(id)data
@@ -202,9 +202,9 @@ typedef enum : NSUInteger {
[self _handleConfigCenter];
+ [WXTracingManager startTracingWithInstanceId:self.instanceId ref:nil className:nil name:WXTExecJS phase:WXTracingBegin functionName:@"renderWithMainBundleString" options:@{@"threadName":WXTMainThread}];
[[WXSDKManager bridgeMgr] createInstance:self.instanceId template:mainBundleString options:dictionary data:_jsData];
-
- [WXTracingManager startTracingWithInstanceId:self.instanceId ref:nil className:nil name:WXTExecJS phase:WXTracingBegin functionName:@"renderWithMainBundleString" options:@{@"bundleUrl":self.scriptURL?[self.scriptURL absoluteString]:@""}];
+ [WXTracingManager startTracingWithInstanceId:self.instanceId ref:nil className:nil name:WXTExecJS phase:WXTracingEnd functionName:@"renderWithMainBundleString" options:@{@"threadName":WXTMainThread}];
WX_MONITOR_PERF_SET(WXPTBundleSize, [mainBundleString lengthOfBytesUsingEncoding:NSUTF8StringEncoding], self);
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4b80dac2/ios/sdk/WeexSDK/Sources/View/WXComponent+ViewManagement.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/View/WXComponent+ViewManagement.m b/ios/sdk/WeexSDK/Sources/View/WXComponent+ViewManagement.m
index 40e9889..8bbdc06 100644
--- a/ios/sdk/WeexSDK/Sources/View/WXComponent+ViewManagement.m
+++ b/ios/sdk/WeexSDK/Sources/View/WXComponent+ViewManagement.m
@@ -138,7 +138,6 @@ do {\
- (void)viewDidLoad
{
- [WXTracingManager startTracingWithInstanceId:self.weexInstance.instanceId ref:self.ref className:nil name:_type phase:WXTracingEnd functionName:WXTRender options:nil];
WXAssertMainThread();
}
[3/5] incubator-weex git commit: + [ios] add tracing log for chrome
devtools
Posted by kf...@apache.org.
+ [ios] add tracing log for chrome devtools
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/565bab61
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/565bab61
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/565bab61
Branch: refs/heads/0.16-dev
Commit: 565bab619793192b011a2401486b6360f06e35e3
Parents: 4b80dac
Author: 齐山 <su...@163.com>
Authored: Thu Aug 10 12:12:42 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Thu Aug 10 12:12:42 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 4 +
ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m | 2 +-
ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.h | 4 +
ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.m | 10 ++
.../WeexSDK/Sources/Manager/WXTracingManager.h | 17 ++-
.../WeexSDK/Sources/Manager/WXTracingManager.m | 107 +++++++++++++++----
ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m | 2 +
.../Sources/Protocol/WXTracingProtocol.h | 29 +++++
8 files changed, 149 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/565bab61/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 5785c45..0557764 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -236,6 +236,7 @@
C401945E1E344E8300D19C31 /* WXFloatCompareTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C401945D1E344E8300D19C31 /* WXFloatCompareTests.m */; };
C41E1A971DC1FD15009C7F90 /* WXDatePickerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */; };
C41E1A981DC1FD15009C7F90 /* WXDatePickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */; };
+ C42E8F9B1F39DF07001EBE9D /* WXTracingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */; };
C43C03E81EC8ACA40044C7FF /* WXPrerenderManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C43C03E41EC8ACA40044C7FF /* WXPrerenderManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
C43C03E91EC8ACA40044C7FF /* WXPrerenderManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C43C03E51EC8ACA40044C7FF /* WXPrerenderManager.m */; };
C4B3D6D41E6954300013F38D /* WXEditComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = C4B3D6D21E6954300013F38D /* WXEditComponent.h */; };
@@ -800,6 +801,7 @@
C401945D1E344E8300D19C31 /* WXFloatCompareTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXFloatCompareTests.m; sourceTree = "<group>"; };
C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXDatePickerManager.h; sourceTree = "<group>"; };
C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXDatePickerManager.m; sourceTree = "<group>"; };
+ C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXTracingProtocol.h; sourceTree = "<group>"; };
C43C03E41EC8ACA40044C7FF /* WXPrerenderManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXPrerenderManager.h; sourceTree = "<group>"; };
C43C03E51EC8ACA40044C7FF /* WXPrerenderManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXPrerenderManager.m; sourceTree = "<group>"; };
C4B3D6D21E6954300013F38D /* WXEditComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXEditComponent.h; sourceTree = "<group>"; };
@@ -1266,6 +1268,7 @@
74EF31A91DE58AE600667A07 /* WXURLRewriteProtocol.h */,
042013AC1E66CD6A001FC79C /* WXValidateProtocol.h */,
DC6836E51EBB12B200AD2D84 /* WXConfigCenterProtocol.h */,
+ C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */,
);
path = Protocol;
sourceTree = "<group>";
@@ -1525,6 +1528,7 @@
DCA0EF641D6EED6F00CB18B9 /* WXGlobalEventModule.h in Headers */,
2A837AB21CD9DE9200AEDF03 /* WXLoadingComponent.h in Headers */,
DCA446271EFA5DAF00D0CFA8 /* WeexSDK.h in Headers */,
+ C42E8F9B1F39DF07001EBE9D /* WXTracingProtocol.h in Headers */,
7423899F1C32733800D748CA /* WXType.h in Headers */,
59A582FC1CF5B17B0081FD3E /* WXBridgeContext.h in Headers */,
77D161621C02ED790010B15B /* WXLog.h in Headers */,
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/565bab61/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
index 09dc9d8..e56bf2c 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
@@ -207,7 +207,7 @@
NSDictionary *componentData = [element toDictionary];
NSString *parentRef = [ref toString];
NSInteger insertIndex = [[index toNumber] integerValue];
- [WXTracingManager startTracingWithInstanceId:instanceIdString ref:componentData[@"ref"] className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"addElement" options:@{@"threadName":WXTJSBridgeThread}];
+ [WXTracingManager startTracingWithInstanceId:instanceIdString ref:componentData[@"ref"] className:nil name:WXTJSCall phase:WXTracingBegin functionName:@"addElement" options:@{@"threadName":WXTJSBridgeThread,@"componentData":componentData}];
WXLogDebug(@"callAddElement...%@, %@, %@, %ld", instanceIdString, parentRef, componentData, (long)insertIndex);
return [JSValue valueWithInt32:(int32_t)callAddElement(instanceIdString, parentRef, componentData, insertIndex) inContext:[JSContext currentContext]];
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/565bab61/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.h b/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.h
index 2277242..f2e0430 100644
--- a/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.h
+++ b/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.h
@@ -48,4 +48,8 @@
+ (NSDictionary *) jsServiceCache;
++ (BOOL)isRemoteTracing;
+
++ (void)setRemoteTracing:(BOOL)isRemoteTracing;
+
@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/565bab61/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.m b/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.m
index b599e59..5ea2a24 100644
--- a/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.m
+++ b/ios/sdk/WeexSDK/Sources/Debug/WXDebugTool.m
@@ -30,6 +30,7 @@
static BOOL WXIsDebug;
static BOOL WXIsDevToolDebug;
+static BOOL WXIsRemoteTracing;
static NSString* WXDebugrepBundleJS;
static NSString* WXDebugrepJSFramework;
@@ -81,6 +82,15 @@ static NSString* WXDebugrepJSFramework;
WXIsDevToolDebug = isDevToolDebug;
}
++ (BOOL)isRemoteTracing
+{
+ return WXIsRemoteTracing;
+}
+
++ (void)setRemoteTracing:(BOOL)isRemoteTracing {
+ WXIsRemoteTracing = isRemoteTracing;
+}
+
+ (BOOL)isDevToolDebug {
return WXIsDevToolDebug;
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/565bab61/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
index 9c3634e..48c1eba 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h
@@ -20,8 +20,8 @@
#import <Foundation/Foundation.h>
#import "WXSDKInstance.h"
-#define WXTNetworkHanding @"downloadBundleJS"
-#define WXTExecJS @"executeBundleJS"
+#define WXTNetworkHanding @"loadJS"
+#define WXTExecJS @"execJS"
#define WXTJSCall @"jsCall"
#define WXTDomCall @"domCall"
#define WXTRender @"render"
@@ -70,6 +70,7 @@ typedef enum : NSUInteger {
@property (nonatomic) long long parentId;// parent event id
@property (nonatomic, copy) NSString *bundleUrl;
@property (nonatomic, copy) NSString *threadName;
+@property (nonatomic, strong) NSMutableArray *childrenRefs; // children ids
-(NSDictionary *)dictionary;
@end
@@ -135,4 +136,16 @@ typedef enum : NSUInteger {
*/
+(NSDictionary *)getTacingApi;
+/**
+ * @discusstion commit tracing info
+ * @param instanceId the instance id.
+ */
++(void )commitTracing:(NSString *)instanceId;
+
+/**
+ * @discusstion commit summary info
+ * @param instanceId the instance id.
+ */
++ (void)commitTracingSummaryInfo:(NSDictionary *)info withInstanceId:(NSString *)instanceId;
+
@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/565bab61/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
index b4b19d5..6da8dd4 100644
--- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
+++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m
@@ -26,6 +26,8 @@
#import <WeexSDK/WXHandlerFactory.h>
#import "WXUtility.h"
#import "WXComponentManager.h"
+#import "WXTracingProtocol.h"
+#import "WXSDKEngine.h"
@implementation WXTracing
@@ -198,10 +200,34 @@
if(options && options[@"threadName"]){
tracing.threadName = options[@"threadName"];
}
+ if(options && options[@"componentData"]){
+ tracing.childrenRefs = [self getChildrenRefs:options[@"componentData"]];
+ }
[self startTracing:tracing];
}
}
++ (NSMutableArray *)getChildrenRefs:(NSDictionary *)componentData
+{
+ NSMutableArray *mArray = [NSMutableArray new];
+ [self recursively:mArray componentData:componentData];
+ return mArray;
+}
+
++(void)recursively:(NSMutableArray *)mArray componentData:(NSDictionary *)componentData
+{
+ if([componentData valueForKey:@"children"]){
+ NSArray *children = [componentData valueForKey:@"children"];
+ for(NSDictionary *subcomponentData in children){
+ NSString *ref = [subcomponentData objectForKey:@"ref"];
+ if(ref){
+ [mArray addObject:ref];
+ }
+ [self recursively:mArray componentData:subcomponentData];
+ }
+ }
+}
+
+(WXTracing *)copyTracing:(WXTracing *)tracing
{
WXTracing *newTracing = [WXTracing new];
@@ -265,7 +291,8 @@
if(tracings && [tracings count]>0){
for (NSInteger i = [tracings count] - 1; i >= 0; i--) {
WXTracing *t = tracings[i];
- if([t.threadName isEqualToString:WXTJSBridgeThread]&& [t.ref isEqualToString:tracing.ref] && ([t.name isEqualToString:tracing.name] || [t.name isEqualToString:WXTJSCall])){
+// if([t.threadName isEqualToString:WXTJSBridgeThread]&& [self compareRef:tracing.ref withTracing:t] && ([t.name isEqualToString:tracing.name] || [t.name isEqualToString:WXTJSCall])){
+ if([t.threadName isEqualToString:WXTJSBridgeThread]&& [self compareRef:tracing.ref withTracing:t]){
if([t.fName isEqualToString:tracing.fName]){
return t.traceId;
}
@@ -275,6 +302,21 @@
return -1;
}
++(BOOL)compareRef:(NSString *)ref withTracing:(WXTracing *)tracing
+{
+ if([tracing.ref isEqualToString:ref]){
+ return YES;
+ }
+ if(tracing.childrenRefs && [tracing.childrenRefs count] > 0){
+ for (NSString *childRef in tracing.childrenRefs) {
+ if([childRef isEqualToString:ref]){
+ return YES;
+ }
+ }
+ }
+ return NO;
+}
+
+(void)updateTracings:(WXTracingTask *)task tracing:(WXTracing *)tracing
{
if([WXTNetworkHanding isEqualToString:task.tag]){
@@ -296,25 +338,6 @@
}
}
-// if([WXTExecJS isEqualToString:task.tag]){
-// if([WXTJSCall isEqualToString:tracing.name]){
-// NSMutableArray *tracings = task.tracings;
-// [tracings enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(WXTracing *bTracing, NSUInteger idx, BOOL *stop) {
-// if(([WXTExecJS isEqualToString:bTracing.name] || [bTracing.ref isEqualToString:tracing.ref])&&[WXTracingBegin isEqualToString:bTracing.ph]){
-// WXTracing *newTracing = [self copyTracing:bTracing];
-// newTracing.iid = tracing.iid;
-// newTracing.ph = WXTracingEnd;
-// newTracing.ts = tracing.ts ;
-// newTracing.duration = newTracing.ts - bTracing.ts ;
-// bTracing.duration = newTracing.duration;
-// [task.tracings addObject:newTracing];
-// *stop = YES;
-// }
-// }];
-// task.tag = WXTRender;
-// }
-// }
-
if([WXTracingBegin isEqualToString:tracing.ph]){
if(tracing.ref.length>0){
WXPerformBlockOnComponentThread(^{
@@ -327,13 +350,13 @@
tracing.parentRef = com.supercomponent.ref;
}
tracing.name = com.type;
- if(tracing.parentId == -1){
- tracing.parentId = [self getParentId:task tracing:tracing];
- }
if(tracing.className.length == 0){
tracing.className = [self getclassName:tracing];
}
});
+ if(tracing.parentId == -1){
+ tracing.parentId = [self getParentId:task tracing:tracing];
+ }
} else {
if(tracing.parentId == -1){
tracing.parentId = [self getParentId:task tracing:tracing];
@@ -368,7 +391,11 @@
}
}];
}
+
[task.tracings addObject:tracing];
+ if([@"renderFinish" isEqualToString:tracing.fName] && [WXTracingInstant isEqualToString:tracing.ph] && [WXTUIThread isEqualToString:tracing.threadName]) {
+ [WXTracingManager commitTracing:task.iid];
+ }
}
+(NSMutableDictionary *)getTracingData
@@ -433,4 +460,38 @@
return dict;
}
++ (void)commitTracing:(NSString *)instanceId
+{
+ if(![self isTracing]){
+ return ;
+ }
+ id tracingHandle = [WXSDKEngine handlerForProtocol:@protocol(WXTracingProtocol)];
+ if ([tracingHandle respondsToSelector:@selector(commitTracingInfo:)]){
+ WXTracingTask *task = [[WXTracingManager sharedInstance].tracingTasks objectForKey:instanceId];
+ if(task) {
+ [tracingHandle commitTracingInfo:task];
+ }
+
+ }
+}
+
++ (void)commitTracingSummaryInfo:(NSDictionary *)info withInstanceId:(NSString *)instanceId
+{
+ if(![self isTracing]){
+ return ;
+ }
+ id tracingHandle = [WXSDKEngine handlerForProtocol:@protocol(WXTracingProtocol)];
+ if ([tracingHandle respondsToSelector:@selector(commitTracingSummaryInfo:)]){
+ if(info) {
+ NSMutableDictionary *newInfo = [info mutableCopy];
+ if(instanceId.length > 0){
+ [newInfo setObject:instanceId forKey:@"instanceId"];
+ [newInfo setObject:[[WXUtility getEnvironment] objectForKey:@"platform"] forKey:@"platform"];
+ }
+ [tracingHandle commitTracingSummaryInfo:newInfo];
+ }
+
+ }
+}
+
@end
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/565bab61/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
index a2a4d6d..6759cf4 100644
--- a/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
+++ b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
@@ -27,6 +27,7 @@
#import "WXComponentManager.h"
#import "WXThreadSafeMutableDictionary.h"
#import "WXAppConfiguration.h"
+#import "WXTracingManager.h"
NSString *const kStartKey = @"start";
NSString *const kEndKey = @"end";
@@ -162,6 +163,7 @@ static WXThreadSafeMutableDictionary *globalPerformanceDict;
}
[self printPerformance:commitDict];
+ [WXTracingManager commitTracingSummaryInfo:commitDict withInstanceId:instance.instanceId];
}
+ (NSMutableDictionary *)performanceDictForInstance:(WXSDKInstance *)instance
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/565bab61/ios/sdk/WeexSDK/Sources/Protocol/WXTracingProtocol.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Protocol/WXTracingProtocol.h b/ios/sdk/WeexSDK/Sources/Protocol/WXTracingProtocol.h
new file mode 100644
index 0000000..4b7f140
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Protocol/WXTracingProtocol.h
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import "WXTracingProtocol.h"
+#import "WXTracingManager.h"
+
+@protocol WXTracingProtocol <NSObject>
+
+- (void)commitTracingInfo:(WXTracingTask *)task;
+
+- (void)commitTracingSummaryInfo:(NSDictionary *)info;
+
+@end
[5/5] incubator-weex git commit: Merge branch '0.16-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into
ios-devtools-tracing-0.16-dev
Posted by kf...@apache.org.
Merge branch '0.16-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into ios-devtools-tracing-0.16-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d1bdd73b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d1bdd73b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d1bdd73b
Branch: refs/heads/0.16-dev
Commit: d1bdd73bcee036433f9e50c8566ddb2a4bf347ff
Parents: 2a1bcba 63c9c86
Author: 齐山 <su...@163.com>
Authored: Thu Aug 10 19:58:25 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Thu Aug 10 19:58:25 2017 +0800
----------------------------------------------------------------------
.gitignore | 2 +-
.travis.yml | 8 +-
android/build.gradle | 8 +-
.../java/com/alibaba/weex/IndexActivity.java | 14 +
.../main/java/com/taobao/weex/WXSDKManager.java | 10 +
.../java/com/taobao/weex/bridge/WXBridge.java | 8 +-
.../com/taobao/weex/bridge/WXBridgeManager.java | 36 +-
.../taobao/weex/bridge/WXValidateProcessor.java | 7 +-
.../java/com/taobao/weex/common/Constants.java | 1 +
.../taobao/weex/common/WXWorkThreadManager.java | 48 +
.../java/com/taobao/weex/dom/WXDomObject.java | 17 +-
.../com/taobao/weex/dom/WXTextDomObject.java | 91 +-
.../dom/action/AbstractAddElementAction.java | 2 +-
.../taobao/weex/dom/action/AnimationAction.java | 1 +
.../ui/animation/CameraDistanceProperty.java | 54 +
.../weex/ui/animation/WXAnimationBean.java | 86 +-
.../taobao/weex/ui/component/WXComponent.java | 16 -
.../com/taobao/weex/ui/component/WXImage.java | 68 +
.../taobao/weex/utils/WXViewToImageUtil.java | 151 +
.../java/com/taobao/weex/utils/WXViewUtils.java | 4 +-
build/build.js | 1 +
build/config.js | 17 +-
build/karma.vue.conf.js | 2 +-
examples/vue/components/scroller.vue | 9 +-
examples/vue/modules/picker.vue | 149 +-
examples/vue/modules/websocket.vue | 22 +-
html5/frameworks/legacy/core/array.js | 4 +
html5/frameworks/legacy/core/object.js | 6 +
html5/frameworks/legacy/static/create.js | 7 +-
html5/frameworks/legacy/vm/directive.js | 6 +
html5/frameworks/vanilla/index.js | 35 +-
html5/render/vue/README.md | 15 +
html5/render/vue/components/image.js | 58 +-
.../vue/components/scrollable/scroller.js | 8 +-
.../render/vue/components/scrollable/style.css | 5 +
html5/render/vue/config.js | 10 +-
html5/render/vue/core/node.js | 27 +-
html5/render/vue/lib/gesture.js | 6 +
html5/render/vue/modules/dom.js | 97 +-
html5/render/vue/modules/modal/toast.js | 23 +-
html5/runtime/callback-manager.js | 12 +-
html5/runtime/config.js | 5 +-
html5/runtime/normalize.js | 107 +
html5/runtime/task-center.js | 59 +-
html5/runtime/vdom/document.js | 2 +
html5/runtime/vdom/element.js | 15 +-
html5/test/render/vue/core/node.js | 2 +
html5/test/render/vue/modules/dom.js | 17 +-
ios/.gitignore | 1 +
ios/playground/Podfile | 2 +-
.../WeexDemo.xcodeproj/project.pbxproj | 24 +-
ios/playground/WeexDemo/AppDelegate.m | 8 +-
ios/playground/WeexDemo/WXDemoViewController.m | 2 -
ios/playground/WeexDemo/WXExtModule.h | 26 +
ios/playground/WeexDemo/WXExtModule.m | 43 +
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 16 +-
.../Component/Recycler/WXRecyclerComponent.m | 58 +-
.../Recycler/WXRecyclerDragController.h | 52 +
.../Recycler/WXRecyclerDragController.m | 208 +
.../WeexSDK/Sources/Component/WXAComponent.m | 1 +
.../WeexSDK/Sources/Component/WXEditComponent.m | 11 +-
.../Sources/Component/WXImageComponent.m | 174 +-
.../Sources/Component/WXScrollerComponent.m | 3 +-
.../Sources/Component/WXTextAreaComponent.m | 2 +-
.../WeexSDK/Sources/Component/WXTextComponent.m | 5 +-
ios/sdk/WeexSDK/Sources/Component/WXTransform.h | 1 +
ios/sdk/WeexSDK/Sources/Component/WXTransform.m | 33 +-
.../Sources/Component/WXVideoComponent.m | 1 +
.../WeexSDK/Sources/Component/WXWebComponent.m | 1 +
.../WeexSDK/Sources/Loader/WXResourceLoader.m | 2 +-
.../WeexSDK/Sources/Loader/WXWebSocketLoader.h | 2 +-
.../WeexSDK/Sources/Loader/WXWebSocketLoader.m | 2 +-
ios/sdk/WeexSDK/Sources/Manager/WXRuleManager.m | 1 +
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 1 +
.../WeexSDK/Sources/Module/WXAnimationModule.m | 5 +
ios/sdk/WeexSDK/Sources/Module/WXStreamModule.m | 14 +
.../WeexSDK/Sources/Module/WXWebSocketModule.m | 16 +-
ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m | 7 +
.../Sources/Network/WXResourceResponse.h | 2 +-
.../Sources/Protocol/WXAppMonitorProtocol.h | 2 +
.../Sources/Protocol/WXURLRewriteProtocol.h | 2 +-
ios/sdk/WeexSDK/Sources/Utility/WXDefine.h | 2 +
ios/sdk/WeexSDK/Sources/Utility/WXUtility.h | 12 +
ios/sdk/WeexSDK/Sources/Utility/WXUtility.m | 22 +
.../Sources/WebSocket/WXWebSocketDefaultImpl.m | 2 +-
ios/sdk/WeexSDK/Sources/WeexSDK.h | 1 +
package.json | 18 +-
packages/weex-js-framework/.npmignore | 4 +
packages/weex-js-framework/index.js | 26001 +++++++++++++++++
packages/weex-js-framework/index.min.js | 1 +
packages/weex-js-framework/package.json | 22 +
packages/weex-js-runtime/.npmignore | 4 +
packages/weex-js-runtime/index.js | 4088 +++
packages/weex-js-runtime/index.min.js | 1 +
packages/weex-js-runtime/index.min.js.gz | Bin 0 -> 13215 bytes
packages/weex-js-runtime/package.json | 22 +
packages/weex-legacy-framework/.npmignore | 4 +
packages/weex-legacy-framework/index.js | 5770 ++++
packages/weex-legacy-framework/index.min.js | 1 +
packages/weex-legacy-framework/package.json | 22 +
packages/weex-vue-render/README.md | 15 +
packages/weex-vue-render/package.json | 2 +-
pre-build/native-bundle-main.js | 16 +-
scripts/commit-msg.sh | 2 +-
test/pages/components/hyperlink_target.vue | 1 +
test/pages/components/iconfont.vue | 71 +
test/pages/components/input-event.vue | 65 +
test/pages/components/refresh-loading.vue | 115 +
test/pages/components/switch-event.vue | 60 +
test/pages/components/web-event.vue | 56 +
test/pages/include/button.vue | 162 +
test/pages/include/h1.vue | 13 +
test/pages/include/h2.vue | 13 +
test/pages/include/h3.vue | 13 +
test/pages/include/hn.vue | 47 +
test/pages/include/panel.vue | 141 +
test/pages/include/wxc-desc.vue | 66 +
test/pages/modules/animation-translate.vue | 129 +
test/pages/modules/clipboard-event.vue | 57 +
test/pages/modules/cover-generate.vue | 53 +
test/pages/modules/downgrade-event.vue | 74 +
test/pages/modules/gesture-longpress.vue | 75 +
test/pages/modules/modal-event.vue | 61 +
test/pages/modules/picker-event.vue | 63 +
test/pages/modules/storage-event.vue | 59 +
test/pages/modules/stream-result.vue | 85 +
test/run.sh | 30 +-
test/screenshot/border-android.png | Bin 156247 -> 158634 bytes
test/scripts/components/iconfont.test.js | 34 +
test/scripts/components/input-event.test.js | 36 +
test/scripts/components/refresh-loading.test.js | 38 +
test/scripts/components/switch-event.test.js | 38 +
test/scripts/components/web-event.test.js | 30 +
.../scripts/modules/animation-translate.test.js | 40 +
test/scripts/modules/clipboard-event.test.js | 35 +
test/scripts/modules/downgrade-event.test.js | 30 +
test/scripts/modules/gesture-longpress.test.js | 37 +
test/scripts/modules/modal-event.test.js | 35 +
test/scripts/modules/picker-event.test.js | 41 +
test/scripts/modules/storage-event.test.js | 36 +
test/scripts/modules/stream-result.test.js | 34 +
test/scripts/util.js | 41 +
test/scripts/zcover-generate.js | 32 +
test/serve.sh | 2 +-
vue.html | 3 +
145 files changed, 39664 insertions(+), 505 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d1bdd73b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d1bdd73b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d1bdd73b/ios/sdk/WeexSDK/Sources/Monitor/WXMonitor.m
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d1bdd73b/ios/sdk/WeexSDK/Sources/WeexSDK.h
----------------------------------------------------------------------
[4/5] incubator-weex git commit: + [ios] add public header for dynamic
Posted by kf...@apache.org.
+ [ios] add public header for dynamic
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/2a1bcbaa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/2a1bcbaa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/2a1bcbaa
Branch: refs/heads/0.16-dev
Commit: 2a1bcbaa9420d9c55c70426cd4419025b03f4100
Parents: 565bab6
Author: 齐山 <su...@163.com>
Authored: Thu Aug 10 19:32:32 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Thu Aug 10 19:32:32 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 4 +++-
ios/sdk/WeexSDK/Sources/WeexSDK.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2a1bcbaa/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 0557764..50e2acf 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -236,7 +236,8 @@
C401945E1E344E8300D19C31 /* WXFloatCompareTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C401945D1E344E8300D19C31 /* WXFloatCompareTests.m */; };
C41E1A971DC1FD15009C7F90 /* WXDatePickerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */; };
C41E1A981DC1FD15009C7F90 /* WXDatePickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */; };
- C42E8F9B1F39DF07001EBE9D /* WXTracingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */; };
+ C42E8F9B1F39DF07001EBE9D /* WXTracingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ C42E8FAA1F3C7AA1001EBE9D /* WXTracingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = C42E8F991F39DF07001EBE9D /* WXTracingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
C43C03E81EC8ACA40044C7FF /* WXPrerenderManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C43C03E41EC8ACA40044C7FF /* WXPrerenderManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
C43C03E91EC8ACA40044C7FF /* WXPrerenderManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C43C03E51EC8ACA40044C7FF /* WXPrerenderManager.m */; };
C4B3D6D41E6954300013F38D /* WXEditComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = C4B3D6D21E6954300013F38D /* WXEditComponent.h */; };
@@ -1732,6 +1733,7 @@
DCA446011EFA5A4B00D0CFA8 /* WXTimerModule.h in Headers */,
DCA446001EFA5A4800D0CFA8 /* WXDomModule.h in Headers */,
DCA446021EFA5A5000D0CFA8 /* WXWebViewModule.h in Headers */,
+ C42E8FAA1F3C7AA1001EBE9D /* WXTracingProtocol.h in Headers */,
DCA446181EFA5A9B00D0CFA8 /* JSValue+Weex.h in Headers */,
DCA446061EFA5A5B00D0CFA8 /* NSTimer+Weex.h in Headers */,
DCA445D61EFA598600D0CFA8 /* WXView.h in Headers */,
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2a1bcbaa/ios/sdk/WeexSDK/Sources/WeexSDK.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/WeexSDK.h b/ios/sdk/WeexSDK/Sources/WeexSDK.h
index de1a82e..7521afa 100644
--- a/ios/sdk/WeexSDK/Sources/WeexSDK.h
+++ b/ios/sdk/WeexSDK/Sources/WeexSDK.h
@@ -23,6 +23,7 @@
#import "WXUtility.h"
#import "WXURLRewriteProtocol.h"
#import "WXType.h"
+#import "WXTracingProtocol.h"
#import "WXTracingManager.h"
#import "WXScrollerProtocol.h"
#import "WXScrollerComponent.h"