forked from dotnet/machinelearning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
31 lines (27 loc) · 1.13 KB
/
Copy pathProgram.cs
File metadata and controls
31 lines (27 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Globalization;
using System.IO;
using System.Threading;
using BenchmarkDotNet.Running;
namespace Microsoft.ML.Benchmarks
{
class Program
{
/// <summary>
/// execute dotnet run -c Release and choose the benchmarks you want to run
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
=> BenchmarkSwitcher
.FromAssembly(typeof(Program).Assembly)
.Run(args, new RecommendedConfig());
internal static string GetInvariantCultureDataPath(string name)
{
// enforce Neutral Language as "en-us" because the input data files use dot as decimal separator (and it fails for cultures with ",")
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
return Path.Combine(Path.GetDirectoryName(typeof(Program).Assembly.Location), "Input", name);
}
}
}