增加测试节点深度
This commit is contained in:
parent
01b4ae5ca5
commit
14ec88c327
|
|
@ -2,16 +2,20 @@ package com.ai.cloud.skywalking.plugin.spring.common;
|
|||
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainA {
|
||||
private CallChainB callChainB;
|
||||
private CallChainD callChainD;
|
||||
private CallChainF callChainF;
|
||||
|
||||
@Tracing
|
||||
public void doBusiness() {
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
callChainB.doBusiness();
|
||||
callChainD.doBusiness();
|
||||
callChainF.doBusiness();
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
}
|
||||
|
||||
public CallChainB getCallChainB() {
|
||||
|
|
|
|||
|
|
@ -2,13 +2,17 @@ package com.ai.cloud.skywalking.plugin.spring.common;
|
|||
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainB {
|
||||
|
||||
private CallChainC callChainC;
|
||||
|
||||
@Tracing
|
||||
public void doBusiness() {
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
callChainC.doBusiness();
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
}
|
||||
|
||||
public CallChainC getCallChainC() {
|
||||
|
|
|
|||
|
|
@ -2,13 +2,17 @@ package com.ai.cloud.skywalking.plugin.spring.common;
|
|||
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainC {
|
||||
|
||||
private CallChainE callChainE;
|
||||
|
||||
@Tracing
|
||||
public void doBusiness() {
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
callChainE.doBusiness();
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
}
|
||||
|
||||
public CallChainE getCallChainE() {
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@ package com.ai.cloud.skywalking.plugin.spring.common;
|
|||
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainD {
|
||||
|
||||
@Tracing
|
||||
public void doBusiness() {
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
//System.out.println("three");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,27 @@
|
|||
package com.ai.cloud.skywalking.plugin.spring.common;
|
||||
|
||||
import com.ai.cloud.skywalking.api.BusinessKeyAppender;
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainE {
|
||||
|
||||
private CallChainG callChainG;
|
||||
|
||||
@Tracing
|
||||
public void doBusiness() {
|
||||
// System.out.println("I'm here");
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
BusinessKeyAppender.trace("key-value");
|
||||
callChainG.doBusiness();
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
}
|
||||
|
||||
public CallChainG getCallChainG() {
|
||||
return callChainG;
|
||||
}
|
||||
|
||||
public void setCallChainG(CallChainG callChainG) {
|
||||
this.callChainG = callChainG;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@ package com.ai.cloud.skywalking.plugin.spring.common;
|
|||
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainF {
|
||||
|
||||
@Tracing
|
||||
public void doBusiness() {
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
//System.out.println("me too");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
package com.ai.cloud.skywalking.plugin.spring.common;
|
||||
|
||||
import com.ai.cloud.skywalking.api.BusinessKeyAppender;
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainG {
|
||||
|
||||
private CallChainH callChainH;
|
||||
|
||||
@Tracing
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
BusinessKeyAppender.trace("key-value");
|
||||
callChainH.doBusiness();
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
|
||||
}
|
||||
|
||||
public CallChainH getCallChainH() {
|
||||
return callChainH;
|
||||
}
|
||||
|
||||
public void setCallChainH(CallChainH callChainH) {
|
||||
this.callChainH = callChainH;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.ai.cloud.skywalking.plugin.spring.common;
|
||||
|
||||
import com.ai.cloud.skywalking.api.BusinessKeyAppender;
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainH {
|
||||
|
||||
private CallChainI callChainI;
|
||||
|
||||
@Tracing
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
BusinessKeyAppender.trace("key-value");
|
||||
callChainI.doBusiness();
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
|
||||
}
|
||||
|
||||
public CallChainI getCallChainI() {
|
||||
return callChainI;
|
||||
}
|
||||
|
||||
public void setCallChainI(CallChainI callChainI) {
|
||||
this.callChainI = callChainI;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.ai.cloud.skywalking.plugin.spring.common;
|
||||
|
||||
import com.ai.cloud.skywalking.api.BusinessKeyAppender;
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainI {
|
||||
private CallChainJ callChainJ;
|
||||
|
||||
@Tracing
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
BusinessKeyAppender.trace("key-value");
|
||||
callChainJ.doBusiness();
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
|
||||
}
|
||||
|
||||
public CallChainJ getCallChainJ() {
|
||||
return callChainJ;
|
||||
}
|
||||
|
||||
public void setCallChainJ(CallChainJ callChainJ) {
|
||||
this.callChainJ = callChainJ;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.ai.cloud.skywalking.plugin.spring.common;
|
||||
|
||||
import com.ai.cloud.skywalking.api.BusinessKeyAppender;
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainJ {
|
||||
private CallChainK callChainK;
|
||||
@Tracing
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
BusinessKeyAppender.trace("key-value");
|
||||
callChainK.doBusiness();
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
|
||||
}
|
||||
|
||||
public CallChainK getCallChainK() {
|
||||
return callChainK;
|
||||
}
|
||||
|
||||
public void setCallChainK(CallChainK callChainK) {
|
||||
this.callChainK = callChainK;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.ai.cloud.skywalking.plugin.spring.common;
|
||||
|
||||
import com.ai.cloud.skywalking.api.BusinessKeyAppender;
|
||||
import com.ai.cloud.skywalking.plugin.spring.Tracing;
|
||||
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class CallChainK {
|
||||
@Tracing
|
||||
public void doBusiness() throws InterruptedException {
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
BusinessKeyAppender.trace("key-value");
|
||||
Thread.sleep(ThreadLocalRandom.current().nextInt(10));
|
||||
}
|
||||
}
|
||||
|
|
@ -31,15 +31,18 @@ public class TestBuriedPoint extends Thread {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
while (true) {
|
||||
for (int i = 0 ; i < 1; i++) {
|
||||
try {
|
||||
Thread.sleep(2L);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
callChainA.doBusiness();
|
||||
try {
|
||||
callChainA.doBusiness();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println(Thread.currentThread().getName() + "\t" + atomicInteger.incrementAndGet());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,23 @@
|
|||
<bean id="postProcess1"
|
||||
class="com.ai.cloud.skywalking.plugin.spring.TracingEnhanceProcessor">
|
||||
</bean>
|
||||
<bean id="callChainE" class="com.ai.cloud.skywalking.plugin.spring.common.CallChainE"/>
|
||||
<bean id="callChainK" class="com.ai.cloud.skywalking.plugin.spring.common.CallChainK"/>
|
||||
<bean id="callChainJ" class="com.ai.cloud.skywalking.plugin.spring.common.CallChainJ">
|
||||
<property name="callChainK" ref="callChainK"/>
|
||||
</bean>
|
||||
<bean id="callChainI" class="com.ai.cloud.skywalking.plugin.spring.common.CallChainI">
|
||||
<property name="callChainJ" ref="callChainJ"/>
|
||||
</bean>
|
||||
<bean id="callChainH" class="com.ai.cloud.skywalking.plugin.spring.common.CallChainH">
|
||||
<property name="callChainI" ref="callChainI"/>
|
||||
</bean>
|
||||
|
||||
<bean id="callChainG" class="com.ai.cloud.skywalking.plugin.spring.common.CallChainG">
|
||||
<property name="callChainH" ref="callChainH"/>
|
||||
</bean>
|
||||
<bean id="callChainE" class="com.ai.cloud.skywalking.plugin.spring.common.CallChainE">
|
||||
<property name="callChainG" ref="callChainG"/>
|
||||
</bean>
|
||||
<bean id="callChainF" class="com.ai.cloud.skywalking.plugin.spring.common.CallChainF"/>
|
||||
<bean id="callChainC" class="com.ai.cloud.skywalking.plugin.spring.common.CallChainC">
|
||||
<property name="callChainE" ref="callChainE"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue