()
| 20 | } |
| 21 | |
| 22 | async function profileCSharp(): Promise<void> { |
| 23 | fs.mkdirSync(path.join(outPath, 'profiling'), { recursive: true }); |
| 24 | |
| 25 | await runIntegrationTest( |
| 26 | basicSlnTestProject, |
| 27 | path.join('lsptoolshost', 'integrationTests'), |
| 28 | `CSharp-${basicSlnTestProject}`, |
| 29 | undefined, |
| 30 | undefined, |
| 31 | { |
| 32 | ROSLYN_DOTNET_EventPipeOutputPath: path.join(profilingOutputFolder, 'csharp-trace.{pid}.nettrace'), |
| 33 | } |
| 34 | ); |
| 35 | |
| 36 | const files = fs.readdirSync(profilingOutputFolder); |
| 37 | const nettraceFiles = files.filter((f) => f.endsWith('.nettrace')); |
| 38 | if (nettraceFiles.length === 0) { |
| 39 | throw new Error('No .nettrace files found in the profiling output folder.'); |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | async function mergeTraces(profilingOutputFolder: string) { |
| 44 | const files = fs.readdirSync(profilingOutputFolder); |
no test coverage detected