diff --git a/src/macosx/classes/com/alibaba/wisp/engine/WispCounter.java b/src/macosx/classes/com/alibaba/wisp/engine/WispCounter.java index 0975f673773484378f4e1eec88d918d2983a5c9e..10fde1f02e9f8a859e4ee202dc5fa33e94af0408 100644 --- a/src/macosx/classes/com/alibaba/wisp/engine/WispCounter.java +++ b/src/macosx/classes/com/alibaba/wisp/engine/WispCounter.java @@ -23,4 +23,63 @@ package com.alibaba.wisp.engine; final public class WispCounter { + public long getCompletedTaskCount() { + return 0; + } + + public long getTotalEnqueueTime() { + return 0; + } + + public long getEnqueueCount() { + return 0; + } + + public long getTotalExecutionTime() { + return 0; + } + + public long getExecutionCount() { + return 0; + } + + public long getTotalWaitSocketIOTime() { + return 0; + } + + public long getWaitSocketIOCount() { + return 0; + } + + public long getTotalBlockingTime() { + return 0; + } + + public long getUnparkCount() { + return 0; + } + + public long getMaxEnqueueTime() { + return 0; + } + + public long getMaxExecutionTime() { + return 0; + } + + public long getMaxWaitSocketIOTime() { + return 0; + } + + public long getMaxBlockingTime() { + return 0; + } + + public long getTaskQueueLength() { + return 0; + } + + public long getRunningTaskCount() { + return 0; + } } diff --git a/src/macosx/classes/com/alibaba/wisp/engine/WispCounterMXBeanImpl.java b/src/macosx/classes/com/alibaba/wisp/engine/WispCounterMXBeanImpl.java index 6438cc340fa97601eec5dfe5b8bbb484889b4104..0939a1409b7459041947b1f6f85f0e60598316a3 100644 --- a/src/macosx/classes/com/alibaba/wisp/engine/WispCounterMXBeanImpl.java +++ b/src/macosx/classes/com/alibaba/wisp/engine/WispCounterMXBeanImpl.java @@ -22,12 +22,15 @@ package com.alibaba.wisp.engine; import com.alibaba.management.WispCounterMXBean; +import sun.management.Util; import javax.management.ObjectName; import java.util.List; public class WispCounterMXBeanImpl implements WispCounterMXBean { + private final static String WISP_COUNTER_MXBEAN_NAME = "com.alibaba.management:type=WispCounter"; + @Override public List getRunningStates() { throw new UnsupportedOperationException(); @@ -145,6 +148,6 @@ public class WispCounterMXBeanImpl implements WispCounterMXBean { @Override public ObjectName getObjectName() { - throw new UnsupportedOperationException(); + return Util.newObjectName(WISP_COUNTER_MXBEAN_NAME); } } diff --git a/src/windows/classes/com/alibaba/wisp/engine/WispCounter.java b/src/windows/classes/com/alibaba/wisp/engine/WispCounter.java index 0975f673773484378f4e1eec88d918d2983a5c9e..10fde1f02e9f8a859e4ee202dc5fa33e94af0408 100644 --- a/src/windows/classes/com/alibaba/wisp/engine/WispCounter.java +++ b/src/windows/classes/com/alibaba/wisp/engine/WispCounter.java @@ -23,4 +23,63 @@ package com.alibaba.wisp.engine; final public class WispCounter { + public long getCompletedTaskCount() { + return 0; + } + + public long getTotalEnqueueTime() { + return 0; + } + + public long getEnqueueCount() { + return 0; + } + + public long getTotalExecutionTime() { + return 0; + } + + public long getExecutionCount() { + return 0; + } + + public long getTotalWaitSocketIOTime() { + return 0; + } + + public long getWaitSocketIOCount() { + return 0; + } + + public long getTotalBlockingTime() { + return 0; + } + + public long getUnparkCount() { + return 0; + } + + public long getMaxEnqueueTime() { + return 0; + } + + public long getMaxExecutionTime() { + return 0; + } + + public long getMaxWaitSocketIOTime() { + return 0; + } + + public long getMaxBlockingTime() { + return 0; + } + + public long getTaskQueueLength() { + return 0; + } + + public long getRunningTaskCount() { + return 0; + } } diff --git a/src/windows/classes/com/alibaba/wisp/engine/WispCounterMXBeanImpl.java b/src/windows/classes/com/alibaba/wisp/engine/WispCounterMXBeanImpl.java index 6438cc340fa97601eec5dfe5b8bbb484889b4104..0939a1409b7459041947b1f6f85f0e60598316a3 100644 --- a/src/windows/classes/com/alibaba/wisp/engine/WispCounterMXBeanImpl.java +++ b/src/windows/classes/com/alibaba/wisp/engine/WispCounterMXBeanImpl.java @@ -22,12 +22,15 @@ package com.alibaba.wisp.engine; import com.alibaba.management.WispCounterMXBean; +import sun.management.Util; import javax.management.ObjectName; import java.util.List; public class WispCounterMXBeanImpl implements WispCounterMXBean { + private final static String WISP_COUNTER_MXBEAN_NAME = "com.alibaba.management:type=WispCounter"; + @Override public List getRunningStates() { throw new UnsupportedOperationException(); @@ -145,6 +148,6 @@ public class WispCounterMXBeanImpl implements WispCounterMXBean { @Override public ObjectName getObjectName() { - throw new UnsupportedOperationException(); + return Util.newObjectName(WISP_COUNTER_MXBEAN_NAME); } }