@@ -18,7 +18,6 @@ import { detectEncoding } from './encoding';
18
18
import { Ref , RefType , Branch , Remote , ForcePushMode , GitErrorCodes , LogOptions , Change , Status , CommitOptions , BranchQuery } from './api/git' ;
19
19
import * as byline from 'byline' ;
20
20
import { StringDecoder } from 'string_decoder' ;
21
- import TelemetryReporter from '@vscode/extension-telemetry' ;
22
21
23
22
// https://github.com/microsoft/vscode/issues/65693
24
23
const MAX_CLI_LENGTH = 30000 ;
@@ -375,14 +374,11 @@ export class Git {
375
374
private _onOutput = new EventEmitter ( ) ;
376
375
get onOutput ( ) : EventEmitter { return this . _onOutput ; }
377
376
378
- private readonly telemetryReporter : TelemetryReporter ;
379
-
380
- constructor ( options : IGitOptions , telemetryReporter : TelemetryReporter ) {
377
+ constructor ( options : IGitOptions ) {
381
378
this . path = options . gitPath ;
382
379
this . version = options . version ;
383
380
this . userAgent = options . userAgent ;
384
381
this . env = options . env || { } ;
385
- this . telemetryReporter = telemetryReporter ;
386
382
387
383
const onConfigurationChanged = ( e ?: ConfigurationChangeEvent ) => {
388
384
if ( e !== undefined && ! e . affectsConfiguration ( 'git.commandsToLog' ) ) {
@@ -563,9 +559,7 @@ export class Git {
563
559
}
564
560
565
561
private async _exec ( args : string [ ] , options : SpawnOptions = { } ) : Promise < IExecutionResult < string > > {
566
- const startSpawn = Date . now ( ) ;
567
562
const child = this . spawn ( args , options ) ;
568
- const durSpawn = Date . now ( ) - startSpawn ;
569
563
570
564
options . onSpawn ?.( child ) ;
571
565
@@ -592,16 +586,6 @@ export class Git {
592
586
}
593
587
}
594
588
595
- /* __GDPR__
596
- "git.execDuration" : {
597
- "owner": "lszomoru",
598
- "comment": "Time it takes to spawn and execute a git command",
599
- "durSpawn": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth","isMeasurement": true, "comment": "Time it took to run spawn git" },
600
- "durExec": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth","isMeasurement": true, "comment": "Time git took" }
601
- }
602
- */
603
- this . telemetryReporter . sendTelemetryEvent ( 'git.execDuration' , undefined , { durSpawn, durExec } ) ;
604
-
605
589
let encoding = options . encoding || 'utf8' ;
606
590
encoding = iconv . encodingExists ( encoding ) ? encoding : 'utf8' ;
607
591
0 commit comments