diff options
author | Alex Auvolat <alex@adnab.me> | 2022-02-22 14:52:41 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-03-14 10:53:36 +0100 |
commit | 2a5609b292de019085f93a79b7b73f7a8341bf51 (patch) | |
tree | 7175cbeb1fc4eabcec936ccb8aee2945a92b1c60 /src/table | |
parent | 818daa5c786813fdf50fecb6022e29b18e509b62 (diff) | |
download | garage-2a5609b292de019085f93a79b7b73f7a8341bf51.tar.gz garage-2a5609b292de019085f93a79b7b73f7a8341bf51.zip |
Add metrics to API endpoint
Diffstat (limited to 'src/table')
-rw-r--r-- | src/table/table.rs | 6 |
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); |