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

Commit

Permalink
[Android] add bigCell detail msg for analyzer on debug performance mo…
Browse files Browse the repository at this point in the history
…de (#2719)
  • Loading branch information
lucky-chen authored and YorkShen committed Jul 17, 2019
1 parent 49f0cf9 commit 1245432
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Expand Up @@ -145,8 +145,8 @@ public double getMaxRange() {
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public static final String CACHE_TYPE = "cacheType";

public static final int VIEW_LIMIT_HEIGHT = WXViewUtils.getScreenHeight() / 2;
public static final int VIEW_LIMIT_WIDTH = WXViewUtils.getScreenWidth() / 2;
public static final int VIEW_LIMIT_HEIGHT = WXViewUtils.getScreenHeight() /3*2;
public static final int VIEW_LIMIT_WIDTH = WXViewUtils.getScreenWidth() /3*2;
public static boolean TRACE_DATA = WXEnvironment.isApkDebugable();

/**
Expand Down
Expand Up @@ -75,6 +75,7 @@
import com.taobao.weex.dom.WXStyle;
import com.taobao.weex.dom.transition.WXTransition;
import com.taobao.weex.layout.ContentBoxMeasurement;
import com.taobao.weex.performance.WXAnalyzerDataTransfer;
import com.taobao.weex.performance.WXInstanceApm;
import com.taobao.weex.tracing.Stopwatch;
import com.taobao.weex.tracing.WXTracing;
Expand Down Expand Up @@ -975,6 +976,12 @@ public void setLayout(WXComponent component) {
if (this instanceof WXCell && realHeight >= WXPerformance.VIEW_LIMIT_HEIGHT && realWidth>=WXPerformance.VIEW_LIMIT_WIDTH){
mInstance.getApmForInstance().updateDiffStats(WXInstanceApm.KEY_PAGE_STATS_CELL_EXCEED_NUM,1);
mInstance.getWXPerformance().cellExceedNum++;
if (WXAnalyzerDataTransfer.isOpenPerformance){
WXAnalyzerDataTransfer.transferPerformance(getInstanceId(),"details",WXInstanceApm.KEY_PAGE_STATS_CELL_EXCEED_NUM,
String.format("cell:[w:%d,h:%d],attrs:%s,styles:%s",realWidth,realHeight,getAttrs(),getStyles())
);
}

}

mAbsoluteY = (int) (nullParent ? 0 : mParent.getAbsoluteY() + getCSSLayoutTop());
Expand Down

0 comments on commit 1245432

Please sign in to comment.