2023-05-22 19:12:05 +02:00
|
|
|
package it.cavallium.dbengine.database.disk;
|
|
|
|
|
|
|
|
import io.micrometer.core.instrument.Counter;
|
2023-10-02 19:51:28 +02:00
|
|
|
import io.micrometer.core.instrument.Meter.Id;
|
|
|
|
import io.micrometer.core.instrument.Meter.Type;
|
|
|
|
import io.micrometer.core.instrument.Tags;
|
2023-05-22 19:12:05 +02:00
|
|
|
import io.micrometer.core.instrument.Timer;
|
2023-10-02 19:51:28 +02:00
|
|
|
import io.micrometer.core.instrument.noop.NoopCounter;
|
|
|
|
import io.micrometer.core.instrument.noop.NoopTimer;
|
2023-05-22 19:12:05 +02:00
|
|
|
|
|
|
|
public record IteratorMetrics(Counter startedIterSeek, Counter endedIterSeek, Timer iterSeekTime,
|
2023-10-02 19:51:28 +02:00
|
|
|
Counter startedIterNext, Counter endedIterNext, Timer iterNextTime) {
|
|
|
|
|
|
|
|
public static final IteratorMetrics NO_OP = new IteratorMetrics(
|
|
|
|
new NoopCounter(new Id("no-op", Tags.empty(), null, null, Type.COUNTER)),
|
|
|
|
new NoopCounter(new Id("no-op", Tags.empty(), null, null, Type.COUNTER)),
|
|
|
|
new NoopTimer(new Id("no-op", Tags.empty(), null, null, Type.TIMER)),
|
|
|
|
new NoopCounter(new Id("no-op", Tags.empty(), null, null, Type.COUNTER)),
|
|
|
|
new NoopCounter(new Id("no-op", Tags.empty(), null, null, Type.COUNTER)),
|
|
|
|
new NoopTimer(new Id("no-op", Tags.empty(), null, null, Type.TIMER))
|
|
|
|
);
|
|
|
|
}
|