mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
more stats
This commit is contained in:
parent
8d68b76ba0
commit
046ae1d361
2 changed files with 133 additions and 36 deletions
|
@ -23,6 +23,7 @@ use std::{
|
|||
cmp::Ordering,
|
||||
hash::{Hash, Hasher},
|
||||
sync::Arc,
|
||||
mem,
|
||||
};
|
||||
|
||||
use fst::{self, Streamer};
|
||||
|
@ -136,6 +137,14 @@ impl SymbolIndex {
|
|||
self.symbols.len()
|
||||
}
|
||||
|
||||
pub(crate) fn fst_size(&self) -> usize {
|
||||
self.map.as_fst().size()
|
||||
}
|
||||
|
||||
pub(crate) fn symbols_size(&self) -> usize {
|
||||
self.symbols.len() * mem::size_of::<FileSymbol>()
|
||||
}
|
||||
|
||||
pub(crate) fn for_files(
|
||||
files: impl ParallelIterator<Item = (FileId, TreeArc<SourceFile>)>,
|
||||
) -> SymbolIndex {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue