can you please help
--
You received this message because you are subscribed to the Google Groups "Byte Buddy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to byte-buddy+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I followed this and some other your answers in SO . I used following code for java agent .
public static void premain(String arguments, Instrumentation instrumentation) {
System.out.println("Premain");
new AgentBuilder.Default()
.type(ElementMatchers.nameEndsWith("Timed"))
.transform((builder, type, classLoader, module) ->
builder.method(ElementMatchers.any())
.intercept(MethodDelegation.to(MonitorInterceptor.class))
).installOn(instrumentation);
}
This is my MonitorInspector
public class MonitorInterceptor {
@RuntimeType
public static Object intercept(@Origin Method method,
@SuperCall Callable<?> callable) throws Exception {
long start = System.currentTimeMillis();
try {
return callable.call();
} finally {
System.out.println(method + " took " + (System.currentTimeMillis() - start));
}
}
}
But this not gives the printout of time it only provide following output .
Premain
Main Class
Can you give me an idea what is the problem ,that no giving the output from MonitorInspector ?
Found solution from https://github.com/raphw/byte-buddy/issues/257
Thanks!!
--
You received this message because you are subscribed to the Google Groups "Byte Buddy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to byte-buddy+unsubscribe@googlegroups.com.