1 write to ElapsedTime
Microsoft.CodeAnalysis (1)
SourceGeneration\RunResults.cs (1)
226ElapsedTime = elapsedTime;
27 references to ElapsedTime
Microsoft.CodeAnalysis (4)
CommandLine\ReportAnalyzerUtil.cs (4)
129.OrderByDescending(kvp => kvp.Sum(entry => entry.ElapsedTime.Ticks)); 133var executionTime = generatorGroup.Sum(x => x.ElapsedTime.TotalSeconds); 137foreach (var timingInfo in generatorGroup.OrderByDescending(x => x.ElapsedTime)) 139executionTime = timingInfo.ElapsedTime.TotalSeconds;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (22)
SourceGeneration\GeneratorDriverTests.cs (14)
3403Assert.Equal(TimeSpan.Zero, generatorTiming.ElapsedTime); 3433Assert.NotEqual(TimeSpan.Zero, generatorTiming.ElapsedTime); 3434Assert.True(timing.ElapsedTime >= generatorTiming.ElapsedTime); 3474Assert.NotEqual(TimeSpan.Zero, timing1.ElapsedTime); 3475Assert.True(timing.ElapsedTime >= timing1.ElapsedTime); 3479Assert.NotEqual(TimeSpan.Zero, timing2.ElapsedTime); 3480Assert.True(timing.ElapsedTime >= timing2.ElapsedTime); 3482Assert.True(timing.ElapsedTime >= timing1.ElapsedTime + timing2.ElapsedTime); 3513Assert.NotEqual(TimeSpan.Zero, generatorTiming.ElapsedTime); 3514Assert.True(timing.ElapsedTime >= generatorTiming.ElapsedTime); 3525Assert.NotEqual(TimeSpan.Zero, generatorTiming2.ElapsedTime); 3526Assert.True(generatorTiming.ElapsedTime > generatorTiming2.ElapsedTime);
SourceGeneration\SyntaxAwareGeneratorTests.cs (8)
2107Assert.NotEqual(TimeSpan.Zero, timing1.ElapsedTime); 2108Assert.True(timing.ElapsedTime >= timing1.ElapsedTime); 2109Assert.True(timing1.ElapsedTime.TotalMilliseconds >= sleepTimeInMs); 2114Assert.NotEqual(TimeSpan.Zero, timing2.ElapsedTime); 2115Assert.True(timing.ElapsedTime >= timing2.ElapsedTime); 2116Assert.True(timing2.ElapsedTime.TotalMilliseconds >= sleepTimeInMs * 2); 2119Assert.True(timing2.ElapsedTime > timing1.ElapsedTime);
Microsoft.CodeAnalysis.Workspaces (1)
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
55_elapsedTimeByGenerator.AddDataPoint(GetTelemetryKey(generatorTime.Generator, getAnalyzerReference), generatorTime.ElapsedTime);