@@ -326,74 +326,63 @@ export function sendLSPUsageStats() {
326326
327327class HybridLSPStats {
328328 private lspStats : LSPUsageStats ; // standard lsp stats
329- private ssLspStats : LSPUsageStats | undefined ; // syntax server lsp stats
329+ private ssLspStats : LSPUsageStats ; // syntax server lsp stats
330330
331331 public constructor ( readonly javaExtVersion : string , readonly sampling : string ) {
332332 this . lspStats = new LSPUsageStats ( javaExtVersion , sampling , false ) ;
333- // TODO:
334- // These pre-release versions include the fromSyntaxServer property in the requestEnd event,
335- // but not in the requestStart event. Once these pre-release versions are no longer used,
336- // it's safe to remove the following pre-release check logic.
337- const ignoreVersions = [
338- "1.24.2023100604" ,
339- "1.24.2023100504" ,
340- "1.24.2023100404" ,
341- ] ;
342- if ( sampling !== "pre-release" || ! ignoreVersions . includes ( javaExtVersion ) ) {
343- this . ssLspStats = new LSPUsageStats ( javaExtVersion , sampling , true ) ;
344- }
333+ this . ssLspStats = new LSPUsageStats ( javaExtVersion , sampling , true ) ;
345334 }
346335
347336 public recordRequestStart ( type : string , fromSyntaxServer ?: boolean ) {
348- if ( this . ssLspStats && fromSyntaxServer ) {
337+ if ( fromSyntaxServer ) {
349338 this . ssLspStats . recordRequestStart ( type ) ;
350339 } else {
351340 this . lspStats . recordRequestStart ( type ) ;
352341 }
353342 }
354343
355344 public recordRequestEnd ( type : string , fromSyntaxServer ?: boolean ) {
356- if ( this . ssLspStats && fromSyntaxServer ) {
345+ if ( fromSyntaxServer ) {
357346 this . ssLspStats . recordRequestEnd ( type ) ;
358347 } else {
359348 this . lspStats . recordRequestEnd ( type ) ;
360349 }
361350 }
362351
363352 public recordDuration ( type : string , duration : number , fromSyntaxServer ?: boolean ) {
364- if ( this . ssLspStats && fromSyntaxServer ) {
353+ if ( fromSyntaxServer ) {
365354 this . ssLspStats . recordDuration ( type , duration ) ;
366355 } else {
367356 this . lspStats . recordDuration ( type , duration ) ;
368357 }
369358 }
370359
371360 public record1STimeoutRequest ( type : string , fromSyntaxServer ?: boolean ) {
372- if ( this . ssLspStats && fromSyntaxServer ) {
361+ if ( fromSyntaxServer ) {
373362 this . ssLspStats . record1STimeoutRequest ( type ) ;
374363 } else {
375364 this . lspStats . record1STimeoutRequest ( type ) ;
376365 }
377366 }
378367
379368 public record5STimeoutRequest ( type : string , fromSyntaxServer ?: boolean ) {
380- if ( this . ssLspStats && fromSyntaxServer ) {
369+ if ( fromSyntaxServer ) {
381370 this . ssLspStats . record5STimeoutRequest ( type ) ;
382371 } else {
383372 this . lspStats . record5STimeoutRequest ( type ) ;
384373 }
385374 }
386375
387376 public recordErrorRequest ( type : string , fromSyntaxServer ?: boolean ) {
388- if ( this . ssLspStats && fromSyntaxServer ) {
377+ if ( fromSyntaxServer ) {
389378 this . ssLspStats . recordErrorRequest ( type ) ;
390379 } else {
391380 this . lspStats . recordErrorRequest ( type ) ;
392381 }
393382 }
394383
395384 public recordNoResultRequest ( type : string , fromSyntaxServer ?: boolean ) {
396- if ( this . ssLspStats && fromSyntaxServer ) {
385+ if ( fromSyntaxServer ) {
397386 this . ssLspStats . recordNoResultRequest ( type ) ;
398387 } else {
399388 this . lspStats . recordNoResultRequest ( type ) ;
0 commit comments