101 references to FunctionId
Microsoft.CodeAnalysis.CodeStyle (91)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
68using (Logger.LogBlock(FunctionId.Formatting_AggregateCreateTextChanges, cancellationToken)) 100using (Logger.LogBlock(FunctionId.Formatting_AggregateCreateFormattedRoot, cancellationToken))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (6)
115using (Logger.LogBlock(FunctionId.Formatting_Format, FormatSummary, cancellationToken)) 224using (Logger.LogBlock(FunctionId.Formatting_CollectTokenOperation, cancellationToken)) 348using (Logger.LogBlock(FunctionId.Formatting_ApplyAlignOperation, cancellationToken)) 378using (Logger.LogBlock(FunctionId.Formatting_ApplyAnchorOperation, cancellationToken)) 433using (Logger.LogBlock(FunctionId.Formatting_ApplySpaceAndLine, cancellationToken)) 490using (Logger.LogBlock(FunctionId.Formatting_BuildContext, cancellationToken))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (2)
56using (Logger.LogBlock(FunctionId.Formatting_CreateTextChanges, cancellationToken)) 90using (Logger.LogBlock(FunctionId.Formatting_CreateFormattedRoot, cancellationToken))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\IEventSink.cs (4)
17bool IsEnabled(FunctionId functionId); 19void Log(FunctionId functionId, LogMessage logMessage); 25void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken); 31void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (30)
15/// <inheritdoc cref="RoslynTelemetry.Log(FunctionId, string, LogLevel)"/> 16public static void Log(FunctionId functionId, string? message = null, LogLevel logLevel = LogLevel.Debug) 19/// <inheritdoc cref="RoslynTelemetry.Log(FunctionId, Func{string}, LogLevel)"/> 20public static void Log(FunctionId functionId, Func<string> messageGetter, LogLevel logLevel = LogLevel.Debug) 23/// <inheritdoc cref="RoslynTelemetry.Log{TArg}(FunctionId, Func{TArg, string}, TArg, LogLevel)"/> 24public static void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 27/// <inheritdoc cref="RoslynTelemetry.Log{TArg0, TArg1}(FunctionId, Func{TArg0, TArg1, string}, TArg0, TArg1, LogLevel)"/> 28public static void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 31/// <inheritdoc cref="RoslynTelemetry.Log{TArg0, TArg1, TArg2}(FunctionId, Func{TArg0, TArg1, TArg2, string}, TArg0, TArg1, TArg2, LogLevel)"/> 32public static void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug) 35/// <inheritdoc cref="RoslynTelemetry.Log{TArg0, TArg1, TArg2, TArg3}(FunctionId, Func{TArg0, TArg1, TArg2, TArg3, string}, TArg0, TArg1, TArg2, TArg3, LogLevel)"/> 36public static void Log<TArg0, TArg1, TArg2, TArg3>(FunctionId functionId, Func<TArg0, TArg1, TArg2, TArg3, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, TArg3 arg3, LogLevel logLevel = LogLevel.Debug) 39/// <inheritdoc cref="RoslynTelemetry.Log(FunctionId, LogMessage)"/> 40public static void Log(FunctionId functionId, LogMessage logMessage) 43/// <inheritdoc cref="RoslynTelemetry.LogBlock(FunctionId, CancellationToken, LogLevel)"/> 44public static IDisposable LogBlock(FunctionId functionId, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 47/// <inheritdoc cref="RoslynTelemetry.LogBlock(FunctionId, string, CancellationToken, LogLevel)"/> 48public static IDisposable LogBlock(FunctionId functionId, string? message, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 51/// <inheritdoc cref="RoslynTelemetry.LogBlock(FunctionId, Func{string}, CancellationToken, LogLevel)"/> 52public static IDisposable LogBlock(FunctionId functionId, Func<string> messageGetter, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 55/// <inheritdoc cref="RoslynTelemetry.LogBlock{TArg}(FunctionId, Func{TArg, string}, TArg, CancellationToken, LogLevel)"/> 56public static IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 59/// <inheritdoc cref="RoslynTelemetry.LogBlock{TArg0, TArg1}(FunctionId, Func{TArg0, TArg1, string}, TArg0, TArg1, CancellationToken, LogLevel)"/> 60public static IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 63/// <inheritdoc cref="RoslynTelemetry.LogBlock{TArg0, TArg1, TArg2}(FunctionId, Func{TArg0, TArg1, TArg2, string}, TArg0, TArg1, TArg2, CancellationToken, LogLevel)"/> 64public static IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 67/// <inheritdoc cref="RoslynTelemetry.LogBlock{TArg0, TArg1, TArg2, TArg3}(FunctionId, Func{TArg0, TArg1, TArg2, TArg3, string}, TArg0, TArg1, TArg2, TArg3, CancellationToken, LogLevel)"/> 68public static IDisposable LogBlock<TArg0, TArg1, TArg2, TArg3>(FunctionId functionId, Func<TArg0, TArg1, TArg2, TArg3, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, TArg3 arg3, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 71/// <inheritdoc cref="RoslynTelemetry.LogBlock(FunctionId, LogMessage, CancellationToken)"/> 72public static IDisposable LogBlock(FunctionId functionId, LogMessage logMessage, CancellationToken token)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry_LogBlock.cs (3)
20private static IDisposable CreateLogBlock(ImmutableArray<IEventSink> sinks, FunctionId functionId, LogMessage message, int blockId, CancellationToken cancellationToken) 39private FunctionId _functionId; 43public void Construct(ImmutableArray<IEventSink> sinks, FunctionId functionId, LogMessage logMessage, int blockId, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry_Metrics.cs (16)
43public void Count(FunctionId functionId, string metricName, long delta = 1) 48public void Count(FunctionId functionId, string metricName, long delta, KeyValuePair<string, object?> tag) 54public void Count(FunctionId functionId, string metricName, long delta, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2) 60public void Count(FunctionId functionId, string metricName, long delta, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2, KeyValuePair<string, object?> tag3) 71public void Count(FunctionId functionId, string metricName, long delta, ReadOnlySpan<KeyValuePair<string, object?>> tags) 74private void CountCore(FunctionId functionId, string metricName, long delta, ReadOnlySpan<KeyValuePair<string, object?>> tags) 89public void Record(FunctionId functionId, string metricName, long value) 94public void Record(FunctionId functionId, string metricName, long value, KeyValuePair<string, object?> tag) 100public void Record(FunctionId functionId, string metricName, long value, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2) 106public void Record(FunctionId functionId, string metricName, long value, KeyValuePair<string, object?> tag1, KeyValuePair<string, object?> tag2, KeyValuePair<string, object?> tag3) 113public void Record(FunctionId functionId, string metricName, long value, ReadOnlySpan<KeyValuePair<string, object?>> tags) 116private void RecordCore(FunctionId functionId, string metricName, long value, ReadOnlySpan<KeyValuePair<string, object?>> tags) 134/// Unlike <see cref="Count(FunctionId, string, long)"/> and <see cref="Record(FunctionId, string, long)"/> 139public IDisposable? RecordBlockTime(FunctionId functionId, string metricName) 158private sealed class TimedBlock(RoslynTelemetry telemetry, FunctionId functionId, string metricName) : IDisposable
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\RoslynTelemetry.cs (18)
83private bool TryGetEnabledSinks(FunctionId functionId, out ImmutableArray<IEventSink> sinks) 96public bool IsEnabled(FunctionId functionId) 99private static void LogToSinks(ImmutableArray<IEventSink> sinks, FunctionId functionId, LogMessage logMessage) 124public void Log(FunctionId functionId, string? message = null, LogLevel logLevel = LogLevel.Debug) 139public void Log(FunctionId functionId, Func<string> messageGetter, LogLevel logLevel = LogLevel.Debug) 154public void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 168public void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 182public void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug) 196public void Log<TArg0, TArg1, TArg2, TArg3>(FunctionId functionId, Func<TArg0, TArg1, TArg2, TArg3, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, TArg3 arg3, LogLevel logLevel = LogLevel.Debug) 209public void Log(FunctionId functionId, LogMessage logMessage) 230public IDisposable LogBlock(FunctionId functionId, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 236public IDisposable LogBlock(FunctionId functionId, string? message, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 245public IDisposable LogBlock(FunctionId functionId, Func<string> messageGetter, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 254public IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 263public IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 272public IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 281public IDisposable LogBlock<TArg0, TArg1, TArg2, TArg3>(FunctionId functionId, Func<TArg0, TArg1, TArg2, TArg3, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, TArg3 arg3, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 290public IDisposable LogBlock(FunctionId functionId, LogMessage logMessage, CancellationToken token)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\TelemetryNaming.cs (7)
11/// Maps <see cref="FunctionId"/> onto the event and property names Roslyn's telemetry backend expects. 20private static readonly ConcurrentDictionary<FunctionId, string> s_eventMap = []; 21private static readonly ConcurrentDictionary<(FunctionId id, string name), string> s_propertyMap = []; 23public static string GetEventName(FunctionId id) 26public static string GetPropertyName(FunctionId id, string name) 43private static string GetTelemetryName(FunctionId id, char separator) 44=> Enum.GetName(typeof(FunctionId), id)!.Replace('_', separator).ToLowerInvariant();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Serialization.cs (1)
30Logger.Log(FunctionId.BKTree_ExceptionInCacheRead);
Microsoft.CodeAnalysis.CodeStyle.Fixes (9)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
82using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateConstructor, cancellationToken))
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
31using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateDefaultConstructors, cancellationToken))
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (1)
27using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateEnumMember, cancellationToken))
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (1)
32using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateMethod, cancellationToken))
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
29using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateMethod, cancellationToken))
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (1)
33using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateMethod, cancellationToken))
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
37using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateVariable, cancellationToken))
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
61using (Logger.LogBlock(FunctionId.Refactoring_ImplementInterface, cancellationToken))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (1)
61using (Logger.LogBlock(FunctionId.Simplifier_ReduceAsync, cancellationToken))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
43using (Logger.LogBlock(FunctionId.Refactoring_RemoveUnnecessaryImports_CSharp, cancellationToken))