diff --git a/test/AbpPerfTest/AbpPerfTest.WithoutAbp/AbpPerfTest.WithoutAbp.csproj b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/AbpPerfTest.WithoutAbp.csproj new file mode 100644 index 0000000000..f6851843e7 --- /dev/null +++ b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/AbpPerfTest.WithoutAbp.csproj @@ -0,0 +1,7 @@ + + + + net5.0 + + + diff --git a/test/AbpPerfTest/AbpPerfTest.WithoutAbp/Program.cs b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/Program.cs new file mode 100644 index 0000000000..6d42a4aa5e --- /dev/null +++ b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace AbpPerfTest.WithoutAbp +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); + } +} \ No newline at end of file diff --git a/test/AbpPerfTest/AbpPerfTest.WithoutAbp/Properties/launchSettings.json b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/Properties/launchSettings.json new file mode 100644 index 0000000000..07aa90a5da --- /dev/null +++ b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:16268", + "sslPort": 44323 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "AbpPerfTest.WithoutAbp": { + "commandName": "Project", + "dotnetRunMessages": "true", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/test/AbpPerfTest/AbpPerfTest.WithoutAbp/Startup.cs b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/Startup.cs new file mode 100644 index 0000000000..971d2625b8 --- /dev/null +++ b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/Startup.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace AbpPerfTest.WithoutAbp +{ + public class Startup + { + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseRouting(); + + app.UseEndpoints(endpoints => + { + endpoints.MapGet("/", async context => { await context.Response.WriteAsync("Hello World!"); }); + }); + } + } +} \ No newline at end of file diff --git a/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.Development.json b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.Development.json new file mode 100644 index 0000000000..8983e0fc1c --- /dev/null +++ b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.json b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.json new file mode 100644 index 0000000000..d9d9a9bff6 --- /dev/null +++ b/test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/test/AbpPerfTest/AbpPerfTest.sln b/test/AbpPerfTest/AbpPerfTest.sln new file mode 100644 index 0000000000..56f079c284 --- /dev/null +++ b/test/AbpPerfTest/AbpPerfTest.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbpPerfTest.WithoutAbp", "AbpPerfTest.WithoutAbp\AbpPerfTest.WithoutAbp.csproj", "{E3406CA0-9B0C-45FC-A3C0-8179A9C4A3E5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E3406CA0-9B0C-45FC-A3C0-8179A9C4A3E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E3406CA0-9B0C-45FC-A3C0-8179A9C4A3E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E3406CA0-9B0C-45FC-A3C0-8179A9C4A3E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E3406CA0-9B0C-45FC-A3C0-8179A9C4A3E5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal