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

[Android] add bigCell detail msg for analyzer on debug performance mode #2719

Merged
merged 1 commit into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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