From 8990b1260902cc753c0990ecbc9a5ca4decae0c6 Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Sat, 11 Jun 2022 10:21:05 -0500 Subject: [PATCH] docs: Readability fixes in `src/analytics/.rs` files Signed-off-by: Ryan Russell --- meilisearch-http/src/analytics/mod.rs | 2 +- meilisearch-http/src/analytics/segment_analytics.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meilisearch-http/src/analytics/mod.rs b/meilisearch-http/src/analytics/mod.rs index 1d37a053d..b51f306a9 100644 --- a/meilisearch-http/src/analytics/mod.rs +++ b/meilisearch-http/src/analytics/mod.rs @@ -61,7 +61,7 @@ pub trait Analytics: Sync + Send { /// The method used to publish most analytics that do not need to be batched every hours fn publish(&self, event_name: String, send: Value, request: Option<&HttpRequest>); - /// This method should be called to aggergate a get search + /// This method should be called to aggregate a get search fn get_search(&self, aggregate: SearchAggregator); /// This method should be called to aggregate a post search diff --git a/meilisearch-http/src/analytics/segment_analytics.rs b/meilisearch-http/src/analytics/segment_analytics.rs index 562b99c16..1007a242a 100644 --- a/meilisearch-http/src/analytics/segment_analytics.rs +++ b/meilisearch-http/src/analytics/segment_analytics.rs @@ -495,7 +495,7 @@ impl SearchAggregator { let percentile_99th = 0.99 * (self.total_succeeded as f64 - 1.) + 1.; // we get all the values in a sorted manner let time_spent = self.time_spent.into_sorted_vec(); - // We are only intersted by the slowest value of the 99th fastest results + // We are only interested by the slowest value of the 99th fastest results let time_spent = time_spent.get(percentile_99th as usize); let properties = json!({ @@ -574,8 +574,8 @@ impl DocumentsAggregator { let content_type = request .headers() .get(CONTENT_TYPE) - .map(|s| s.to_str().unwrap_or("unkown")) - .unwrap_or("unkown") + .map(|s| s.to_str().unwrap_or("unknown")) + .unwrap_or("unknown") .to_string(); ret.content_types.insert(content_type); ret.index_creation = index_creation;