aboutsummaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-02-22 14:52:41 +0100
committerAlex Auvolat <alex@adnab.me>2022-03-14 10:53:36 +0100
commit2a5609b292de019085f93a79b7b73f7a8341bf51 (patch)
tree7175cbeb1fc4eabcec936ccb8aee2945a92b1c60 /src/table
parent818daa5c786813fdf50fecb6022e29b18e509b62 (diff)
downloadgarage-2a5609b292de019085f93a79b7b73f7a8341bf51.tar.gz
garage-2a5609b292de019085f93a79b7b73f7a8341bf51.zip
Add metrics to API endpoint
Diffstat (limited to 'src/table')
-rw-r--r--src/table/table.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/table/table.rs b/src/table/table.rs
index 9ba243c0..69cac41a 100644
--- a/src/table/table.rs
+++ b/src/table/table.rs
@@ -161,7 +161,8 @@ where
partition_key: &F::P,
sort_key: &F::S,
) -> Result<Option<F::E>, Error> {
- let res = self.get_internal(partition_key, sort_key)
+ let res = self
+ .get_internal(partition_key, sort_key)
.bound_record_duration(&self.data.metrics.get_request_duration)
.await?;
self.data.metrics.get_request_counter.add(1);
@@ -232,7 +233,8 @@ where
filter: Option<F::Filter>,
limit: usize,
) -> Result<Vec<F::E>, Error> {
- let res = self.get_range_internal(partition_key, begin_sort_key, filter, limit)
+ let res = self
+ .get_range_internal(partition_key, begin_sort_key, filter, limit)
.bound_record_duration(&self.data.metrics.get_request_duration)
.await?;
self.data.metrics.get_request_counter.add(1);