Skip to content

Commit

Permalink
Update BenchmarkBase.cs
Browse files Browse the repository at this point in the history
Fix net core app
  • Loading branch information
EntityFX authored Oct 24, 2024
1 parent a3e9190 commit 2975c65
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.IO;
using System.Linq;

#if NETSTANDARD2_0 || NET45
#if NETSTANDARD2_0 || NET45 || NETCOREAPP
using System.Threading.Tasks;
#endif

Expand Down Expand Up @@ -53,7 +53,7 @@ protected void DoOutput(BenchResult result)
if (result.Output == null) {
return;
}
#if NETSTANDARD2_0 || NET45
#if NETSTANDARD2_0 || NET45 || NETCOREAPP
File.WriteAllText(string.Format("{0}.log",GetType().Name) , result.Output);
#else
using (var sw = new StreamWriter(string.Format("{0}.log", GetType().Name)))
Expand Down Expand Up @@ -87,7 +87,7 @@ public virtual void Warmup(double aspect)
}


#if NETSTANDARD2_0 || NET45
#if NETSTANDARD2_0 || NET45 || NETCOREAPP

protected virtual BenchResult[] BenchInParallel<TBench, TBenchResult>(
Func<TBench> buildFunc, Func<TBench, TBenchResult> benchFunc,
Expand Down

0 comments on commit 2975c65

Please sign in to comment.