PerformanceMonitoringAspect { @Around("@within(idolService)") public Object monitorServiceMethodPerformance(final ProceedingJoinPoint joinPoint, final IdolService idolService) throws Throwable { final String metricName = metricType + SERVICE_METRIC_NAME_PREFIX + sanitiseMetricNameComponent(joinPoint.getSignature().getDeclaringTypeName()) + CLASS_METHOD_SEPARATOR + sanitiseMetricNameComponent(joinPoint.getSignature().getName()); return monitorMethodPerformance(joinPoint, sanitiseMetricName(metricName)); } @Autowired  PerformanceMonitoringAspect(final GaugeService gaugeService,
                                       @Value(FIND_METRICS_TYPE_PROPERTY) final String metricType); @Around("@within(idolService)") Object monitorServiceMethodPerformance(final ProceedingJoinPoint joinPoint, final IdolService idolService); @Around(value = "execution(* com.autonomy.aci.client.transport.AciHttpClient.executeAction(..)) && args(serverDetails, parameters)", argNames = "joinPoint,serverDetails,parameters") Object monitorIdolRequestPerformance(
            final ProceedingJoinPoint joinPoint,
            final AciServerDetails serverDetails,
            final Collection<? extends AciParameter> parameters);  }
@Test public void monitorServiceMethodPerformance() { testService.testMethod(); final String expectedMetricName = metricType + SERVICE_METRIC_NAME_PREFIX + "com_hp_autonomy_frontend_find_idol_metrics_PerformanceMonitoringAspectTest$TestService" + CLASS_METHOD_SEPARATOR + "testMethod"; verify(gaugeService).submit(eq(expectedMetricName), anyDouble()); }