@Test public void testTraceException() { ClusterNode clusterNode = new ClusterNode(); Exception exception = new RuntimeException("test"); clusterNode.trace(exception, 0); clusterNode.trace(exception, -1); assertEquals(0, clusterNode.exceptionQps(), 0.01); assertEquals(0, clusterNode.totalException()); clusterNode.trace(exception, 1); assertEquals(1, clusterNode.exceptionQps(), 0.01); assertEquals(1, clusterNode.totalException()); FlowException flowException = new FlowException("flow"); clusterNode.trace(flowException, 1); assertEquals(1, clusterNode.exceptionQps(), 0.01); assertEquals(1, clusterNode.totalException()); }
public void trace(Throwable throwable, int count) { if (count <= 0) { return; } if (!BlockException.isBlockException(throwable)) { this.increaseExceptionQps(count); } }
ClusterNode extends StatisticNode { public void trace(Throwable throwable, int count) { if (count <= 0) { return; } if (!BlockException.isBlockException(throwable)) { this.increaseExceptionQps(count); } } }
ClusterNode extends StatisticNode { public void trace(Throwable throwable, int count) { if (count <= 0) { return; } if (!BlockException.isBlockException(throwable)) { this.increaseExceptionQps(count); } }  }
ClusterNode extends StatisticNode { public void trace(Throwable throwable, int count) { if (count <= 0) { return; } if (!BlockException.isBlockException(throwable)) { this.increaseExceptionQps(count); } }  Node getOrCreateOriginNode(String origin); synchronized Map<String, StatisticNode> getOriginCountMap(); void trace(Throwable throwable, int count); }
ClusterNode extends StatisticNode { public void trace(Throwable throwable, int count) { if (count <= 0) { return; } if (!BlockException.isBlockException(throwable)) { this.increaseExceptionQps(count); } }  Node getOrCreateOriginNode(String origin); synchronized Map<String, StatisticNode> getOriginCountMap(); void trace(Throwable throwable, int count);  }