Skip to content

Commit

Permalink
feat: add two decimals to object cache request time
Browse files Browse the repository at this point in the history
  • Loading branch information
carlalexander committed Sep 23, 2021
1 parent a3f08e2 commit d36c08c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ObjectCache/DynamoDbObjectCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private function getValue(string $key)
]);

++$this->requests;
$this->requestTime += (round(microtime(true) * 1000) - $start);
$this->requestTime += round((microtime(true) * 1000) - $start, 2);

if (!isset($response['Item']['value']['S']) || $this->isExpired($response['Item'])) {
return false;
Expand Down Expand Up @@ -175,7 +175,7 @@ private function getValues(array $keys): array
]);

++$this->requests;
$this->requestTime += (round(microtime(true) * 1000) - $start);
$this->requestTime += round((microtime(true) * 1000) - $start, 2);

$current = time();

Expand Down
2 changes: 1 addition & 1 deletion src/ObjectCache/RedisClusterObjectCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function getValuesFromPersistentCache($keys)
$values = is_array($keys) ? $this->getValues($keys) : $this->getValue($keys);

++$this->requests;
$this->requestTime += (round(microtime(true) * 1000) - $start);
$this->requestTime += round((microtime(true) * 1000) - $start, 2);

return $values;
}
Expand Down

0 comments on commit d36c08c

Please sign in to comment.