use of io.micrometer.core.annotation.TimedSet in project micrometer by micrometer-metrics.
the class TimedFinder method findTimedAnnotations.
Set<Timed> findTimedAnnotations(AnnotatedElement element) {
Timed t = annotationFinder.findAnnotation(element, Timed.class);
if (t != null)
return Collections.singleton(t);
TimedSet ts = annotationFinder.findAnnotation(element, TimedSet.class);
if (ts != null) {
return Arrays.stream(ts.value()).collect(Collectors.toSet());
}
return Collections.emptySet();
}
use of io.micrometer.core.annotation.TimedSet in project micrometer by micrometer-metrics.
the class TimedUtils method findTimedAnnotations.
public static Set<Timed> findTimedAnnotations(AnnotatedElement element) {
Timed t = AnnotationUtils.findAnnotation(element, Timed.class);
// noinspection ConstantConditions
if (t != null)
return Collections.singleton(t);
TimedSet ts = AnnotationUtils.findAnnotation(element, TimedSet.class);
if (ts != null) {
return Arrays.stream(ts.value()).collect(Collectors.toSet());
}
return Collections.emptySet();
}