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