@@ -27,7 +27,6 @@ use crate::{
27
27
mem_docs:: MemDocs ,
28
28
op_queue:: OpQueue ,
29
29
reload:: SourceRootConfig ,
30
- request_metrics:: { LatestRequests , RequestMetrics } ,
31
30
thread_pool:: TaskPool ,
32
31
to_proto:: url_from_abs_path,
33
32
Result ,
@@ -105,16 +104,13 @@ pub(crate) struct GlobalState {
105
104
OpQueue < ( Arc < Vec < ProjectWorkspace > > , Vec < anyhow:: Result < WorkspaceBuildScripts > > ) > ,
106
105
107
106
pub ( crate ) prime_caches_queue : OpQueue < ( ) > ,
108
-
109
- latest_requests : Arc < RwLock < LatestRequests > > ,
110
107
}
111
108
112
109
/// An immutable snapshot of the world's state at a point in time.
113
110
pub ( crate ) struct GlobalStateSnapshot {
114
111
pub ( crate ) config : Arc < Config > ,
115
112
pub ( crate ) analysis : Analysis ,
116
113
pub ( crate ) check_fixes : CheckFixes ,
117
- pub ( crate ) latest_requests : Arc < RwLock < LatestRequests > > ,
118
114
mem_docs : MemDocs ,
119
115
pub ( crate ) semantic_tokens_cache : Arc < Mutex < FxHashMap < Url , SemanticTokens > > > ,
120
116
vfs : Arc < RwLock < ( vfs:: Vfs , FxHashMap < FileId , LineEndings > ) > > ,
@@ -169,7 +165,6 @@ impl GlobalState {
169
165
prime_caches_queue : OpQueue :: default ( ) ,
170
166
171
167
fetch_build_data_queue : OpQueue :: default ( ) ,
172
- latest_requests : Default :: default ( ) ,
173
168
} ;
174
169
// Apply any required database inputs from the config.
175
170
this. update_configuration ( config) ;
@@ -230,7 +225,6 @@ impl GlobalState {
230
225
workspaces : Arc :: clone ( & self . workspaces ) ,
231
226
analysis : self . analysis_host . analysis ( ) ,
232
227
vfs : Arc :: clone ( & self . vfs ) ,
233
- latest_requests : Arc :: clone ( & self . latest_requests ) ,
234
228
check_fixes : Arc :: clone ( & self . diagnostics . check_fixes ) ,
235
229
mem_docs : self . mem_docs . clone ( ) ,
236
230
semantic_tokens_cache : Arc :: clone ( & self . semantic_tokens_cache ) ,
@@ -270,9 +264,7 @@ impl GlobalState {
270
264
pub ( crate ) fn respond ( & mut self , response : lsp_server:: Response ) {
271
265
if let Some ( ( method, start) ) = self . req_queue . incoming . complete ( response. id . clone ( ) ) {
272
266
let duration = start. elapsed ( ) ;
273
- log:: info!( "handled req#{} in {:?}" , response. id, duration) ;
274
- let metrics = RequestMetrics { id : response. id . clone ( ) , method, duration } ;
275
- self . latest_requests . write ( ) . record ( metrics) ;
267
+ log:: info!( "handled {} - ({}) in {:0.2?}" , method, response. id, duration) ;
276
268
self . send ( response. into ( ) ) ;
277
269
}
278
270
}
0 commit comments