using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;

internal static class Program
{
    private static int Main(string[] args)
    {
        if (args.Length == 0 || !File.Exists(args[0]))
        {
            Console.Error.WriteLine("Usage: Nexamas.UI.StartupProbe.exe <Nexamas.UI.dll>");
            return 2;
        }

        Stopwatch sw = Stopwatch.StartNew();
        Assembly.LoadFrom(args[0]);
        sw.Stop();
        Console.WriteLine("Nexamas UI startup probe loadMs=" + sw.Elapsed.TotalMilliseconds.ToString("0.###"));
        return 0;
    }
}
