* [android] get screenreader time add mtop coume time

Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/7857ba40
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/7857ba40
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/7857ba40

Branch: refs/heads/master
Commit: 7857ba40a7692797e0fcc103e8c622c95af8446c
Parents: 355800d
Author: atomtong <tong_huab...@qq.com>
Authored: Wed Nov 1 23:38:01 2017 +0800
Committer: atomtong <tong_huab...@qq.com>
Committed: Wed Nov 1 23:38:01 2017 +0800

----------------------------------------------------------------------
 .../java/com/taobao/weex/WXSDKInstance.java     | 11 ++++++++--
 .../com/taobao/weex/common/WXPerformance.java   | 21 +++++++++++++++++---
 2 files changed, 27 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7857ba40/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 5079cd1..14c6172 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -127,19 +127,24 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
   public long mRenderStartNanos;
   public int mExecJSTraceId = WXTracing.nextId();
 
+  /**
+   *for network tracker
+   */
+  public String mwxDims[] = new String [5];
+  public Double measureTimes[] = new Double [5];
 
   public WeakReference<String> templateRef;
-
   public Map<String,List<String>> responseHeaders = new HashMap<>();
 
   /**
    * Render strategy.
    */
   private WXRenderStrategy mRenderStrategy = WXRenderStrategy.APPEND_ASYNC;
+
   /**
    * Render start time
    */
-  private long mRenderStartTime;
+  public long mRenderStartTime;
   /**
    * Refresh start time
    */
@@ -840,6 +845,8 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
         mWXPerformance.useScroller=1;
       }
       mWXPerformance.maxDeepViewLayer=getMaxDeepLayer();
+         mWXPerformance.wxDims = mwxDims;
+         mWXPerformance.measureTimes = measureTimes;
       if (mUserTrackAdapter != null) {
         mUserTrackAdapter.commit(mContext, null, IWXUserTrackAdapter.LOAD, 
mWXPerformance, getUserTrackParams());
       }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7857ba40/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
----------------------------------------------------------------------
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java 
b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
index 229a475..04eb354 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/WXPerformance.java
@@ -176,6 +176,12 @@ public class WXPerformance {
   public String connectionType;
   public String requestType;
 
+  /**
+   *for network tracker
+   */
+
+  public String wxDims[] = new String [5];
+  public Double measureTimes[] = new Double [5];
 
   public WXPerformance(){
     mErrMsgBuilder=new StringBuilder();
@@ -203,7 +209,12 @@ public class WXPerformance {
     quotas.put("SDKInitTime",(double)WXEnvironment.sSDKInitTime);
     quotas.put("maxDeepViewLayer", (double) maxDeepViewLayer);
     quotas.put("useScroller", (double) useScroller);
-    return quotas;
+       quotas.put("measureTime1", measureTimes[0]);
+       quotas.put("measureTime2", measureTimes[1]);
+       quotas.put("measureTime3", measureTimes[2]);
+       quotas.put("measureTime4", measureTimes[3]);
+       quotas.put("measureTime5", measureTimes[4]);
+       return quotas;
   }
 
   public Map<String,String> getDimensionMap(){
@@ -215,8 +226,12 @@ public class WXPerformance {
     quotas.put("WXSDKVersion", WXSDKVersion);
     quotas.put("connectionType",connectionType);
     quotas.put("requestType",requestType);
-
-    return quotas;
+       quotas.put("wxdim1", wxDims[0]);
+       quotas.put("wxdim2", wxDims[1]);
+       quotas.put("wxdim3", wxDims[2]);
+       quotas.put("wxdim4", wxDims[3]);
+       quotas.put("wxdim5", wxDims[4]);
+       return quotas;
   }
 
   public static String[] getDimensions(){

Reply via email to