add the additional outputs for the methods invoked

This commit is contained in:
huoyo 2022-05-23 23:06:55 +08:00
parent 6c7899ef9d
commit d408ced5be

View File

@ -43,9 +43,10 @@ public class RunTimeHandler implements MethodInterceptor {
exception.setId(exception.getClassName() + exception.getName() + exception.getMessage()); exception.setId(exception.getClassName() + exception.getName() + exception.getMessage());
MethodNode current = InvokeService.getCurrentMethodNode(invocation, 0.0); MethodNode current = InvokeService.getCurrentMethodNode(invocation, 0.0);
if (current.getClassName().equals(e.getStackTrace()[0].getClassName())) { if (current.getClassName().equals(e.getStackTrace()[0].getClassName())) {
for (InvokedHandler invokedHandler : Context.getInvokedHandlers()) { GraphService graphService = GraphService.getInstance();
pool.execute(()->invokedHandler.onInvoked(current,parent,parameters, invocation.getArguments())); graphService.addMethodNode(current);
} graphService.addExceptionNode(exception);
graphService.addExceptionRelation(current, exception);
} }
MethodStack.clear(); MethodStack.clear();
throw e; throw e;