Skip to content

Commit

Permalink
chore: logs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-prusov committed Oct 29, 2024
1 parent 220c14d commit 456db55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/includes_depot.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
use crate::file_depot::FileDepot;
use crate::utils::Symbol;
use crate::{info, log_message};
use std::collections::HashMap;
use std::collections::HashSet;
use std::sync::{Arc, Mutex};
use tower_lsp::lsp_types::{MessageType, Range, Url};
use tower_lsp::lsp_types::{Range, Url};

#[cfg(test)]
use crate::{info, log_message};
#[cfg(test)]
use tower_lsp::lsp_types::MessageType;

#[derive(Eq, Hash, PartialEq, Clone)]
struct Define {
Expand Down Expand Up @@ -38,7 +42,6 @@ impl Data {
fn find_define(&self, uri: &Url, name: &str) -> Option<Symbol> {
let mut visited = HashSet::new();
let mut to_visit = vec![uri.clone()];
info!("find_define: {uri}, {name}");

let v = self.fd.get_component(uri);
for f in &v {
Expand All @@ -54,7 +57,6 @@ impl Data {
}) {
return Some(Symbol::new(uri.clone(), x.0));
}
info!("... not found in {uri}");
visited.insert(uri);
}

Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use config::Config;
use logger::log_message;
use logger::Logger;
use std::collections::HashMap;
use std::time::Instant;
use tokio::runtime::Handle;
use tower_lsp::jsonrpc::Error;
use tower_lsp::jsonrpc::Result;
Expand Down Expand Up @@ -108,7 +109,10 @@ impl LanguageServer for Backend {
info!("server initialized!");
#[cfg(feature = "walkdir")]
if self.config.full_scan {
let start = Instant::now();
self.data.full_scan().await;
let end = start.elapsed();
info!("Full scan completed in {}s", end.as_secs());
}
}

Expand Down

0 comments on commit 456db55

Please sign in to comment.