提交 e6775635 编写于 作者: H heejaechang

call data type specific API for VS telemetry

VS telemetry now has data type specific APIs that can be used to reprot various data type to server. once used, data can be manipulated better by reporting side. (changeset 1410375)
上级 afaec75e
......@@ -33,20 +33,20 @@ internal static class RenameLogMessage
{
return KeyValueLogMessage.Create(m =>
{
m[RenameInComments] = optionSet.GetOption(RenameOptions.RenameInComments).ToString();
m[RenameInStrings] = optionSet.GetOption(RenameOptions.RenameInStrings).ToString();
m[RenameOverloads] = optionSet.GetOption(RenameOptions.RenameOverloads).ToString();
m[RenameInComments] = optionSet.GetOption(RenameOptions.RenameInComments);
m[RenameInStrings] = optionSet.GetOption(RenameOptions.RenameInStrings);
m[RenameOverloads] = optionSet.GetOption(RenameOptions.RenameOverloads);
m[Committed] = ((outcome & UserActionOutcome.Committed) == UserActionOutcome.Committed).ToString();
m[Canceled] = ((outcome & UserActionOutcome.Canceled) == UserActionOutcome.Canceled).ToString();
m[Committed] = (outcome & UserActionOutcome.Committed) == UserActionOutcome.Committed;
m[Canceled] = (outcome & UserActionOutcome.Canceled) == UserActionOutcome.Canceled;
m[ConflictResolutionFinishedComputing] = conflictResolutionFinishedComputing.ToString();
m[PreviewChanges] = previewChanges.ToString();
m[ConflictResolutionFinishedComputing] = conflictResolutionFinishedComputing;
m[PreviewChanges] = previewChanges;
m[RenamedIdentifiersWithoutConflicts] = replacementKinds.Count(r => r == InlineRenameReplacementKind.NoConflict).ToString();
m[ResolvableReferenceConflicts] = replacementKinds.Count(r => r == InlineRenameReplacementKind.ResolvedReferenceConflict).ToString();
m[ResolvableNonReferenceConflicts] = replacementKinds.Count(r => r == InlineRenameReplacementKind.ResolvedNonReferenceConflict).ToString();
m[UnresolvableConflicts] = replacementKinds.Count(r => r == InlineRenameReplacementKind.UnresolvedConflict).ToString();
m[RenamedIdentifiersWithoutConflicts] = replacementKinds.Count(r => r == InlineRenameReplacementKind.NoConflict);
m[ResolvableReferenceConflicts] = replacementKinds.Count(r => r == InlineRenameReplacementKind.ResolvedReferenceConflict);
m[ResolvableNonReferenceConflicts] = replacementKinds.Count(r => r == InlineRenameReplacementKind.ResolvedNonReferenceConflict);
m[UnresolvableConflicts] = replacementKinds.Count(r => r == InlineRenameReplacementKind.UnresolvedConflict);
});
}
......
......@@ -34,7 +34,7 @@ public static void LogWorkspaceAnalyzers(ImmutableArray<AnalyzerReference> analy
{
Logger.Log(FunctionId.DiagnosticAnalyzerService_Analyzers, KeyValueLogMessage.Create(m =>
{
m[AnalyzerCount] = analyzers.Length.ToString();
m[AnalyzerCount] = analyzers.Length;
}));
}
......@@ -64,13 +64,13 @@ public static void LogAnalyzerCrashCountSummary(int correlationId, LogAggregator
{
var key = (ValueTuple<bool, Type, Type>)analyzerCrash.Key;
bool telemetry = key.Item1;
m[Id] = correlationId.ToString();
m[Id] = correlationId;
// we log analyzer name and exception as it is, if telemetry is allowed
if (telemetry)
{
m[AnalyzerName] = key.Item2.FullName;
m[AnalyzerCrashCount] = analyzerCrash.Value.GetCount().ToString();
m[AnalyzerCrashCount] = analyzerCrash.Value.GetCount();
m[AnalyzerException] = key.Item3.FullName;
}
else
......@@ -79,7 +79,7 @@ public static void LogAnalyzerCrashCountSummary(int correlationId, LogAggregator
string exceptionName = key.Item3.FullName;
m[AnalyzerHashCode] = ComputeSha256Hash(analyzerName);
m[AnalyzerCrashCount] = analyzerCrash.Value.GetCount().ToString();
m[AnalyzerCrashCount] = analyzerCrash.Value.GetCount();
m[AnalyzerExceptionHashCode] = ComputeSha256Hash(exceptionName);
}
}));
......@@ -107,25 +107,25 @@ public static void LogAnalyzerTypeCountSummary(int correlationId, DiagnosticLogA
{
Logger.Log(FunctionId.DiagnosticAnalyzerDriver_AnalyzerTypeCount, KeyValueLogMessage.Create(m =>
{
m[Id] = correlationId.ToString();
m[Id] = correlationId;
var ai = kvp.Value;
bool hasTelemetry = ai.Telemetry;
var analyzerInfo = kvp.Value;
bool hasTelemetry = analyzerInfo.Telemetry;
// we log analyzer name as it is, if telemetry is allowed
if (hasTelemetry)
{
m[AnalyzerName] = ai.CLRType.FullName;
m[AnalyzerName] = analyzerInfo.CLRType.FullName;
}
else
{
// if it is from third party, we use hashcode
m[AnalyzerHashCode] = ComputeSha256Hash(ai.CLRType.FullName);
m[AnalyzerHashCode] = ComputeSha256Hash(analyzerInfo.CLRType.FullName);
}
for (var i = 0; i < ai.Counts.Length; i++)
for (var i = 0; i < analyzerInfo.Counts.Length; i++)
{
m[DiagnosticLogAggregator.AnalyzerTypes[i]] = ai.Counts[i].ToString();
m[DiagnosticLogAggregator.AnalyzerTypes[i]] = analyzerInfo.Counts[i];
}
}));
}
......
......@@ -112,19 +112,19 @@ internal ImmutableArray<DiagnosticDescriptor> GetDiagnosticDescriptors(Diagnosti
{
descriptors = analyzer.SupportedDiagnostics;
}
catch when(ShouldHandleAnalyzer(analyzer))
catch when (ShouldHandleAnalyzer(analyzer))
{
// If the SupportedDiagnostics throws an exception, then we don't want to run the analyzer.
descriptors = ImmutableArray<DiagnosticDescriptor>.Empty;
}
_diagnosticMap.Add(analyzer, descriptors);
}
}
return descriptors;
}
return descriptors;
}
public static bool ShouldHandleAnalyzer(DiagnosticAnalyzer analyzer)
{
return !(analyzer is IBuiltInAnalyzer || analyzer is DocumentDiagnosticAnalyzer || analyzer is ProjectDiagnosticAnalyzer);
......
......@@ -268,7 +268,7 @@ public static DiagnosticData Create(Project project, Diagnostic diagnostic)
diagnostic.DefaultSeverity,
diagnostic.Descriptor.IsEnabledByDefault,
diagnostic.WarningLevel,
diagnostic.Descriptor.CustomTags.AsImmutableOrEmpty(),
diagnostic.CustomTags.AsImmutableOrEmpty(),
project.Solution.Workspace,
project.Id,
title: diagnostic.Descriptor.Title.ToString(CultureInfo.CurrentUICulture),
......@@ -304,7 +304,7 @@ public static DiagnosticData Create(Document document, Diagnostic diagnostic)
diagnostic.DefaultSeverity,
diagnostic.Descriptor.IsEnabledByDefault,
diagnostic.WarningLevel,
diagnostic.Descriptor.CustomTags.AsImmutableOrEmpty(),
diagnostic.CustomTags.AsImmutableOrEmpty(),
document.Project.Solution.Workspace,
document.Project.Id,
document.Id,
......
......@@ -22,7 +22,7 @@ internal static class DiagnosticLogger
{
m[From] = from;
m[Id] = telemetry ? id : id.GetHashCode().ToString();
m[HasDescription] = description.ToString();
m[HasDescription] = description;
m[Uri] = telemetry ? uri : uri.GetHashCode().ToString();
}));
}
......
......@@ -79,7 +79,7 @@ public override void RemoveProject(ProjectId projectId)
private void ReportCount()
{
var sourceSymbolCount = _symbolCountByProjectMap.Sum(kv => kv.Value).ToString();
var sourceSymbolCount = _symbolCountByProjectMap.Sum(kv => kv.Value);
Logger.Log(FunctionId.Run_Environment, KeyValueLogMessage.Create(m => m["SourceSymbolCount"] = sourceSymbolCount));
// we only report it once
......
......@@ -54,7 +54,7 @@ public static void LogRegistration(int correlationId, Workspace workspace)
{
Logger.Log(FunctionId.WorkCoordinatorRegistrationService_Register, KeyValueLogMessage.Create(m =>
{
m[Id] = correlationId.ToString();
m[Id] = correlationId;
m[Kind] = workspace.Kind;
}));
}
......@@ -63,7 +63,7 @@ public static void LogUnregistration(int correlationId)
{
Logger.Log(FunctionId.WorkCoordinatorRegistrationService_Unregister, KeyValueLogMessage.Create(m =>
{
m[Id] = correlationId.ToString();
m[Id] = correlationId;
}));
}
......@@ -71,9 +71,9 @@ public static void LogReanalyze(int correlationId, IIncrementalAnalyzer analyzer
{
Logger.Log(FunctionId.WorkCoordinatorRegistrationService_Reanalyze, KeyValueLogMessage.Create(m =>
{
m[Id] = correlationId.ToString();
m[Id] = correlationId;
m[Analyzer] = analyzer.ToString();
m[DocumentCount] = documentIds == null ? "0" : documentIds.Count().ToString();
m[DocumentCount] = documentIds == null ? 0 : documentIds.Count();
}));
}
......@@ -81,8 +81,8 @@ public static void LogOptionChanged(int correlationId, bool value)
{
Logger.Log(FunctionId.WorkCoordinator_SolutionCrawlerOption, KeyValueLogMessage.Create(m =>
{
m[Id] = correlationId.ToString();
m[Enabled] = value.ToString();
m[Id] = correlationId;
m[Enabled] = value;
}));
}
......@@ -111,15 +111,15 @@ public static void LogAnalyzers(int correlationId, Workspace workspace, Immutabl
// log registered analyzers.
Logger.Log(analyzersId, KeyValueLogMessage.Create(m =>
{
m[Id] = correlationId.ToString();
m[AnalyzerCount] = reordered.Length.ToString();
m[Id] = correlationId;
m[AnalyzerCount] = reordered.Length;
}));
foreach (var analyzer in reordered)
{
Logger.Log(analyzerId, KeyValueLogMessage.Create(m =>
{
m[Id] = correlationId.ToString();
m[Id] = correlationId;
m[Analyzer] = analyzer.ToString();
}));
}
......@@ -129,7 +129,7 @@ public static void LogWorkCoordiantorShutdownTimeout(int correlationId)
{
Logger.Log(FunctionId.WorkCoordinator_ShutdownTimeout, KeyValueLogMessage.Create(m =>
{
m[Id] = correlationId.ToString();
m[Id] = correlationId;
}));
}
......@@ -142,12 +142,12 @@ public static void LogWorkCoordiantorShutdown(int correlationId, LogAggregator l
{
Logger.Log(FunctionId.WorkCoordinator_Shutdown, KeyValueLogMessage.Create(m =>
{
m[Id] = correlationId.ToString();
m[Id] = correlationId;
foreach (var kv in logAggregator)
{
var change = ((WorkspaceChangeKind)kv.Key).ToString();
m[change] = kv.Value.GetCount().ToString();
m[change] = kv.Value.GetCount();
}
}));
}
......@@ -207,7 +207,7 @@ public static void LogIncrementalAnalyzerProcessorStatistics(int correlationId,
{
var solutionHash = GetSolutionHash(solution);
m[Id] = correlationId.ToString();
m[Id] = correlationId;
m[SolutionHash] = solutionHash.ToString();
var statMap = new Dictionary<string, List<int>>();
......@@ -215,7 +215,7 @@ public static void LogIncrementalAnalyzerProcessorStatistics(int correlationId,
{
if (kv.Key is string)
{
m[kv.Key.ToString()] = kv.Value.GetCount().ToString();
m[kv.Key.ToString()] = kv.Value.GetCount();
continue;
}
......@@ -235,13 +235,13 @@ public static void LogIncrementalAnalyzerProcessorStatistics(int correlationId,
var key = kv.Key.ToString();
var result = LogAggregator.GetStatistics(kv.Value);
m[CreateProperty(key, Max)] = result.Maximum.ToString();
m[CreateProperty(key, Min)] = result.Minimum.ToString();
m[CreateProperty(key, Median)] = result.Median.ToString();
m[CreateProperty(key, Mean)] = result.Mean.ToString();
m[CreateProperty(key, Mode)] = result.Mode.ToString();
m[CreateProperty(key, Range)] = result.Range.ToString();
m[CreateProperty(key, Count)] = result.Count.ToString();
m[CreateProperty(key, Max)] = result.Maximum;
m[CreateProperty(key, Min)] = result.Minimum;
m[CreateProperty(key, Median)] = result.Median;
m[CreateProperty(key, Mean)] = result.Mean;
m[CreateProperty(key, Mode)] = result.Mode;
m[CreateProperty(key, Range)] = result.Range;
m[CreateProperty(key, Count)] = result.Count;
}
}));
......
......@@ -55,43 +55,43 @@ public static int GetNextId()
return LogAggregator.GetNextId();
}
private static void CreateSessionKeyValue(Dictionary<string, string> map, int sessionId, EncDebuggingSessionInfo session)
private static void CreateSessionKeyValue(Dictionary<string, object> map, int sessionId, EncDebuggingSessionInfo session)
{
map[SessionId] = sessionId.ToString();
map[SessionCount] = session.EditSessions.Count.ToString();
map[EmptySessionCount] = session.EmptyEditSessions.ToString();
map[SessionId] = sessionId;
map[SessionCount] = session.EditSessions.Count;
map[EmptySessionCount] = session.EmptyEditSessions;
}
private static void CreateSessionEditKeyValue(Dictionary<string, string> map, int sessionId, int editSessionId, EncEditSessionInfo editSession)
private static void CreateSessionEditKeyValue(Dictionary<string, object> map, int sessionId, int editSessionId, EncEditSessionInfo editSession)
{
map[SessionId] = sessionId.ToString();
map[EditSessionId] = editSessionId.ToString();
map[SessionId] = sessionId;
map[EditSessionId] = editSessionId;
map[HadCompilationErrors] = editSession.HadCompilationErrors.ToString();
map[HadRudeEdits] = editSession.HadRudeEdits.ToString();
map[HadValidChanges] = editSession.HadValidChanges.ToString();
map[HadValidInsignificantChanges] = editSession.HadValidInsignificantChanges.ToString();
map[HadCompilationErrors] = editSession.HadCompilationErrors;
map[HadRudeEdits] = editSession.HadRudeEdits;
map[HadValidChanges] = editSession.HadValidChanges;
map[HadValidInsignificantChanges] = editSession.HadValidInsignificantChanges;
map[RudeEditsCount] = editSession.RudeEdits.Count.ToString();
map[EmitDeltaErrorIdCount] = editSession.EmitDeltaErrorIds != null ? editSession.EmitDeltaErrorIds.Count().ToString() : "0";
map[RudeEditsCount] = editSession.RudeEdits.Count;
map[EmitDeltaErrorIdCount] = editSession.EmitDeltaErrorIds != null ? editSession.EmitDeltaErrorIds.Count() : 0;
}
private static void CreateEditSessionErrorId(Dictionary<string, string> map, int sessionId, int editSessionId, string error)
private static void CreateEditSessionErrorId(Dictionary<string, object> map, int sessionId, int editSessionId, string error)
{
map[SessionId] = sessionId.ToString();
map[EditSessionId] = editSessionId.ToString();
map[SessionId] = sessionId;
map[EditSessionId] = editSessionId;
map[ErrorId] = error;
}
private static void CreateEditSessionRudeEdit(Dictionary<string, string> map, int sessionId, int editSessionId, ValueTuple<ushort, ushort> rudeEdit, bool blocking)
private static void CreateEditSessionRudeEdit(Dictionary<string, object> map, int sessionId, int editSessionId, ValueTuple<ushort, ushort> rudeEdit, bool blocking)
{
map[SessionId] = sessionId.ToString();
map[EditSessionId] = editSessionId.ToString();
map[SessionId] = sessionId;
map[EditSessionId] = editSessionId;
map[RudeEditKind] = rudeEdit.Item1.ToString();
map[RudeEditSyntaxKind] = rudeEdit.Item2.ToString();
map[RudeEditBlocking] = blocking.ToString();
map[RudeEditKind] = rudeEdit.Item1;
map[RudeEditSyntaxKind] = rudeEdit.Item2;
map[RudeEditBlocking] = blocking;
}
}
}
......@@ -168,7 +168,7 @@ public IEnumerable Items
Logger.Log(
FunctionId.SolutionExplorer_AnalyzerItemSource_GetItems,
KeyValueLogMessage.Create(m => { m["Count"] = _analyzerItems.Count.ToString(); }));
KeyValueLogMessage.Create(m => m["Count"] = _analyzerItems.Count));
return _analyzerItems;
}
......
......@@ -70,7 +70,7 @@ public IEnumerable Items
Logger.Log(
FunctionId.SolutionExplorer_DiagnosticItemSource_GetItems,
KeyValueLogMessage.Create(m => { m["Count"] = _diagnosticItems.Count.ToString(); }));
KeyValueLogMessage.Create(m => m["Count"] = _diagnosticItems.Count));
return _diagnosticItems;
}
......
......@@ -54,11 +54,11 @@ public static void LogContext(FixAllContext fixAllContext, bool isInternalCodeFi
switch (fixAllContext.Scope)
{
case CodeFixes.FixAllScope.Project:
m[s_documentCount] = fixAllContext.Project.DocumentIds.Count.ToString();
m[s_documentCount] = fixAllContext.Project.DocumentIds.Count;
break;
case CodeFixes.FixAllScope.Solution:
m[s_documentCount] = fixAllContext.Solution.Projects.Sum(p => p.DocumentIds.Count).ToString();
m[s_documentCount] = fixAllContext.Solution.Projects.Sum(p => p.DocumentIds.Count);
break;
}
}));
......@@ -93,9 +93,7 @@ public static void LogPreviewChangesResult(bool applied, bool allChangesApplied
string value;
if (applied)
{
value = allChangesApplied ?
s_allChangesApplied :
s_subsetOfChangesApplied;
value = allChangesApplied ? s_allChangesApplied : s_subsetOfChangesApplied;
}
else
{
......@@ -112,8 +110,8 @@ public static void LogDiagnosticsStats(ImmutableDictionary<Document, ImmutableAr
{
Logger.Log(FunctionId.CodeFixes_FixAllOccurrencesComputation_Diagnostics, KeyValueLogMessage.Create(m =>
{
m[s_documentsWithDiagnosticsToFix] = documentsAndDiagnosticsToFixMap.Keys.Count().ToString();
m[s_totalDiagnosticsToFix] = documentsAndDiagnosticsToFixMap.Values.Sum(v => v.Length).ToString();
m[s_documentsWithDiagnosticsToFix] = documentsAndDiagnosticsToFixMap.Keys.Count();
m[s_totalDiagnosticsToFix] = documentsAndDiagnosticsToFixMap.Values.Sum(v => v.Length);
}));
}
......@@ -121,8 +119,8 @@ public static void LogDiagnosticsStats(ImmutableDictionary<Project, ImmutableArr
{
Logger.Log(FunctionId.CodeFixes_FixAllOccurrencesComputation_Diagnostics, KeyValueLogMessage.Create(m =>
{
m[s_projectsWithDiagnosticsToFix] = projectsAndDiagnosticsToFixMap.Keys.Count().ToString();
m[s_totalDiagnosticsToFix] = projectsAndDiagnosticsToFixMap.Values.Sum(v => v.Length).ToString();
m[s_projectsWithDiagnosticsToFix] = projectsAndDiagnosticsToFixMap.Keys.Count();
m[s_totalDiagnosticsToFix] = projectsAndDiagnosticsToFixMap.Values.Sum(v => v.Length);
}));
}
......@@ -130,7 +128,7 @@ public static void LogFixesToMergeStats(ConcurrentBag<CodeAction> fixesToMerge)
{
Logger.Log(FunctionId.CodeFixes_FixAllOccurrencesComputation_Merge, KeyValueLogMessage.Create(m =>
{
m[s_totalFixesToMerge] = fixesToMerge.Count.ToString();
m[s_totalFixesToMerge] = fixesToMerge.Count;
}));
}
}
......
......@@ -351,9 +351,8 @@ public static KeyValueLogMessage Create(int sessionId, LinkedFileDiffMergingSess
{
return KeyValueLogMessage.Create(m =>
{
m[SessionId] = sessionId.ToString();
m[HasLinkedFile] = (sessionInfo.LinkedFileGroups.Count > 0).ToString();
m[SessionId] = sessionId;
m[HasLinkedFile] = sessionInfo.LinkedFileGroups.Count > 0;
});
}
......@@ -361,17 +360,17 @@ public static KeyValueLogMessage Create(int sessionId, LinkedFileGroupSessionInf
{
return KeyValueLogMessage.Create(m =>
{
m[SessionId] = sessionId.ToString();
m[LinkedDocuments] = groupInfo.LinkedDocuments.ToString();
m[DocumentsWithChanges] = groupInfo.DocumentsWithChanges.ToString();
m[IdenticalDiffs] = groupInfo.IdenticalDiffs.ToString();
m[IsolatedDiffs] = groupInfo.IsolatedDiffs.ToString();
m[OverlappingDistinctDiffs] = groupInfo.OverlappingDistinctDiffs.ToString();
m[OverlappingDistinctDiffsWithSameSpan] = groupInfo.OverlappingDistinctDiffsWithSameSpan.ToString();
m[OverlappingDistinctDiffsWithSameSpanAndSubstringRelation] = groupInfo.OverlappingDistinctDiffsWithSameSpanAndSubstringRelation.ToString();
m[InsertedMergeConflictComments] = groupInfo.InsertedMergeConflictComments.ToString();
m[InsertedMergeConflictCommentsAtAdjustedLocation] = groupInfo.InsertedMergeConflictCommentsAtAdjustedLocation.ToString();
m[SessionId] = sessionId;
m[LinkedDocuments] = groupInfo.LinkedDocuments;
m[DocumentsWithChanges] = groupInfo.DocumentsWithChanges;
m[IdenticalDiffs] = groupInfo.IdenticalDiffs;
m[IsolatedDiffs] = groupInfo.IsolatedDiffs;
m[OverlappingDistinctDiffs] = groupInfo.OverlappingDistinctDiffs;
m[OverlappingDistinctDiffsWithSameSpan] = groupInfo.OverlappingDistinctDiffsWithSameSpan;
m[OverlappingDistinctDiffsWithSameSpanAndSubstringRelation] = groupInfo.OverlappingDistinctDiffsWithSameSpanAndSubstringRelation;
m[InsertedMergeConflictComments] = groupInfo.InsertedMergeConflictComments;
m[InsertedMergeConflictCommentsAtAdjustedLocation] = groupInfo.InsertedMergeConflictCommentsAtAdjustedLocation;
});
}
......
......@@ -14,7 +14,7 @@ internal sealed class KeyValueLogMessage : LogMessage
{
private static readonly ObjectPool<KeyValueLogMessage> s_pool = new ObjectPool<KeyValueLogMessage>(() => new KeyValueLogMessage(), 20);
public static KeyValueLogMessage Create(Action<Dictionary<string, string>> propertySetter)
public static KeyValueLogMessage Create(Action<Dictionary<string, object>> propertySetter)
{
var logMessage = s_pool.Allocate();
logMessage.Constrcut(propertySetter);
......@@ -22,15 +22,15 @@ public static KeyValueLogMessage Create(Action<Dictionary<string, string>> prope
return logMessage;
}
private Dictionary<string, string> _map = null;
private Action<Dictionary<string, string>> _propertySetter = null;
private Dictionary<string, object> _map = null;
private Action<Dictionary<string, object>> _propertySetter = null;
private KeyValueLogMessage()
{
// prevent it from being created directly
}
private void Constrcut(Action<Dictionary<string, string>> propertySetter)
private void Constrcut(Action<Dictionary<string, object>> propertySetter)
{
_propertySetter = propertySetter;
}
......@@ -44,7 +44,7 @@ public bool ContainsProperty
}
}
public IEnumerable<KeyValuePair<string, string>> Properties
public IEnumerable<KeyValuePair<string, object>> Properties
{
get
{
......@@ -63,7 +63,7 @@ public override void Free()
{
if (_map != null)
{
SharedPools.Default<Dictionary<string, string>>().ClearAndFree(_map);
SharedPools.Default<Dictionary<string, object>>().ClearAndFree(_map);
_map = null;
}
......@@ -78,7 +78,7 @@ private void EnsureMap()
{
if (_map == null && _propertySetter != null)
{
_map = SharedPools.Default<Dictionary<string, string>>().AllocateAndClear();
_map = SharedPools.Default<Dictionary<string, object>>().AllocateAndClear();
_propertySetter(_map);
}
}
......
......@@ -99,16 +99,16 @@ public static void LogSummary()
{
Logger.Log(FunctionId.PersistedSemanticVersion_Info, KeyValueLogMessage.Create(m =>
{
m[ProjectCount] = s_logAggregator.GetCount(ProjectCount).ToString();
m[InitialSemanticVersionCount] = s_logAggregator.GetCount(InitialSemanticVersionCount).ToString();
m[InitialDependentSemanticVersionCount] = s_logAggregator.GetCount(InitialDependentSemanticVersionCount).ToString();
m[Text] = s_logAggregator.GetCount(Text).ToString();
m[SyntaxTree] = s_logAggregator.GetCount(SyntaxTree).ToString();
m[Project] = s_logAggregator.GetCount(Project).ToString();
m[DependentProject] = s_logAggregator.GetCount(DependentProject).ToString();
m[Semantic] = s_logAggregator.GetCount(Semantic).ToString();
m[DependentSemantic] = s_logAggregator.GetCount(DependentSemantic).ToString();
m[ProjectCount] = s_logAggregator.GetCount(ProjectCount);
m[InitialSemanticVersionCount] = s_logAggregator.GetCount(InitialSemanticVersionCount);
m[InitialDependentSemanticVersionCount] = s_logAggregator.GetCount(InitialDependentSemanticVersionCount);
m[Text] = s_logAggregator.GetCount(Text);
m[SyntaxTree] = s_logAggregator.GetCount(SyntaxTree);
m[Project] = s_logAggregator.GetCount(Project);
m[DependentProject] = s_logAggregator.GetCount(DependentProject);
m[Semantic] = s_logAggregator.GetCount(Semantic);
m[DependentSemantic] = s_logAggregator.GetCount(DependentSemantic);
}));
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册