-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathProgram.cs
More file actions
45 lines (38 loc) · 1.39 KB
/
Program.cs
File metadata and controls
45 lines (38 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using Metrics.Samples;
using Metrics.Utils;
using Microsoft.AspNetCore.Hosting;
namespace AspNetCore.Sample
{
public class Program
{
static void Main(string[] args)
{
const string url = "http://localhost:32132/";
using (var scheduler = new ActionScheduler())
{
using (var webHost = new WebHostBuilder()
.UseKestrel()
.UseStartup<Startup>()
.UseUrls(url)
.Build())
{
Console.WriteLine("AspNetCore Running at {0}", url);
Console.WriteLine("Press any key to exit");
//Process.Start(string.Format("{0}metrics/", url));
SampleMetrics.RunSomeRequests();
scheduler.Start(TimeSpan.FromMilliseconds(500), () =>
{
SetCounterSample.RunSomeRequests();
SetMeterSample.RunSomeRequests();
UserValueHistogramSample.RunSomeRequests();
UserValueTimerSample.RunSomeRequests();
SampleMetrics.RunSomeRequests();
});
HealthChecksSample.RegisterHealthChecks();
webHost.Run();
}
}
}
}
}