<commit_before>﻿namespace ReamQuery
{
    using System;
    using System.Globalization;
    using Microsoft.Extensions.Configuration;
    using Microsoft.AspNetCore.Hosting;

    public class Program
    {
        public static void Main(string[] args)
        {
            // todo
            CultureInfo.CurrentCulture = new CultureInfo("en-US");
            CultureInfo.CurrentUICulture = new CultureInfo("en-US");
            Startup.Configuration = new ConfigurationBuilder()
                .AddEnvironmentVariables()
                .AddCommandLine(args)
                .Build();

            // ProjectJsonWorkspace used by CompilerService has issues with project refs,
            // this allows the test project to inject the correct base path when testing.
            var baseDir = Startup.Configuration["REAMQUERY_BASEDIR"];
            if (string.IsNullOrWhiteSpace(baseDir))
            {
                Startup.Configuration["REAMQUERY_BASEDIR"] = System.AppContext.BaseDirectory;
            }

            var host = new WebHostBuilder()
                .UseConfiguration(Startup.Configuration)
                .UseKestrel()
                .UseStartup(typeof(Startup))
                .Build();

            host.Run();
        }
    }
}<commit_msg>Log startup/exit<commit_after>﻿namespace ReamQuery
{
    using System;
    using System.Globalization;
    using System.Diagnostics;
    using Microsoft.Extensions.Configuration;
    using Microsoft.AspNetCore.Hosting;
    using NLog;

    public class Program
    {
        private static Logger Logger = LogManager.GetCurrentClassLogger();

        public static void Main(string[] args)
        {
            var sw = new Stopwatch();
            sw.Start();
            // todo
            CultureInfo.CurrentCulture = new CultureInfo("en-US");
            CultureInfo.CurrentUICulture = new CultureInfo("en-US");
            Startup.Configuration = new ConfigurationBuilder()
                .AddEnvironmentVariables()
                .AddCommandLine(args)
                .Build();

            // ProjectJsonWorkspace used by CompilerService has issues with project refs,
            // this allows the test project to inject the correct base path when testing.
            var baseDir = Startup.Configuration["REAMQUERY_BASEDIR"];
            if (string.IsNullOrWhiteSpace(baseDir))
            {
                Startup.Configuration["REAMQUERY_BASEDIR"] = System.AppContext.BaseDirectory;
            }

            var host = new WebHostBuilder()
                .UseConfiguration(Startup.Configuration)
                .UseKestrel()
                .UseStartup(typeof(Startup))
                .Build();

            Logger.Info("Starting in {0}", Startup.Configuration["REAMQUERY_BASEDIR"]);
            host.Run();
            Logger.Info("Exiting after {0} seconds", sw.Elapsed.TotalSeconds);
        }
    }
}
{'fraction_non_alphanumeric': 0.08839779005524862, 'fraction_numerical': 0.0006906077348066298, 'mean_word_length': 1.929221435793731, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5604914', 'n_tokens_mistral': 709, 'n_tokens_neox': 693, 'n_words': 162}