Don't collect process starttime as it's not being used on consolehost startup (#10294)

* mark _readyForInputTimeInMS member as part of LEGACYTELEMETRY
* move _interactiveCommandCount to LEGACYTELEMETRY
This commit is contained in:
Steve Lee
2019-08-06 08:55:16 +05:00
committed by Ilya
parent 7034c8ba55
commit 3ca5a1bdb0
@@ -1023,11 +1023,12 @@ namespace Microsoft.PowerShell
double IHostProvidesTelemetryData.ReadyForInputTimeInMS { get { return _readyForInputTimeInMS; } }
int IHostProvidesTelemetryData.InteractiveCommandCount { get { return _interactiveCommandCount; } }
private double _readyForInputTimeInMS;
private int _interactiveCommandCount;
#endif
private double _profileLoadTimeInMS;
private double _readyForInputTimeInMS;
private int _interactiveCommandCount;
#endregion overrides
@@ -1602,8 +1603,10 @@ namespace Microsoft.PowerShell
PSTask.PowershellConsoleStartup, PSKeyword.UseAlwaysOperational);
}
#if LEGACYTELEMETRY
// Record how long it took from process start to runspace open for telemetry.
_readyForInputTimeInMS = (DateTime.Now - Process.GetCurrentProcess().StartTime).TotalMilliseconds;
#endif
DoRunspaceInitialization(skipProfiles, initialCommand, configurationName, initialCommandArgs);
}
@@ -2517,8 +2520,10 @@ namespace Microsoft.PowerShell
}
}
#if LEGACYTELEMETRY
if (!inBlockMode)
s_theConsoleHost._interactiveCommandCount += 1;
#endif
}
}
// NTRAID#Windows Out Of Band Releases-915506-2005/09/09