diff --git a/core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java b/core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java index dcd655a0213..7bda4dcce83 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java +++ b/core/src/main/java/com/taobao/arthas/core/command/monitor200/WatchAdviceListener.java @@ -1,9 +1,9 @@ package com.taobao.arthas.core.command.monitor200; -import com.taobao.arthas.core.advisor.ReflectAdviceListenerAdapter; -import com.taobao.arthas.core.shell.command.CommandProcess; import com.taobao.arthas.core.advisor.Advice; import com.taobao.arthas.core.advisor.ArthasMethod; +import com.taobao.arthas.core.advisor.ReflectAdviceListenerAdapter; +import com.taobao.arthas.core.shell.command.CommandProcess; import com.taobao.arthas.core.util.DateUtils; import com.taobao.arthas.core.util.LogUtil; import com.taobao.arthas.core.util.StringUtils; @@ -11,9 +11,6 @@ import com.taobao.arthas.core.view.ObjectView; import com.taobao.middleware.logger.Logger; -import java.text.SimpleDateFormat; -import java.util.Date; - /** * @author beiwei30 on 29/11/2016. */ @@ -85,7 +82,7 @@ private void watching(Advice advice) { Object value = getExpressionResult(command.getExpress(), advice, cost); String result = StringUtils.objectToString( isNeedExpand() ? new ObjectView(value, command.getExpand(), command.getSizeLimit()).draw() : value); - process.write("ts=" + DateUtils.getCurrentDate() + ";result=" + result + "\n"); + process.write("ts=" + DateUtils.getCurrentDate() + "; [cost=" + cost + "ms] result=" + result + "\n"); process.times().incrementAndGet(); if (isLimitExceeded(command.getNumberOfLimit(), process.times().get())) { abortProcess(process, command.getNumberOfLimit());