本文整理汇总了Java中com.taobao.weex.utils.WXLogUtils.renderPerformanceLog方法的典型用法代码示例。如果您正苦于以下问题:Java WXLogUtils.renderPerformanceLog方法的具体用法?Java WXLogUtils.renderPerformanceLog怎么用?Java WXLogUtils.renderPerformanceLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.taobao.weex.utils.WXLogUtils
的用法示例。
在下文中一共展示了WXLogUtils.renderPerformanceLog方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createBody
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
* create RootView ,every weex Instance View has a rootView;
* @see com.taobao.weex.dom.WXDomStatement#createBody(JSONObject)
*/
void createBody(WXComponent component) {
long start = System.currentTimeMillis();
component.createView(mGodComponent, -1);
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.renderPerformanceLog("createView", (System.currentTimeMillis() - start));
}
start = System.currentTimeMillis();
component.applyLayoutAndEvent(component);
component.bindData(component);
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.renderPerformanceLog("bind", (System.currentTimeMillis() - start));
}
if (component instanceof WXScroller) {
WXScroller scroller = (WXScroller) component;
if (scroller.getInnerView() instanceof ScrollView) {
mWXSDKInstance.setRootScrollView((ScrollView) scroller.getInnerView());
}
}
mWXSDKInstance.setRootView(mGodComponent.getRealView());
if (mWXSDKInstance.getRenderStrategy() != WXRenderStrategy.APPEND_ONCE) {
mWXSDKInstance.onViewCreated(mGodComponent);
}
}
示例2: createBody
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
* create RootView ,every weex Instance View has a rootView;
* @see com.taobao.weex.dom.WXDomStatement#createBody(JSONObject)
*/
void createBody(WXComponent component) {
long start = System.currentTimeMillis();
component.createView();
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.renderPerformanceLog("createView", (System.currentTimeMillis() - start));
}
start = System.currentTimeMillis();
component.applyLayoutAndEvent(component);
component.bindData(component);
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.renderPerformanceLog("bind", (System.currentTimeMillis() - start));
}
if (component instanceof WXScroller) {
WXScroller scroller = (WXScroller) component;
if (scroller.getInnerView() instanceof ScrollView) {
mWXSDKInstance.setRootScrollView((ScrollView) scroller.getInnerView());
}
}
mWXSDKInstance.onRootCreated(component);
if (mWXSDKInstance.getRenderStrategy() != WXRenderStrategy.APPEND_ONCE) {
mWXSDKInstance.onCreateFinish();
}
}
示例3: onRefreshSuccess
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public void onRefreshSuccess(final int width, final int height) {
WXLogUtils.renderPerformanceLog("onRefreshSuccess", (System.currentTimeMillis() - mRefreshStartTime));
if (mRenderListener != null && mContext != null) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (mRenderListener != null && mContext != null) {
mRenderListener.onRefreshSuccess(WXSDKInstance.this, width, height);
}
}
});
}
}
示例4: firstScreenRenderFinished
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public void firstScreenRenderFinished() {
mEnd = true;
mWXPerformance.screenRenderTime = System.currentTimeMillis() - mRenderStartTime;
WXLogUtils.renderPerformanceLog("firstScreenRenderFinished", mWXPerformance.screenRenderTime);
WXLogUtils.renderPerformanceLog(" firstScreenJSFExecuteTime", mWXPerformance.firstScreenJSFExecuteTime);
WXLogUtils.renderPerformanceLog(" firstScreenCallNativeTime", mWXPerformance.callNativeTime);
WXLogUtils.renderPerformanceLog(" firstScreenJsonParseTime", mWXPerformance.parseJsonTime);
WXLogUtils.renderPerformanceLog(" firstScreenBatchTime", mWXPerformance.batchTime);
WXLogUtils.renderPerformanceLog(" firstScreenCssLayoutTime", mWXPerformance.cssLayoutTime);
WXLogUtils.renderPerformanceLog(" firstScreenApplyUpdateTime", mWXPerformance.applyUpdateTime);
WXLogUtils.renderPerformanceLog(" firstScreenUpdateDomObjTime", mWXPerformance.updateDomObjTime);
}
示例5: onHttpFinish
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void onHttpFinish(WXResponse response) {
mWXPerformance.networkTime = System.currentTimeMillis() - startRequestTime;
if(response.extendParams!=null){
Object actualNetworkTime=response.extendParams.get("actualNetworkTime");
mWXPerformance.actualNetworkTime=actualNetworkTime instanceof Long?(long)actualNetworkTime:0;
WXLogUtils.renderPerformanceLog("actualNetworkTime", mWXPerformance.actualNetworkTime);
Object pureNetworkTime=response.extendParams.get("pureNetworkTime");
mWXPerformance.pureNetworkTime=pureNetworkTime instanceof Long?(long)pureNetworkTime:0;
WXLogUtils.renderPerformanceLog("pureNetworkTime", mWXPerformance.pureNetworkTime);
Object connectionType=response.extendParams.get("connectionType");
mWXPerformance.connectionType=connectionType instanceof String?(String)connectionType:"";
Object packageSpendTime=response.extendParams.get("packageSpendTime");
mWXPerformance.packageSpendTime=packageSpendTime instanceof Long ?(long)packageSpendTime:0;
Object syncTaskTime=response.extendParams.get("syncTaskTime");
mWXPerformance.syncTaskTime=syncTaskTime instanceof Long ?(long)syncTaskTime:0;
Object requestType=response.extendParams.get("requestType");
mWXPerformance.requestType=requestType instanceof String?(String)requestType:"";
}
WXLogUtils.renderPerformanceLog("networkTime", mWXPerformance.networkTime);
if (response!=null && response.originalData!=null && TextUtils.equals("200", response.statusCode)) {
String template = new String(response.originalData);
render(pageName, template, options, jsonInitData, width, height, flag);
} else if (TextUtils.equals(WXRenderErrorCode.WX_USER_INTERCEPT_ERROR, response.statusCode)) {
WXLogUtils.d("user intercept");
onRenderError(WXRenderErrorCode.WX_USER_INTERCEPT_ERROR,response.errorMsg);
} else {
onRenderError(WXRenderErrorCode.WX_NETWORK_ERROR, response.errorMsg);
}
}
示例6: initialize
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
/**
*
* @param application
* @param config initial configurations or null
*/
public static void initialize(Application application,InitConfig config){
synchronized (mLock) {
if (mIsInit) {
return;
}
long start = System.currentTimeMillis();
WXEnvironment.sSDKInitStart = start;
doInitInternal(application,config);
WXEnvironment.sSDKInitInvokeTime = System.currentTimeMillis()-start;
WXLogUtils.renderPerformanceLog("SDKInitInvokeTime", WXEnvironment.sSDKInitInvokeTime);
mIsInit = true;
}
}
示例7: firstScreenRenderFinished
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public void firstScreenRenderFinished() {
if(mEnd == true)
return;
mEnd = true;
if (mStatisticsListener != null && mContext != null) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (mStatisticsListener != null && mContext != null) {
Trace.beginSection("onFirstScreen");
mStatisticsListener.onFirstScreen();
Trace.endSection();
}
}
});
}
mWXPerformance.screenRenderTime = System.currentTimeMillis() - mRenderStartTime;
WXLogUtils.renderPerformanceLog("firstScreenRenderFinished", mWXPerformance.screenRenderTime);
WXLogUtils.renderPerformanceLog(" firstScreenJSFExecuteTime", mWXPerformance.firstScreenJSFExecuteTime);
WXLogUtils.renderPerformanceLog(" firstScreenCallNativeTime", mWXPerformance.callNativeTime);
WXLogUtils.renderPerformanceLog(" firstScreenJsonParseTime", mWXPerformance.parseJsonTime);
WXLogUtils.renderPerformanceLog(" firstScreenBatchTime", mWXPerformance.batchTime);
WXLogUtils.renderPerformanceLog(" firstScreenCssLayoutTime", mWXPerformance.cssLayoutTime);
WXLogUtils.renderPerformanceLog(" firstScreenApplyUpdateTime", mWXPerformance.applyUpdateTime);
WXLogUtils.renderPerformanceLog(" firstScreenUpdateDomObjTime", mWXPerformance.updateDomObjTime);
}
示例8: firstScreenRenderFinished
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public void firstScreenRenderFinished() {
if(mEnd == true)
return;
mEnd = true;
mWXPerformance.screenRenderTime = System.currentTimeMillis() - mRenderStartTime;
WXLogUtils.renderPerformanceLog("firstScreenRenderFinished", mWXPerformance.screenRenderTime);
WXLogUtils.renderPerformanceLog(" firstScreenJSFExecuteTime", mWXPerformance.firstScreenJSFExecuteTime);
WXLogUtils.renderPerformanceLog(" firstScreenCallNativeTime", mWXPerformance.callNativeTime);
WXLogUtils.renderPerformanceLog(" firstScreenJsonParseTime", mWXPerformance.parseJsonTime);
WXLogUtils.renderPerformanceLog(" firstScreenBatchTime", mWXPerformance.batchTime);
WXLogUtils.renderPerformanceLog(" firstScreenCssLayoutTime", mWXPerformance.cssLayoutTime);
WXLogUtils.renderPerformanceLog(" firstScreenApplyUpdateTime", mWXPerformance.applyUpdateTime);
WXLogUtils.renderPerformanceLog(" firstScreenUpdateDomObjTime", mWXPerformance.updateDomObjTime);
}
示例9: onRenderSuccess
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public void onRenderSuccess(final int width, final int height) {
long time = System.currentTimeMillis() - mRenderStartTime;
WXLogUtils.renderPerformanceLog("onRenderSuccess", time);
WXLogUtils.renderPerformanceLog(" invokeCreateInstance",mWXPerformance.communicateTime);
WXLogUtils.renderPerformanceLog(" TotalCallNativeTime", mWXPerformance.callNativeTime);
WXLogUtils.renderPerformanceLog(" TotalJsonParseTime", mWXPerformance.parseJsonTime);
WXLogUtils.renderPerformanceLog(" TotalBatchTime", mWXPerformance.batchTime);
WXLogUtils.renderPerformanceLog(" TotalCssLayoutTime", mWXPerformance.cssLayoutTime);
WXLogUtils.renderPerformanceLog(" TotalApplyUpdateTime", mWXPerformance.applyUpdateTime);
WXLogUtils.renderPerformanceLog(" TotalUpdateDomObjTime", mWXPerformance.updateDomObjTime);
mWXPerformance.totalTime = time;
if(mWXPerformance.screenRenderTime<0.001){
mWXPerformance.screenRenderTime = time;
}
mWXPerformance.componentCount = WXComponent.mComponentNum;
if(WXEnvironment.isApkDebugable()) {
WXLogUtils.d(WXLogUtils.WEEX_PERF_TAG, "mComponentNum:" + WXComponent.mComponentNum);
}
WXComponent.mComponentNum = 0;
if (mRenderListener != null && mContext != null) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (mRenderListener != null && mContext != null) {
mRenderListener.onRenderSuccess(WXSDKInstance.this, width, height);
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.d(WXLogUtils.WEEX_PERF_TAG, mWXPerformance.toString());
}
if (mUserTrackAdapter != null) {
mUserTrackAdapter.commit(mContext, null, IWXUserTrackAdapter.LOAD, mWXPerformance, null);
commitUTStab(IWXUserTrackAdapter.JS_BRIDGE,WXErrorCode.WX_SUCCESS);
}
}
}
});
}
if(!WXEnvironment.isApkDebugable()){
Log.e("weex_perf",mWXPerformance.getPerfData());
}
}
示例10: onRenderSuccess
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
public void onRenderSuccess(final int width, final int height) {
firstScreenRenderFinished();
long time = System.currentTimeMillis() - mRenderStartTime;
WXLogUtils.renderPerformanceLog("onRenderSuccess", time);
WXLogUtils.renderPerformanceLog(" invokeCreateInstance",mWXPerformance.communicateTime);
WXLogUtils.renderPerformanceLog(" TotalCallNativeTime", mWXPerformance.callNativeTime);
WXLogUtils.renderPerformanceLog(" TotalJsonParseTime", mWXPerformance.parseJsonTime);
WXLogUtils.renderPerformanceLog(" TotalBatchTime", mWXPerformance.batchTime);
WXLogUtils.renderPerformanceLog(" TotalCssLayoutTime", mWXPerformance.cssLayoutTime);
WXLogUtils.renderPerformanceLog(" TotalApplyUpdateTime", mWXPerformance.applyUpdateTime);
WXLogUtils.renderPerformanceLog(" TotalUpdateDomObjTime", mWXPerformance.updateDomObjTime);
mWXPerformance.totalTime = time;
if(mWXPerformance.screenRenderTime<0.001){
mWXPerformance.screenRenderTime = time;
}
mWXPerformance.componentCount = WXComponent.mComponentNum;
if(WXEnvironment.isApkDebugable()) {
WXLogUtils.d(WXLogUtils.WEEX_PERF_TAG, "mComponentNum:" + WXComponent.mComponentNum);
}
WXComponent.mComponentNum = 0;
if (mRenderListener != null && mContext != null) {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (mRenderListener != null && mContext != null) {
mRenderListener.onRenderSuccess(WXSDKInstance.this, width, height);
if (mUserTrackAdapter != null) {
WXPerformance performance=new WXPerformance();
performance.errCode=WXErrorCode.WX_SUCCESS.getErrorCode();
performance.args=getBundleUrl();
mUserTrackAdapter.commit(mContext,null,IWXUserTrackAdapter.JS_BRIDGE,performance,getUserTrackParams());
}
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.d(WXLogUtils.WEEX_PERF_TAG, mWXPerformance.toString());
}
}
}
});
}
if(!WXEnvironment.isApkDebugable()){
Log.e("weex_perf",mWXPerformance.getPerfData());
}
}
示例11: onHttpFinish
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void onHttpFinish(WXResponse response) {
if (this.instance != null
&& this.instance.getWXStatisticsListener() != null) {
this.instance.getWXStatisticsListener().onHttpFinish();
}
mWXPerformance.networkTime = System.currentTimeMillis() - startRequestTime;
if(response.extendParams!=null){
Object actualNetworkTime=response.extendParams.get("actualNetworkTime");
mWXPerformance.actualNetworkTime=actualNetworkTime instanceof Long?(long)actualNetworkTime:0;
WXLogUtils.renderPerformanceLog("actualNetworkTime", mWXPerformance.actualNetworkTime);
Object pureNetworkTime=response.extendParams.get("pureNetworkTime");
mWXPerformance.pureNetworkTime=pureNetworkTime instanceof Long?(long)pureNetworkTime:0;
WXLogUtils.renderPerformanceLog("pureNetworkTime", mWXPerformance.pureNetworkTime);
Object connectionType=response.extendParams.get("connectionType");
mWXPerformance.connectionType=connectionType instanceof String?(String)connectionType:"";
Object packageSpendTime=response.extendParams.get("packageSpendTime");
mWXPerformance.packageSpendTime=packageSpendTime instanceof Long ?(long)packageSpendTime:0;
Object syncTaskTime=response.extendParams.get("syncTaskTime");
mWXPerformance.syncTaskTime=syncTaskTime instanceof Long ?(long)syncTaskTime:0;
Object requestType=response.extendParams.get("requestType");
mWXPerformance.requestType=requestType instanceof String?(String)requestType:"";
if("network".equals(requestType) && mUserTrackAdapter!=null){
WXPerformance performance=new WXPerformance();
if(!TextUtils.isEmpty(mBundleUrl)){
try {
performance.args= Uri.parse(mBundleUrl).buildUpon().clearQuery().toString();
} catch (Exception e) {
performance.args=pageName;
}
}
if(!"200".equals(response.statusCode)){
performance.errCode=WXErrorCode.WX_ERR_JSBUNDLE_DOWNLOAD.getErrorCode();
performance.appendErrMsg(response.errorCode);
performance.appendErrMsg("|");
performance.appendErrMsg(response.errorMsg);
}else if("200".equals(response.statusCode) && (response.originalData==null || response.originalData.length<=0)){
performance.errCode=WXErrorCode.WX_ERR_JSBUNDLE_DOWNLOAD.getErrorCode();
performance.appendErrMsg(response.statusCode);
performance.appendErrMsg("|template is null!");
}else {
performance.errCode=WXErrorCode.WX_SUCCESS.getErrorCode();
}
if (mUserTrackAdapter != null) {
mUserTrackAdapter.commit(getContext(), null, IWXUserTrackAdapter.JS_DOWNLOAD, performance, null);
}
}
}
WXLogUtils.renderPerformanceLog("networkTime", mWXPerformance.networkTime);
if (response!=null && response.originalData!=null && TextUtils.equals("200", response.statusCode)) {
String template = new String(response.originalData);
render(pageName, template, options, jsonInitData, flag);
} else if (TextUtils.equals(WXRenderErrorCode.WX_USER_INTERCEPT_ERROR, response.statusCode)) {
WXLogUtils.d("user intercept");
onRenderError(WXRenderErrorCode.WX_USER_INTERCEPT_ERROR,response.errorMsg);
} else {
onRenderError(WXRenderErrorCode.WX_NETWORK_ERROR, response.errorMsg);
}
}
示例12: onHttpFinish
import com.taobao.weex.utils.WXLogUtils; //导入方法依赖的package包/类
@Override
public void onHttpFinish(WXResponse response) {
mWXPerformance.networkTime = System.currentTimeMillis() - startRequestTime;
if(response.extendParams!=null){
Object actualNetworkTime=response.extendParams.get("actualNetworkTime");
mWXPerformance.actualNetworkTime=actualNetworkTime instanceof Long?(long)actualNetworkTime:0;
WXLogUtils.renderPerformanceLog("actualNetworkTime", mWXPerformance.actualNetworkTime);
Object pureNetworkTime=response.extendParams.get("pureNetworkTime");
mWXPerformance.pureNetworkTime=pureNetworkTime instanceof Long?(long)pureNetworkTime:0;
WXLogUtils.renderPerformanceLog("pureNetworkTime", mWXPerformance.pureNetworkTime);
Object connectionType=response.extendParams.get("connectionType");
mWXPerformance.connectionType=connectionType instanceof String?(String)connectionType:"";
Object packageSpendTime=response.extendParams.get("packageSpendTime");
mWXPerformance.packageSpendTime=packageSpendTime instanceof Long ?(long)packageSpendTime:0;
Object syncTaskTime=response.extendParams.get("syncTaskTime");
mWXPerformance.syncTaskTime=syncTaskTime instanceof Long ?(long)syncTaskTime:0;
Object requestType=response.extendParams.get("requestType");
mWXPerformance.requestType=requestType instanceof String?(String)requestType:"";
if("network".equals(requestType) && mUserTrackAdapter!=null){
WXPerformance performance=new WXPerformance();
if(!TextUtils.isEmpty(mBundleUrl)){
try {
performance.args= Uri.parse(mBundleUrl).buildUpon().clearQuery().toString();
} catch (Exception e) {
performance.args=pageName;
}
}
if(!"200".equals(response.statusCode)){
performance.errCode=WXErrorCode.WX_ERR_JSBUNDLE_DOWNLOAD.getErrorCode();
performance.appendErrMsg(response.errorCode);
performance.appendErrMsg("|");
performance.appendErrMsg(response.errorMsg);
}else if("200".equals(response.statusCode) && (response.originalData==null || response.originalData.length<=0)){
performance.errCode=WXErrorCode.WX_ERR_JSBUNDLE_DOWNLOAD.getErrorCode();
performance.appendErrMsg(response.statusCode);
performance.appendErrMsg("|template is null!");
}else {
performance.errCode=WXErrorCode.WX_SUCCESS.getErrorCode();
}
mUserTrackAdapter.commit(getContext(),null,IWXUserTrackAdapter.JS_DOWNLOAD,performance,null);
}
}
WXLogUtils.renderPerformanceLog("networkTime", mWXPerformance.networkTime);
if (response!=null && response.originalData!=null && TextUtils.equals("200", response.statusCode)) {
String template = new String(response.originalData);
render(pageName, template, options, jsonInitData, flag);
} else if (TextUtils.equals(WXRenderErrorCode.WX_USER_INTERCEPT_ERROR, response.statusCode)) {
WXLogUtils.d("user intercept");
onRenderError(WXRenderErrorCode.WX_USER_INTERCEPT_ERROR,response.errorMsg);
} else {
onRenderError(WXRenderErrorCode.WX_NETWORK_ERROR, response.errorMsg);
}
}