<commit_before>﻿using System;
using CIV.Formats;
using static System.Console;

namespace CIV
{

	[Flags]
	enum ExitCodes : int
	{
		Success = 0,
		FileNotFound = 1,
        ParsingFailed = 2,
        VerificationFailed = 4
	}


    class Program
    {
        static void Main(string[] args)
        {
            try
            {
				var project = new Caal().Load(args[0]);
                VerifyAll(project);
			}
            catch (System.IO.FileNotFoundException ex)
            {
                ForegroundColor = ConsoleColor.Red;
                WriteLine(ex.Message);
				ResetColor();
                Environment.Exit((int)ExitCodes.FileNotFound);
			}
		}

        static void VerifyAll(Caal project)
        {
			WriteLine("Loaded project {0}", project.Name);

			foreach (var kv in project.Formulae)
			{
				var isSatisfied = kv.Key.Check(kv.Value);
				var symbol = isSatisfied ? "|=" : "|/=";
				ForegroundColor = isSatisfied ? ConsoleColor.Green : ConsoleColor.Red;
				WriteLine($"{kv.Value} {symbol} {kv.Key}");
			}
			ResetColor();
        }
    }
}<commit_msg>Add time measurement in Main, fix output<commit_after>﻿using System;
using System.Diagnostics;
using CIV.Formats;
using static System.Console;

namespace CIV
{

	[Flags]
	enum ExitCodes : int
	{
		Success = 0,
		FileNotFound = 1,
        ParsingFailed = 2,
        VerificationFailed = 4
	}


    class Program
    {
        static void Main(string[] args)
        {
            try
            {
				var project = new Caal().Load(args[0]);
                VerifyAll(project);
			}
            catch (System.IO.FileNotFoundException ex)
            {
                ForegroundColor = ConsoleColor.Red;
                WriteLine(ex.Message);
				ResetColor();
                Environment.Exit((int)ExitCodes.FileNotFound);
			}
		}

        static void VerifyAll(Caal project)
        {
			WriteLine("Loaded project {0}. Starting verification...", project.Name);

            var sw = new Stopwatch();
            sw.Start();
			foreach (var kv in project.Formulae)
			{
                Write($"{kv.Value} |= {kv.Key}...");
				Out.Flush();
				var isSatisfied = kv.Key.Check(kv.Value);
				ForegroundColor = isSatisfied ? ConsoleColor.Green : ConsoleColor.Red;
                var result = isSatisfied ? "Success!" : "Failure";
                Write($"\t{result}");
                WriteLine();
				ResetColor();
			}
            sw.Stop();
            WriteLine($"Completed in {sw.Elapsed.TotalMilliseconds} ms.");

        }
    }
}
{'fraction_non_alphanumeric': 0.12033359809372518, 'fraction_numerical': 0.004765687053216839, 'mean_word_length': 1.9054209919261822, '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': '2522728', 'n_tokens_mistral': 835, 'n_tokens_neox': 731, 'n_words': 160}