Skip to content
Snippets Groups Projects
Commit a365d212 authored by Tobias Bruns's avatar Tobias Bruns
Browse files

add timing metric for loading vorgangs

parent 8de88cf6
Branches
Tags
1 merge request!28List performance check
......@@ -61,6 +61,11 @@
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<!-- TEST -->
<dependency>
<groupId>org.springframework.security</groupId>
......
......@@ -42,6 +42,9 @@ import org.springframework.security.authentication.AuthenticationTrustResolver;
import org.springframework.security.authentication.AuthenticationTrustResolverImpl;
import org.springframework.security.concurrent.DelegatingSecurityContextRunnable;
import io.micrometer.core.aop.TimedAspect;
import io.micrometer.core.instrument.MeterRegistry;
@SpringBootApplication(scanBasePackages = { "de.ozgcloud" })
@EnableAsync(proxyTargetClass = true)
@EnableScheduling
......@@ -83,4 +86,9 @@ public class VorgangManagerServerApplication {
return eventMulticaster;
}
@Bean
TimedAspect timedAspect(MeterRegistry registry) {
return new TimedAspect(registry);
}
}
\ No newline at end of file
......@@ -34,6 +34,7 @@ import org.springframework.stereotype.Service;
import de.ozgcloud.common.errorhandling.TechnicalException;
import de.ozgcloud.vorgang.common.search.SearchService;
import io.micrometer.core.annotation.Timed;
@Service
class VorgangHeaderService {
......@@ -47,6 +48,7 @@ class VorgangHeaderService {
@Autowired(required = false)
private SearchService searchService;
@Timed("findAllVorgangs")
public Page<VorgangHeader> findAll(FindVorgangRequest request) {
if (nonNull(searchService) && nonNull(request.getSearchBy())) {
return removeUnpermitted(searchService.find(request));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment