io.quarkus.micrometer.runtime.binder.vertx.EventTiming Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-micrometer Show documentation
Show all versions of quarkus-micrometer Show documentation
Instrument the runtime and your application with dimensional metrics using Micrometer.
package io.quarkus.micrometer.runtime.binder.vertx;
import java.util.concurrent.TimeUnit;
import io.micrometer.core.instrument.Timer;
public class EventTiming {
private final long nanoStart;
private final Timer timer;
public EventTiming(Timer timer) {
this.timer = timer;
this.nanoStart = System.nanoTime();
}
public long end() {
long amount = System.nanoTime() - nanoStart;
if (timer != null) {
timer.record(amount, TimeUnit.NANOSECONDS);
}
return amount;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy