@@ -25,6 +25,7 @@ import { scheduleAction } from "./utils/scheduler";
2525import { showWelcomeWebview , WelcomeViewSerializer } from "./welcome" ;
2626
2727let cleanJavaWorkspaceIndicator : string ;
28+ let activatedTimestamp : number ;
2829
2930export async function activate ( context : vscode . ExtensionContext ) {
3031 syncState ( context ) ;
@@ -45,6 +46,7 @@ async function initializeExtension(_operationId: string, context: vscode.Extensi
4546 if ( context . storageUri ) {
4647 const javaWorkspaceStoragePath = path . join ( context . storageUri . fsPath , ".." , "redhat.java" ) ;
4748 cleanJavaWorkspaceIndicator = path . join ( javaWorkspaceStoragePath , "jdt_ws" , ".cleanWorkspace" ) ;
49+ activatedTimestamp = Date . now ( ) ;
4850 }
4951
5052 context . subscriptions . push ( vscode . languages . registerCodeActionsProvider ( { scheme : "file" , language : "java" , pattern : "**/*.java" } , new CodeActionProvider ( ) ) ) ;
@@ -99,9 +101,12 @@ function initializeTelemetry(_context: vscode.ExtensionContext) {
99101
100102export async function deactivate ( ) {
101103 if ( cleanJavaWorkspaceIndicator && fs . existsSync ( cleanJavaWorkspaceIndicator ) ) {
104+ const now = Date . now ( ) ;
105+
102106 sendInfo ( "" , {
103107 name : "cleanJavaLSWorkspace" ,
104- timestamp : Date . now ( ) . toString ( )
108+ timestamp : now . toString ( ) ,
109+ time : now - activatedTimestamp
105110 } ) ;
106111 }
107112 await disposeTelemetryWrapper ( ) ;
0 commit comments