@@ -25,6 +25,7 @@ import { scheduleAction } from "./utils/scheduler";
25
25
import { showWelcomeWebview , WelcomeViewSerializer } from "./welcome" ;
26
26
27
27
let cleanJavaWorkspaceIndicator : string ;
28
+ let activatedTimestamp : number ;
28
29
29
30
export async function activate ( context : vscode . ExtensionContext ) {
30
31
syncState ( context ) ;
@@ -45,6 +46,7 @@ async function initializeExtension(_operationId: string, context: vscode.Extensi
45
46
if ( context . storageUri ) {
46
47
const javaWorkspaceStoragePath = path . join ( context . storageUri . fsPath , ".." , "redhat.java" ) ;
47
48
cleanJavaWorkspaceIndicator = path . join ( javaWorkspaceStoragePath , "jdt_ws" , ".cleanWorkspace" ) ;
49
+ activatedTimestamp = Date . now ( ) ;
48
50
}
49
51
50
52
context . subscriptions . push ( vscode . languages . registerCodeActionsProvider ( { scheme : "file" , language : "java" , pattern : "**/*.java" } , new CodeActionProvider ( ) ) ) ;
@@ -99,9 +101,12 @@ function initializeTelemetry(_context: vscode.ExtensionContext) {
99
101
100
102
export async function deactivate ( ) {
101
103
if ( cleanJavaWorkspaceIndicator && fs . existsSync ( cleanJavaWorkspaceIndicator ) ) {
104
+ const now = Date . now ( ) ;
105
+
102
106
sendInfo ( "" , {
103
107
name : "cleanJavaLSWorkspace" ,
104
- timestamp : Date . now ( ) . toString ( )
108
+ timestamp : now . toString ( ) ,
109
+ time : now - activatedTimestamp
105
110
} ) ;
106
111
}
107
112
await disposeTelemetryWrapper ( ) ;
0 commit comments