From 5c84fa09c7d14b890a1a643de2a4612d62f212c1 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 16 Jul 2019 12:10:27 -0400 Subject: [Debugger] Log telemetry for async ops that stall out Needed for https://devdiv.visualstudio.com/DevDiv/_workitems/edit/802365/ --- .../MonoDevelop.Debugger/Counters.cs | 1 + .../MonoDevelop.Debugger/DebuggingService.cs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'main/src/addins') diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Counters.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Counters.cs index 4fed6bfbab..c8fd7030f7 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Counters.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Counters.cs @@ -35,6 +35,7 @@ namespace MonoDevelop.Debugger public static Counter EvaluationStats = InstrumentationService.CreateCounter ("Evaluation Statistics", "Debugger", id: "Debugger.EvaluationStatistics"); public static TimerCounter DebuggerStart = InstrumentationService.CreateTimerCounter ("Debugger Start", "Debugger", id: "Debugger.Start"); public static TimerCounter DebuggerAction = InstrumentationService.CreateTimerCounter ("Debugger Action", "Debugger", id: "Debugger.Action"); + public static Counter DebuggerBusy = InstrumentationService.CreateCounter ("Debugger Busy", "Debugger", id: "Debugger.Busy"); } class DebuggerStartMetadata : CounterMetadata diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs index 9e19487fc4..7f9ec70c8e 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs @@ -905,6 +905,23 @@ namespace MonoDevelop.Debugger await Runtime.RunInMainThread (delegate { busyEvaluator.UpdateBusyState (args); if (args.IsBusy) { + var session = (DebuggerSession) s; + + if (sessions.TryGetValue (session, out var manager)) { + var metadata = new Dictionary { + ["DebuggerType"] = manager.Engine.Id, + ["Debugger.AsyncOperation.Description"] = args.Description, + ["Debugger.EvaluationOptions.AllowDisplayStringEvaluation"] = args.EvaluationContext.Options.AllowDisplayStringEvaluation, + ["Debugger.EvaluationOptions.AllowMethodEvaluation"] = args.EvaluationContext.Options.AllowMethodEvaluation, + ["Debugger.EvaluationOptions.AllowTargetInvoke"] = args.EvaluationContext.Options.AllowTargetInvoke, + ["Debugger.EvaluationOptions.AllowToString"] = args.EvaluationContext.Options.AllowToStringCalls, + ["Debugger.EvaluationOptions.ChunkRawStrings"] = args.EvaluationContext.Options.ChunkRawStrings, + ["Debugger.EvaluationOptions.EvaluationTimeout"] = args.EvaluationContext.Options.EvaluationTimeout, + }; + + Counters.DebuggerBusy.Inc (1, null, metadata); + } + if (busyStatusIcon == null) { busyStatusIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (ImageService.GetIcon ("md-bug", Gtk.IconSize.Menu)); busyStatusIcon.SetAlertMode (100); -- cgit v1.2.3 From a4547b579661f7d3df238e556e2f778a838122c8 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 17 Jul 2019 10:12:08 -0400 Subject: Update main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs Co-Authored-By: Marius Ungureanu --- .../MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main/src/addins') diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs index 7f9ec70c8e..5ed2950d2e 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs @@ -914,7 +914,7 @@ namespace MonoDevelop.Debugger ["Debugger.EvaluationOptions.AllowDisplayStringEvaluation"] = args.EvaluationContext.Options.AllowDisplayStringEvaluation, ["Debugger.EvaluationOptions.AllowMethodEvaluation"] = args.EvaluationContext.Options.AllowMethodEvaluation, ["Debugger.EvaluationOptions.AllowTargetInvoke"] = args.EvaluationContext.Options.AllowTargetInvoke, - ["Debugger.EvaluationOptions.AllowToString"] = args.EvaluationContext.Options.AllowToStringCalls, + ["Debugger.EvaluationOptions.AllowToStringCalls"] = args.EvaluationContext.Options.AllowToStringCalls, ["Debugger.EvaluationOptions.ChunkRawStrings"] = args.EvaluationContext.Options.ChunkRawStrings, ["Debugger.EvaluationOptions.EvaluationTimeout"] = args.EvaluationContext.Options.EvaluationTimeout, }; @@ -1439,9 +1439,9 @@ namespace MonoDevelop.Debugger if (typeSymbol != null && (arity == 0 || arity == typeSymbol.Arity)) { return symbol; } - var namespaceSymbol = symbol as Microsoft.CodeAnalysis.INamespaceSymbol; - if (namespaceSymbol != null) { - return namespaceSymbol; + var namespaceSymbol = symbol as Microsoft.CodeAnalysis.INamespaceSymbol; + if (namespaceSymbol != null) { + return namespaceSymbol; } } return null; -- cgit v1.2.3