You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by kfeagle <gi...@git.apache.org> on 2017/07/19 02:11:36 UTC

[GitHub] incubator-weex pull request #516: + [ios] add tracing for weex in debug

GitHub user kfeagle opened a pull request:

    https://github.com/apache/incubator-weex/pull/516

    + [ios]  add tracing for weex in debug

    + [ios]  add tracing for weex in debug

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kfeagle/incubator-weex ios-tracing-0.15-dev

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/516.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #516
    
----
commit 92d0dd1b103d2c347b65f679432899f432f33531
Author: 齐山 <su...@163.com>
Date:   2017-06-29T10:16:27Z

    + [ios] init tracing

commit b21e8732f6daedc9c7156a9a5e1b0f9c48538400
Author: 齐山 <su...@163.com>
Date:   2017-06-30T09:19:52Z

    + [ios] add tracing feature

commit 814cbfe7a0509d44c4007bee4511d398709052e9
Author: 齐山 <su...@163.com>
Date:   2017-07-03T09:23:26Z

    Merge branch '0.15-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into ios-tracing-0.15-dev

commit 3cd9b977fc79b1837072018f6e2806997f500193
Author: 齐山 <su...@163.com>
Date:   2017-07-03T09:24:55Z

    + [ios] tracing method

commit b072e4fa0873884e440699abeaaac86c19f018cb
Author: 齐山 <su...@163.com>
Date:   2017-07-05T02:20:46Z

    + [ios] optimize tracing logic

commit e34099147a2eb64b8caaecb5d6c1f72c0bfb9041
Author: 齐山 <su...@163.com>
Date:   2017-07-05T14:32:39Z

    + [ios] update code

commit 11b19496abe91afcbcf99abb49519c8ad4c4121b
Author: 齐山 <su...@163.com>
Date:   2017-07-12T08:02:26Z

    + [ios] add tracing logic

commit 7c3b6cfc6c47be3811cf3313db231550f40296d3
Author: 齐山 <su...@163.com>
Date:   2017-07-19T02:09:06Z

    + [ios] update tracing logic @notdanger

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #516: + [ios] add tracing for weex in debug

Posted by acton393 <gi...@git.apache.org>.
Github user acton393 commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/516#discussion_r128677053
  
    --- Diff: ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h ---
    @@ -0,0 +1,85 @@
    +/*
    + * 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 <Foundation/Foundation.h>
    +#import "WXSDKInstance.h"
    +
    +#define WXTNetworkHanding          @"loadjs"
    +#define WXTExecJS          @"execjs"
    +#define WXTJSCall          @"jsCall"
    +#define WXTRender          @"render"
    +#define WXTRenderFinish          @"RenderFinish"
    +
    +#define WXTracingBegin             @"B"
    +#define WXTracingEnd               @"E"
    +#define WXTracingDuration          @"D"
    +#define WXTracingInstant          @"i"
    +
    +typedef enum : NSUInteger {
    +    // global
    +    WXTracingNetworkHanding = 0,
    +    WXTracingDataHanding,
    +    WXTracingRender
    +} WXTracingTag;
    +
    +
    +@interface WXTracingApi:NSObject
    +
    +@property (nonatomic, copy) NSString *name; //
    +@property (nonatomic, copy) NSString *className; //
    +@property (nonatomic, copy) NSString *method; //
    +
    +@end
    +
    +@interface WXTracing:NSObject
    +
    +@property (nonatomic, copy) NSString *ref; // compnonet id
    +@property (nonatomic, copy) NSString *parentRef; // compnonet id
    +@property (nonatomic, copy) NSString *className; // compnonet class name or module class name
    +@property (nonatomic, copy) NSString *name; // register name
    +@property (nonatomic, copy) NSString *ph; // phase
    +@property (nonatomic) NSTimeInterval ts; // time
    +@property (nonatomic) long long traceId;
    +@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
    +-(NSDictionary *)dictionary;
    +@end
    +
    +@interface WXTracingTask:NSObject
    +
    +@property (nonatomic, copy) NSString *iid;
    +@property (nonatomic) long long counter;
    +@property (nonatomic, copy)  NSString *tag;
    +@property (nonatomic, copy)  NSString *bundleUrl;
    +@property (nonatomic, strong) NSMutableArray *tracings;
    +@property (nonatomic, copy) NSString *bundleJSType; //
    +
    +@end
    +
    +@interface WXTracingManager : NSObject
    --- End diff --
    
    may be more function description


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #516: + [ios] add tracing for weex in debug

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-weex/pull/516


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex issue #516: + [ios] add tracing for weex in debug

Posted by weex-bot <gi...@git.apache.org>.
Github user weex-bot commented on the issue:

    https://github.com/apache/incubator-weex/pull/516
  
    
    <!--
      0 failure: 
      3 warning:  No Changelog chan..., This PR modify SD..., This PR should up...
      1 messages
      
    -->
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Warnings</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:warning:</td>
          <td>No Changelog changes!</td>
        </tr>
      
    <tr>
          <td>:warning:</td>
          <td>This PR modify SDK code without add/modify testcases.</td>
        </tr>
      
    <tr>
          <td>:warning:</td>
          <td>This PR should update related documents as well. </td>
        </tr>
      </tbody>
    </table>
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Messages</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:book:</td>
          <td>According to the blame info, we recommended @boboning , @cxfeng1 to be the reviewers.</td>
        </tr>
      </tbody>
    </table>
    
    
    <p align="right">
      Generated by :no_entry_sign: <a href="http://github.com/danger/danger-js/">dangerJS</a>
    </p>



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #516: + [ios] add tracing for weex in debug

Posted by acton393 <gi...@git.apache.org>.
Github user acton393 commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/516#discussion_r128676803
  
    --- Diff: ios/playground/WeexDemo/WXDemoViewController.m ---
    @@ -146,6 +146,7 @@ - (void)render
         
         _instance.renderFinish = ^(UIView *view) {
              WXLogDebug(@"%@", @"Render Finish...");
    +        [WXTracingManager startTracing:weakSelf.instance.instanceId ref:nil parentRef:nil className:nil name:nil ph:WXTracingInstant fName:WXTRenderFinish parentId:nil];
    --- End diff --
    
    what's the 'ph', maybe it can be more clearly


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-weex pull request #516: + [ios] add tracing for weex in debug

Posted by kfeagle <gi...@git.apache.org>.
Github user kfeagle commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/516#discussion_r128698720
  
    --- Diff: ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h ---
    @@ -0,0 +1,85 @@
    +/*
    + * 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 <Foundation/Foundation.h>
    +#import "WXSDKInstance.h"
    +
    +#define WXTNetworkHanding          @"loadjs"
    +#define WXTExecJS          @"execjs"
    +#define WXTJSCall          @"jsCall"
    +#define WXTRender          @"render"
    +#define WXTRenderFinish          @"RenderFinish"
    +
    +#define WXTracingBegin             @"B"
    +#define WXTracingEnd               @"E"
    +#define WXTracingDuration          @"D"
    +#define WXTracingInstant          @"i"
    +
    +typedef enum : NSUInteger {
    +    // global
    +    WXTracingNetworkHanding = 0,
    +    WXTracingDataHanding,
    +    WXTracingRender
    +} WXTracingTag;
    +
    +
    +@interface WXTracingApi:NSObject
    +
    +@property (nonatomic, copy) NSString *name; //
    +@property (nonatomic, copy) NSString *className; //
    +@property (nonatomic, copy) NSString *method; //
    +
    +@end
    +
    +@interface WXTracing:NSObject
    +
    +@property (nonatomic, copy) NSString *ref; // compnonet id
    +@property (nonatomic, copy) NSString *parentRef; // compnonet id
    +@property (nonatomic, copy) NSString *className; // compnonet class name or module class name
    +@property (nonatomic, copy) NSString *name; // register name
    +@property (nonatomic, copy) NSString *ph; // phase
    +@property (nonatomic) NSTimeInterval ts; // time
    +@property (nonatomic) long long traceId;
    +@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
    +-(NSDictionary *)dictionary;
    +@end
    +
    +@interface WXTracingTask:NSObject
    +
    +@property (nonatomic, copy) NSString *iid;
    +@property (nonatomic) long long counter;
    +@property (nonatomic, copy)  NSString *tag;
    +@property (nonatomic, copy)  NSString *bundleUrl;
    +@property (nonatomic, strong) NSMutableArray *tracings;
    +@property (nonatomic, copy) NSString *bundleJSType; //
    +
    +@end
    +
    +@interface WXTracingManager : NSObject
    --- End diff --
    
    good ,I have add comment


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---