Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit e560084

Browse files
author
José Rivero
authored
Update the version of the xUnit Performance Api (#15620)
- This version fail broken benchmarks, so we can catch bad codegen and bug earlier. - Changed the harness to exit with non-zero code when an exception is thrown.
1 parent f8153ea commit e560084

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

dependencies.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<MicrosoftNETCoreRuntimeCoreCLRPackageVersion>2.1.0-preview1-26026-01</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
3838
<XunitPackageVersion>2.2.0-beta2-build3300</XunitPackageVersion>
3939
<XunitConsoleNetcorePackageVersion>1.0.2-prerelease-00177</XunitConsoleNetcorePackageVersion>
40-
<XunitPerformanceApiPackageVersion>1.0.0-beta-build0012</XunitPerformanceApiPackageVersion>
40+
<XunitPerformanceApiPackageVersion>1.0.0-beta-build0015</XunitPerformanceApiPackageVersion>
4141
<MicrosoftDiagnosticsTracingTraceEventPackageVersion>1.0.3-alpha-experimental</MicrosoftDiagnosticsTracingTraceEventPackageVersion>
4242
<VCRuntimeVersion>1.2.0</VCRuntimeVersion>
4343
</PropertyGroup>
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
using System.IO;
2-
using System.Reflection;
3-
using System.Collections.Generic;
1+
using System;
42
using Microsoft.Xunit.Performance.Api;
53

64
public class PerfHarness
75
{
8-
public static void Main(string[] args)
6+
public static int Main(string[] args)
97
{
10-
string assemblyName = args[0];
11-
using (XunitPerformanceHarness harness = new XunitPerformanceHarness(args))
8+
try
129
{
13-
harness.RunBenchmarks(assemblyName);
10+
using (XunitPerformanceHarness harness = new XunitPerformanceHarness(args))
11+
harness.RunBenchmarks(assemblyFileName: args[0]);
12+
return 0;
13+
}
14+
catch (Exception ex)
15+
{
16+
Console.WriteLine("[ERROR] Benchmark execution failed.");
17+
Console.WriteLine($" {ex.ToString()}");
18+
return 1;
1419
}
1520
}
16-
}
21+
}

0 commit comments

Comments
 (0)