<commit_before>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Management;
using System.Runtime.Remoting.Messaging;
using System.Threading;
using System.Threading.Tasks;
using Stacks;
using Stacks.Actors;

// Code has been ported from Akka.Net library https://github.com/akkadotnet/akka.net

namespace PingPong
{
    public class Program
    {
        public static uint CpuSpeed()
        {
#if !mono
            var mo = new ManagementObject("Win32_Processor.DeviceID='CPU0'");
            var sp = (uint)(mo["CurrentClockSpeed"]);
            mo.Dispose();
            return sp;
#else
            return 0;
#endif
        }

        private static void Main(params string[] args)
        {
            uint timesToRun = args.Length == 1 ? uint.Parse(args[0]) : 1u;
            Start(timesToRun);
            Console.ReadKey();
        }

        private static async Task Start(uint timesToRun)
        {
            const int repeatFactor = 500;
            const long repeat = 3000L * repeatFactor;

            var processorCount = Environment.ProcessorCount;
            if (processorCount == 0)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Failed to read processor count..");
                return;
            }
            if (System.Diagnostics.Debugger.IsAttached)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Warning: Debugger is attached. This has a major performance impact on this benchmark");
                Console.ResetColor();
            }

            int workerThreads;
            int completionPortThreads;
            ThreadPool.GetAvailableThreads(out workerThreads, out completionPortThreads);

            Console.WriteLine("Worker threads:         {0}", workerThreads);
            Console.WriteLine("OSVersion:              {0}", Environment.OSVersion);<commit_msg>Typo fix<commit_after>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Management;
using System.Runtime.Remoting.Messaging;
using System.Threading;
using System.Threading.Tasks;
using Stacks;
using Stacks.Actors;

// Code has been ported from Akka.Net library https://github.com/akkadotnet/akka.net

namespace PingPong
{
    public class Program
    {
        public static uint CpuSpeed()
        {
#if !mono
            var mo = new ManagementObject("Win32_Processor.DeviceID='CPU0'");
            var sp = (uint)(mo["CurrentClockSpeed"]);
            mo.Dispose();
            return sp;
#else
            return 0;
#endif
        }

        private static void Main(params string[] args)
        {
            uint timesToRun = args.Length == 1 ? uint.Parse(args[0]) : 1u;
            Start(timesToRun);
            Console.ReadKey();
        }

        private static async void Start(uint timesToRun)
        {
            const int repeatFactor = 500;
            const long repeat = 3000L * repeatFactor;

            var processorCount = Environment.ProcessorCount;
            if (processorCount == 0)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Failed to read processor count..");
                return;
            }
            if (System.Diagnostics.Debugger.IsAttached)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Warning: Debugger is attached. This has a major performance impact on this benchmark");
                Console.ResetColor();
            }

            int workerThreads;
            int completionPortThreads;
            ThreadPool.GetAvailableThreads(out workerThreads, out completionPortThreads);

            Console.WriteLine("Worker threads:         {0}", workerThreads);
            Console.WriteLine("OSVersion:              {0}", Environment.OSVersion);
{'fraction_non_alphanumeric': 0.08959608323133415, 'fraction_numerical': 0.00832313341493268, 'mean_word_length': 2.0721804511278195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5082381', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1024, 'n_words': 266}