Skip to content

Commit 914ee71

Browse files
authored
perfcollect: don't restore symbols for local builds (#2384)
1 parent 90ef2ae commit 914ee71

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/BenchmarkDotNet/Diagnosers/PerfCollectProfiler.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,14 @@ private void StopCollection(DiagnoserActionParameters parameters)
194194

195195
private void EnsureSymbolsForNativeRuntime(DiagnoserActionParameters parameters)
196196
{
197+
if (parameters.BenchmarkCase.GetToolchain() is CoreRunToolchain)
198+
{
199+
return; // it's not needed for a local build of dotnet runtime
200+
}
201+
197202
string cliPath = parameters.BenchmarkCase.GetToolchain() switch
198203
{
199204
CsProjCoreToolchain core => core.CustomDotNetCliPath,
200-
CoreRunToolchain coreRun => coreRun.CustomDotNetCliPath.FullName,
201205
NativeAotToolchain nativeAot => nativeAot.CustomDotNetCliPath,
202206
_ => DotNetCliCommandExecutor.DefaultDotNetCliPath.Value
203207
};
@@ -251,4 +255,4 @@ private FileInfo GetTraceFile(DiagnoserActionParameters parameters, string exten
251255
=> new (ArtifactFileNameHelper.GetTraceFilePath(parameters, creationTime, extension)
252256
.Replace(" ", "_")); // perfcollect does not allow for spaces in the trace file name
253257
}
254-
}
258+
}

0 commit comments

Comments
 (0)