Exemplo n.º 1
0
        public static void LogAnalyzerCrashCount(DiagnosticAnalyzer analyzer, Exception ex, LogAggregator logAggregator, ProjectId projectId)
        {
            if (logAggregator == null || analyzer == null || ex == null || ex is OperationCanceledException)
            {
                return;
            }

            // TODO: once we create description manager, pass that into here.
            bool telemetry = DiagnosticAnalyzerLogger.AllowsTelemetry(null, analyzer, projectId);
            var tuple = ValueTuple.Create(telemetry, analyzer.GetType(), ex.GetType());
            logAggregator.IncreaseCount(tuple);
        }
Exemplo n.º 2
0
 internal static void LogTypeImportCompletionTimeout() =>
 s_logAggregator.IncreaseCount((int)ActionInfo.TypeImportCompletionTimeoutCount);
Exemplo n.º 3
0
        public static void LogProcessProject(LogAggregator logAggregator, Guid projectId, bool processed)
        {
            if (processed)
            {
                logAggregator.IncreaseCount(ProcessProject);
            }
            else
            {
                logAggregator.IncreaseCount(ProcessProjectCancellation);
            }

            logAggregator.IncreaseCount(ValueTuple.Create(ProcessProject, projectId));
        }
Exemplo n.º 4
0
        public static void LogProcessDocument(LogAggregator logAggregator, Guid documentId, bool processed)
        {
            if (processed)
            {
                logAggregator.IncreaseCount(ProcessDocument);
            }
            else
            {
                logAggregator.IncreaseCount(ProcessDocumentCancellation);
            }

            logAggregator.IncreaseCount(ValueTuple.Create(ProcessDocument, documentId));
        }
Exemplo n.º 5
0
 public static void LogProcessOpenDocument(LogAggregator logAggregator, Guid documentId)
 {
     logAggregator.IncreaseCount(OpenDocument);
     logAggregator.IncreaseCount(ValueTuple.Create(OpenDocument, documentId));
 }
Exemplo n.º 6
0
 public static void LogHigherPriority(LogAggregator logAggregator, Guid documentId)
 {
     logAggregator.IncreaseCount(HigherPriority);
     logAggregator.IncreaseCount(ValueTuple.Create(HigherPriority, documentId));
 }
Exemplo n.º 7
0
 public static void LogWorkItemEnqueue(LogAggregator logAggregator, ProjectId projectId)
 {
     logAggregator.IncreaseCount(ProjectEnqueue);
 }
Exemplo n.º 8
0
 public static void LogGlobalOperation(LogAggregator logAggregator)
 {
     logAggregator.IncreaseCount(GlobalOperation);
 }
Exemplo n.º 9
0
 public static void LogProcessProjectNotExist(LogAggregator logAggregator)
 {
     logAggregator.IncreaseCount(ProjectNotExist);
 }
Exemplo n.º 10
0
 public static void LogProcessDocumentNotExist(LogAggregator logAggregator)
 {
     logAggregator.IncreaseCount(DocumentNotExist);
 }
 internal static void LogSessionWithTypeImportCompletionEnabled() =>
 s_logAggregator.IncreaseCount((int)ActionInfo.SessionWithTypeImportCompletionEnabled);
Exemplo n.º 12
0
 internal static void LogTypeImportCompletionCacheMiss() =>
 s_logAggregator.IncreaseCount((int)ActionInfo.TypeImportCompletionCacheMissCount);
Exemplo n.º 13
0
 internal static void LogCommitWithTargetTypeCompletionExperimentEnabled() =>
 s_logAggregator.IncreaseCount((int)ActionInfo.CommitWithTargetTypeCompletionExperimentEnabled);
Exemplo n.º 14
0
 public static void UseExistingPartialProjectState()
 {
     s_logAggregator.IncreaseCount(nameof(UseExistingPartialProjectState));
 }
Exemplo n.º 15
0
 public static void LogWorkspaceEvent(LogAggregator logAggregator, int kind)
 => logAggregator.IncreaseCount(kind);
Exemplo n.º 16
0
 public static void LogWorkspaceEvent(LogAggregator logAggregator, int kind)
 {
     logAggregator.IncreaseCount(kind);
 }
Exemplo n.º 17
0
 public static void LogGlobalOperation(LogAggregator logAggregator)
 => logAggregator.IncreaseCount(GlobalOperation);
Exemplo n.º 18
0
 public static void LogActiveFileEnqueue(LogAggregator logAggregator)
 {
     logAggregator.IncreaseCount(ActiveFileEnqueue);
 }
Exemplo n.º 19
0
 public static void LogActiveFileEnqueue(LogAggregator logAggregator)
 => logAggregator.IncreaseCount(ActiveFileEnqueue);
Exemplo n.º 20
0
        public static void LogWorkItemEnqueue(
            LogAggregator logAggregator, string language, DocumentId documentId, InvocationReasons reasons, bool lowPriority, SyntaxPath activeMember, bool added)
        {
            logAggregator.IncreaseCount(language);
            logAggregator.IncreaseCount(added ? NewWorkItem : UpdateWorkItem);

            if (documentId != null)
            {
                logAggregator.IncreaseCount(activeMember == null ? TopLevel : MemberLevel);

                if (lowPriority)
                {
                    logAggregator.IncreaseCount(LowerPriority);
                    logAggregator.IncreaseCount(ValueTuple.Create(LowerPriority, documentId.Id));
                }
            }

            foreach (var reason in reasons)
            {
                logAggregator.IncreaseCount(reason);
            }
        }
Exemplo n.º 21
0
 public static void LogWorkItemEnqueue(LogAggregator logAggregator, ProjectId _)
 => logAggregator.IncreaseCount(ProjectEnqueue);
Exemplo n.º 22
0
 public static void LogResetStates(LogAggregator logAggregator)
 {
     logAggregator.IncreaseCount(ResetStates);
 }
Exemplo n.º 23
0
 public static void LogHigherPriority(LogAggregator logAggregator, Guid documentId)
 {
     logAggregator.IncreaseCount(HigherPriority);
     logAggregator.IncreaseCount(ValueTuple.Create(HigherPriority, documentId));
 }
Exemplo n.º 24
0
 public static void LogProcessActiveFileDocument(LogAggregator logAggregator, Guid documentId, bool processed)
 {
     if (processed)
     {
         logAggregator.IncreaseCount(ActiveFileProcessDocument);
     }
     else
     {
         logAggregator.IncreaseCount(ActiveFileProcessDocumentCancellation);
     }
 }
Exemplo n.º 25
0
 public static void LogResetStates(LogAggregator logAggregator)
 => logAggregator.IncreaseCount(ResetStates);
Exemplo n.º 26
0
 public static void LogProcessDocumentNotExist(LogAggregator logAggregator)
 {
     logAggregator.IncreaseCount(DocumentNotExist);
 }
Exemplo n.º 27
0
 public static void LogProcessCloseDocument(LogAggregator logAggregator, Guid documentId)
 {
     logAggregator.IncreaseCount(CloseDocument);
     logAggregator.IncreaseCount(ValueTuple.Create(CloseDocument, documentId));
 }
Exemplo n.º 28
0
 public static void LogProcessProjectNotExist(LogAggregator logAggregator)
 {
     logAggregator.IncreaseCount(ProjectNotExist);
 }
 internal static void LogChangeSignatureDialogLaunched() =>
 s_logAggregator.IncreaseCount((int)ActionInfo.ChangeSignatureDialogLaunched);