Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 2ee9bc6

Browse files
authored
Fix analysis_complete event name for now, send working MB for *nix platforms (microsoft#900)
Because this event is created in the analyzer, I didn't use `Telemetry.CreateEvent`, which would have appended the prefix we need. Hardcode it for now until stuff can move into Core. (I tried moving it into Core but ran into strange build issues.) Also, send the working set size as well, since *nix platforms don't seem to support paged/peak paged at all. That'll need its own fix that's more complicated.
1 parent f6ba35b commit 2ee9bc6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Analysis/Ast/Impl/Analyzer/PythonAnalyzerSession.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,21 @@ private void SendTelemetry(double elapsed, int originalRemaining, int remaining,
165165

166166
double privateMB;
167167
double peakPagedMB;
168+
double workingMB;
168169

169170
using (var proc = Process.GetCurrentProcess()) {
170171
privateMB = proc.PrivateMemorySize64 / 1e+6;
171172
peakPagedMB = proc.PeakPagedMemorySize64 / 1e+6;
173+
workingMB = proc.WorkingSet64 / 1e+6;
172174
}
173175

174176
var e = new TelemetryEvent {
175-
EventName = "analysis_complete",
177+
EventName = "python_language_server/analysis_complete", // TODO: Move this common prefix into Core.
176178
};
177179

178180
e.Measurements["privateMB"] = privateMB;
179181
e.Measurements["peakPagedMB"] = peakPagedMB;
182+
e.Measurements["workingMB"] = workingMB;
180183
e.Measurements["elapsedMs"] = elapsed;
181184
e.Measurements["entries"] = originalRemaining;
182185
e.Measurements["version"] = version;

0 commit comments

Comments
 (0)