Files
SharpIDE/tests/Roslyn.Benchmarks/ParseSolutionBenchmarks.cs
Matthew Parker [SSW] 52e1f33193 rearrange
2025-01-11 13:46:37 +10:00

22 lines
511 B
C#

using BenchmarkDotNet.Attributes;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.MSBuild;
namespace Roslyn.Benchmarks;
public class ParseSolutionBenchmarks
{
private const string _solutionFilePath = "C:/Users/Matthew/Documents/Git/StatusApp/StatusApp.sln";
//[IterationSetup]
[Benchmark]
public async Task<Solution> ParseSolutionFileFromPath()
{
var workspace = MSBuildWorkspace.Create();
var solution = await workspace.OpenSolutionAsync(_solutionFilePath);
return solution;
}
}