<commit_before>using System;
using System.Threading.Tasks;
using Akka.TestKit.Xunit2;
using GridDomain.Node;
using GridDomain.Node.Configuration.Akka;
using Xunit.Abstractions;

namespace GridDomain.Tests.Unit
{
    public class NodeTestKit : TestKit
    {
        protected readonly AkkaConfiguration AkkaConfig;

        protected NodeTestKit(ITestOutputHelper output, NodeTestFixture fixture) : base(fixture.SystemConfigFactory(), fixture.Name)
        {
            Fixture = fixture;
            Fixture.ActorSystemCreator = () => Sys;
            Fixture.Output = output;
            AkkaConfig = fixture.AkkaConfig;
            Node = fixture.CreateNode().Result;
        }

        protected GridDomainNode Node { get; }
        protected NodeTestFixture Fixture { get; }

        protected override void AfterAll()
        {
            var memoryInBytes = System.Diagnostics.Process.GetCurrentProcess().VirtualMemorySize64;
            
            Fixture.Output.WriteLine($"Total memory consumtion after test {GetType().Name}: {memoryInBytes / 1024000} Mb");
        }
    }
}<commit_msg>better test diag information<commit_after>using System;
using System.Threading.Tasks;
using Akka.TestKit.Xunit2;
using GridDomain.Node;
using GridDomain.Node.Configuration.Akka;
using Xunit.Abstractions;

namespace GridDomain.Tests.Unit
{
    public class NodeTestKit : TestKit
    {
        protected readonly AkkaConfiguration AkkaConfig;

        protected NodeTestKit(ITestOutputHelper output, NodeTestFixture fixture) : base(fixture.SystemConfigFactory(), fixture.Name)
        {
            output.WriteLine($"before test {GetType().Name}");
            DumpMemoryUsage(output);

            Fixture = fixture;
            Fixture.ActorSystemCreator = () => Sys;
            Fixture.Output = output;
            AkkaConfig = fixture.AkkaConfig;
            Node = fixture.CreateNode().Result;
        }

        protected GridDomainNode Node { get; }
        protected NodeTestFixture Fixture { get; }

        protected override void AfterAll()
        {
            Fixture.Output.WriteLine($"after test {GetType().Name}");
            DumpMemoryUsage(Fixture.Output);
        }

        private void DumpMemoryUsage(ITestOutputHelper output)
        {
            var p = System.Diagnostics.Process.GetCurrentProcess();
            double f = 1024.0;
            output.WriteLine($"Private memory size64: {p.PrivateMemorySize64 / f:#,##0}");
            output.WriteLine($"Working Set size64: {p.WorkingSet64 / f:#,##0}");
            output.WriteLine($"Process: {p.ProcessName}");
        }
    }
}
{'fraction_non_alphanumeric': 0.09815950920245399, 'fraction_numerical': 0.009969325153374233, 'mean_word_length': 2.5986206896551725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2474355', 'n_tokens_mistral': 725, 'n_tokens_neox': 690, 'n_words': 147}