Skip to content

Commit

Permalink
fix: remove deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu committed Aug 1, 2023
1 parent 96551f4 commit 9dd1017
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,16 @@ public org.jooq.ExecuteListenerProvider jooqConfiguration(MetricRegistry metricR
return new org.jooq.ExecuteListenerProvider() {
@Override
public @NotNull ExecuteListener provide() {
return new DefaultExecuteListener() {
return new ExecuteListener() {
Long startTime;

@Override
public void executeStart(ExecuteContext ctx) {
super.executeStart(ctx);
startTime = System.currentTimeMillis();
}

@Override
public void executeEnd(ExecuteContext ctx) {
super.executeEnd(ctx);

Duration duration = Duration.ofMillis(System.currentTimeMillis() - startTime);

metricRegistry.timer(MetricRegistry.JDBC_QUERY_DURATION, "sql", ctx.sql())
Expand Down

0 comments on commit 9dd1017

Please sign in to comment.