Skip to content

Commit 74de7c5

Browse files
authored
Merge pull request #28 from utopia-php/use-time-metric
2 parents b7d8dd0 + 986b136 commit 74de7c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Pools/Pool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ public function use(callable $callback): mixed
229229
$connection = $this->pop();
230230
return $callback($connection->getResource());
231231
} finally {
232+
$this->telemetryUseDuration->record(microtime(true) - $start, $this->telemetryAttributes);
232233
if ($connection !== null) {
233-
$this->telemetryUseDuration->record(microtime(true) - $start, $this->telemetryAttributes);
234234
$this->reclaim($connection);
235235
}
236236
}

0 commit comments

Comments
 (0)