ValidationUtils.assertTrue(joinPoint.getSignature() instanceof MethodSignature,
"@MonitoredWork signature must be a method");
final WorkMonitor workMonitor = ((IWorkMonitorProvider) joinPoint.getTarget()).getWorkMonitor();
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
MonitoredWork annotation = signature.getMethod().getAnnotation(MonitoredWork.class);
final String workName = annotation != null && !annotation.value().isEmpty() ? annotation.value() : signature.getName();
long start = System.currentTimeMillis();
try {
Object ret = joinPoint.proceed();
workMonitor.recordWorkOk(workName, System.currentTimeMillis() - start);