<commit_before>﻿
using Microsoft.AspNet.SignalR;
using RabbitMQ.Client;
using SignalR.RabbitMq.Example;
using System.Threading;
using System.Threading.Tasks;

namespace SignalR.RabbitMQ.Console
{
    class Program
    {
        static void Main(string[] args)
        {
            var factory = new ConnectionFactory
            {
                UserName = "guest",
                Password = "<PASSWORD>"
            };

            var exchangeName = "SignalR.RabbitMQ-Example";

            var configuration = new RabbitMqScaleoutConfiguration(factory, exchangeName);
            GlobalHost.DependencyResolver.UseRabbitMq(configuration); ;

            var hubContext = GlobalHost.ConnectionManager.GetHubContext<Chat>();

            Task.Factory.StartNew(
                () =>
                    {
                        int i = 0;
                        while (true)
                        {
                            hubContext.Clients.All.onConsoleMessage(i++);
                            System.Console.WriteLine(i);
                            Thread.Sleep(100);
                        }
                    }
                );
            System.Console.WriteLine("Press any key to exit.");
            System.Console.Read();
        }
    }
}
<commit_msg>Added ability to Pad the test message - currently padded to 2kb which would seem to be a nice chunky message size.<commit_after>﻿
using Microsoft.AspNet.SignalR;
using RabbitMQ.Client;
using System.Threading;
using System.Threading.Tasks;
using SignalR.RabbitMq.Console;

namespace SignalR.RabbitMQ.Console
{
    class Program
    {
        static void Main(string[] args)
        {
            var factory = new ConnectionFactory
            {
                UserName = "guest",
                Password = "<PASSWORD>",
                HostName = "192.168.60.2"
            };

            var exchangeName = "SignalR.RabbitMQ-Example";

            var configuration = new RabbitMqScaleoutConfiguration(factory, exchangeName);
            GlobalHost.DependencyResolver.UseRabbitMq(configuration); ;

            var examplePacketSize = 1024*2;
            var hubContext = GlobalHost.ConnectionManager.GetHubContext<Chat>();

            Task.Factory.StartNew(
                () =>
                    {
                        int i = 0;
                        while (true)
                        {
                            var message = string.Format("Message Id - {0}, Message Padded To {1} bytes." , i, examplePacketSize);
                            var noise = message.PadRight(examplePacketSize, '-');

                            hubContext.Clients.All.onConsoleMessage(noise);
                            System.Console.WriteLine(i);
                            i++;
                            Thread.Sleep(100);

                        }
                    }
                );
            System.Console.WriteLine("Press any key to exit.");
            System.Console.Read();
        }
    }
}

{'fraction_non_alphanumeric': 0.08875542208875542, 'fraction_numerical': 0.008341675008341674, 'mean_word_length': 1.3495297805642634, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '3610593', 'n_tokens_mistral': 765, 'n_tokens_neox': 696, 'n_words': 149}