From e266761bbdfd296099b41de1ba41292e9e1e266b Mon Sep 17 00:00:00 2001 From: Mikhail Mitrofanov Date: Mon, 13 Jan 2025 14:26:15 +0300 Subject: [PATCH] test load --- mROA.Performance/Program.cs | 50 +++++++++++++++++++ mROA.Performance/mROA.Performance.csproj | 15 ++++++ .../net9.0/mROA.Performance.AssemblyInfo.cs | 22 ++++++++ ....GeneratedMSBuildEditorConfig.editorconfig | 15 ++++++ .../net9.0/mROA.Performance.GlobalUsings.g.cs | 8 +++ .../obj/mROA.Performance.csproj.nuget.g.props | 19 +++++++ .../mROA.Performance.csproj.nuget.g.targets | 2 + 7 files changed, 131 insertions(+) create mode 100644 mROA.Performance/Program.cs create mode 100644 mROA.Performance/mROA.Performance.csproj create mode 100644 mROA.Performance/obj/Release/net9.0/mROA.Performance.AssemblyInfo.cs create mode 100644 mROA.Performance/obj/Release/net9.0/mROA.Performance.GeneratedMSBuildEditorConfig.editorconfig create mode 100644 mROA.Performance/obj/Release/net9.0/mROA.Performance.GlobalUsings.g.cs create mode 100644 mROA.Performance/obj/mROA.Performance.csproj.nuget.g.props create mode 100644 mROA.Performance/obj/mROA.Performance.csproj.nuget.g.targets diff --git a/mROA.Performance/Program.cs b/mROA.Performance/Program.cs new file mode 100644 index 0000000..6a96f09 --- /dev/null +++ b/mROA.Performance/Program.cs @@ -0,0 +1,50 @@ +using System.Diagnostics; +using System.Reflection; +using mROA.Implementation; +using mROA.Test; + +namespace mROA.Performance; + +class Program +{ + private static ProgramlyInteractionChanel _interactionModule; + private static ISerialisationModule _serialisationModule; + private static IExecuteModule _executeModule; + private static IMethodRepository _methodRepository; + private static IContextRepository _contextRepository; + + static void Main(string[] args) + { + _interactionModule = new ProgramlyInteractionChanel(); + _serialisationModule = new JsonSerialisationModule(_interactionModule); + var repo = new MethodRepository(); + repo.CollectForAssembly(Assembly.GetAssembly(typeof(ITestController))); + _methodRepository = repo; + var repo2 = new ContextRepository(); + repo2.FillSingletons(Assembly.GetAssembly(typeof(ITestController))); + _contextRepository = repo2; + + _executeModule = new PrepairedExecutionModule(_methodRepository, _serialisationModule, _contextRepository); + var sw = Stopwatch.StartNew(); + + _interactionModule.PassCommand(132, """ + { + "RequestTypeId": 0, + "CommandId": 3 + } + """); + while (_interactionModule.OutputBuffer.Count != 2) ; + + + // _interactionModule.PassCommand(132, """ + // { + // "RequestTypeId": 0, + // "CommandId": 3 + // } + // """); + // while (_interactionModule.OutputBuffer.Count() != 4) ; + + var time = sw.Elapsed; + Console.WriteLine(time.TotalMilliseconds.ToString()); + } +} \ No newline at end of file diff --git a/mROA.Performance/mROA.Performance.csproj b/mROA.Performance/mROA.Performance.csproj new file mode 100644 index 0000000..ba70544 --- /dev/null +++ b/mROA.Performance/mROA.Performance.csproj @@ -0,0 +1,15 @@ + + + + Exe + net9.0 + enable + enable + + + + + + + + diff --git a/mROA.Performance/obj/Release/net9.0/mROA.Performance.AssemblyInfo.cs b/mROA.Performance/obj/Release/net9.0/mROA.Performance.AssemblyInfo.cs new file mode 100644 index 0000000..ab22524 --- /dev/null +++ b/mROA.Performance/obj/Release/net9.0/mROA.Performance.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("mROA.Performance")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+da60eb27f99600ee3a9ee8526d2b26260efd8225")] +[assembly: System.Reflection.AssemblyProductAttribute("mROA.Performance")] +[assembly: System.Reflection.AssemblyTitleAttribute("mROA.Performance")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Создано классом WriteCodeFragment MSBuild. + diff --git a/mROA.Performance/obj/Release/net9.0/mROA.Performance.GeneratedMSBuildEditorConfig.editorconfig b/mROA.Performance/obj/Release/net9.0/mROA.Performance.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..7493786 --- /dev/null +++ b/mROA.Performance/obj/Release/net9.0/mROA.Performance.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net9.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = mROA.Performance +build_property.ProjectDir = C:\Users\Mimm\Projects\VisualStudioProjects\mROA\mROA.Performance\ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 9.0 +build_property.EnableCodeStyleSeverity = diff --git a/mROA.Performance/obj/Release/net9.0/mROA.Performance.GlobalUsings.g.cs b/mROA.Performance/obj/Release/net9.0/mROA.Performance.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/mROA.Performance/obj/Release/net9.0/mROA.Performance.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/mROA.Performance/obj/mROA.Performance.csproj.nuget.g.props b/mROA.Performance/obj/mROA.Performance.csproj.nuget.g.props new file mode 100644 index 0000000..950a716 --- /dev/null +++ b/mROA.Performance/obj/mROA.Performance.csproj.nuget.g.props @@ -0,0 +1,19 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\Mimm\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 6.10.1 + + + + + + + C:\Users\Mimm\.nuget\packages\nunit.analyzers\4.3.0 + + \ No newline at end of file diff --git a/mROA.Performance/obj/mROA.Performance.csproj.nuget.g.targets b/mROA.Performance/obj/mROA.Performance.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/mROA.Performance/obj/mROA.Performance.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file