2943: Re-sync queries for memory usage measurnment r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-01-29 15:11:38 +00:00 committed by GitHub
commit d92a15c163
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 21 deletions

View file

@ -1,20 +1,24 @@
//! FIXME: write short doc here //! FIXME: write short doc here
pub use hir_def::db::{ pub use hir_def::db::{
BodyQuery, BodyWithSourceMapQuery, ComputeCrateDefMapQuery, ConstDataQuery, AttrsQuery, BodyQuery, BodyWithSourceMapQuery, ComputeCrateDefMapQuery, ConstDataQuery,
CrateLangItemsQuery, DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, CrateLangItemsQuery, DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery,
ExprScopesQuery, FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase, ExprScopesQuery, FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternConstQuery,
InternDatabaseStorage, LangItemQuery, ModuleLangItemsQuery, RawItemsQuery, StaticDataQuery, InternDatabase, InternDatabaseStorage, InternEnumQuery, InternFunctionQuery, InternImplQuery,
StructDataQuery, TraitDataQuery, TypeAliasDataQuery, InternStaticQuery, InternStructQuery, InternTraitQuery, InternTypeAliasQuery, InternUnionQuery,
LangItemQuery, ModuleLangItemsQuery, RawItemsQuery, StaticDataQuery, StructDataQuery,
TraitDataQuery, TypeAliasDataQuery, UnionDataQuery,
}; };
pub use hir_expand::db::{ pub use hir_expand::db::{
AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery, AstDatabase, AstDatabaseStorage, AstIdMapQuery, InternMacroQuery, MacroArgQuery, MacroDefQuery,
ParseMacroQuery, MacroExpandQuery, ParseMacroQuery,
}; };
pub use hir_ty::db::{ pub use hir_ty::db::{
AssociatedTyDataQuery, CallableItemSignatureQuery, DoInferQuery, FieldTypesQuery, AssociatedTyDataQuery, AssociatedTyValueQuery, CallableItemSignatureQuery, DoInferQuery,
GenericDefaultsQuery, GenericPredicatesQuery, HirDatabase, HirDatabaseStorage, ImplDatumQuery, FieldTypesQuery, GenericDefaultsQuery, GenericPredicatesForParamQuery, GenericPredicatesQuery,
ImplsForTraitQuery, ImplsInCrateQuery, StructDatumQuery, TraitDatumQuery, TraitSolveQuery, HirDatabase, HirDatabaseStorage, ImplDatumQuery, ImplSelfTyQuery, ImplTraitQuery,
ImplsForTraitQuery, ImplsInCrateQuery, InternAssocTyValueQuery, InternChalkImplQuery,
InternTypeCtorQuery, StructDatumQuery, TraitDatumQuery, TraitSolveQuery, TraitSolverQuery,
TyQuery, ValueTyQuery, TyQuery, ValueTyQuery,
}; };

View file

@ -301,45 +301,74 @@ impl RootDatabase {
)*} )*}
} }
sweep_each_query![ sweep_each_query![
// SourceDatabase
ra_db::ParseQuery ra_db::ParseQuery
ra_db::SourceRootCratesQuery ra_db::SourceRootCratesQuery
// AstDatabase
hir::db::AstIdMapQuery hir::db::AstIdMapQuery
hir::db::ParseMacroQuery hir::db::InternMacroQuery
hir::db::MacroDefQuery
hir::db::MacroArgQuery hir::db::MacroArgQuery
hir::db::MacroDefQuery
hir::db::ParseMacroQuery
hir::db::MacroExpandQuery hir::db::MacroExpandQuery
hir::db::StructDataQuery
hir::db::EnumDataQuery // DefDatabase
hir::db::TraitDataQuery
hir::db::RawItemsQuery hir::db::RawItemsQuery
hir::db::ComputeCrateDefMapQuery hir::db::ComputeCrateDefMapQuery
hir::db::GenericParamsQuery hir::db::StructDataQuery
hir::db::FunctionDataQuery hir::db::UnionDataQuery
hir::db::EnumDataQuery
hir::db::ImplDataQuery
hir::db::TraitDataQuery
hir::db::TypeAliasDataQuery hir::db::TypeAliasDataQuery
hir::db::FunctionDataQuery
hir::db::ConstDataQuery hir::db::ConstDataQuery
hir::db::StaticDataQuery hir::db::StaticDataQuery
hir::db::BodyWithSourceMapQuery
hir::db::BodyQuery
hir::db::ExprScopesQuery
hir::db::GenericParamsQuery
hir::db::AttrsQuery
hir::db::ModuleLangItemsQuery hir::db::ModuleLangItemsQuery
hir::db::CrateLangItemsQuery hir::db::CrateLangItemsQuery
hir::db::LangItemQuery hir::db::LangItemQuery
hir::db::DocumentationQuery hir::db::DocumentationQuery
hir::db::ExprScopesQuery
// InternDatabase
hir::db::InternFunctionQuery
hir::db::InternStructQuery
hir::db::InternUnionQuery
hir::db::InternEnumQuery
hir::db::InternConstQuery
hir::db::InternStaticQuery
hir::db::InternTraitQuery
hir::db::InternTypeAliasQuery
hir::db::InternImplQuery
// HirDatabase
hir::db::DoInferQuery hir::db::DoInferQuery
hir::db::TyQuery hir::db::TyQuery
hir::db::ValueTyQuery hir::db::ValueTyQuery
hir::db::ImplSelfTyQuery
hir::db::ImplTraitQuery
hir::db::FieldTypesQuery hir::db::FieldTypesQuery
hir::db::CallableItemSignatureQuery hir::db::CallableItemSignatureQuery
hir::db::GenericPredicatesForParamQuery
hir::db::GenericPredicatesQuery hir::db::GenericPredicatesQuery
hir::db::GenericDefaultsQuery hir::db::GenericDefaultsQuery
hir::db::BodyWithSourceMapQuery
hir::db::BodyQuery
hir::db::ImplsInCrateQuery hir::db::ImplsInCrateQuery
hir::db::ImplsForTraitQuery hir::db::ImplsForTraitQuery
hir::db::TraitSolverQuery
hir::db::InternTypeCtorQuery
hir::db::InternChalkImplQuery
hir::db::InternAssocTyValueQuery
hir::db::AssociatedTyDataQuery hir::db::AssociatedTyDataQuery
hir::db::AssociatedTyValueQuery
hir::db::TraitSolveQuery
hir::db::TraitDatumQuery hir::db::TraitDatumQuery
hir::db::StructDatumQuery hir::db::StructDatumQuery
hir::db::ImplDatumQuery hir::db::ImplDatumQuery
hir::db::ImplDataQuery
hir::db::TraitSolveQuery
]; ];
acc.sort_by_key(|it| std::cmp::Reverse(it.1)); acc.sort_by_key(|it| std::cmp::Reverse(it.1));
acc acc