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