Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace MyApp
- {
- public class Startup
- {
- public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
- {
- app.Run(async context => {
- context.Response.StatusCode = 200;
- await context.Response.WriteAsync("test");
- });
- }
- }
- public static class Program
- {
- public static void Main(string[] args)
- {
- var app = WebHost.CreateDefaultBuilder(args)
- .UseKestrel(options => {
- options.Listen(IPAddress.Loopback, 5000);
- options.AllowSynchronousIO = false;
- })
- .UseStartup<Startup>()
- .Build();
- app.Run();
- }
- }
- }
- $ dotnet run
- $ ab -p test.json -n 20000 -c 100 http://127.0.0.1:5000/
Add Comment
Please, Sign In to add comment