Add profiling to MarketDataServer controllers
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MarketData;
|
||||
using MarketData.Utils;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using LogLevel = MarketData.LogLevel;
|
||||
|
||||
@@ -12,14 +13,18 @@ namespace MarketDataServer.Controllers
|
||||
[HttpGet(Name = "GetPing")]
|
||||
public bool GetPing()
|
||||
{
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("[{0:G}][PingController::GetPing]", DateTime.Now));
|
||||
Profiler profiler = new Profiler();
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,$"Start");
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,$"Done, total took {profiler.End()} (ms)");
|
||||
return true;
|
||||
}
|
||||
|
||||
[HttpGet(Name = "GetSystemInfo")]
|
||||
public String GetSystemInfo()
|
||||
{
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("[{0:G}][PingController::GetSystemInfo]", DateTime.Now));
|
||||
Profiler profiler = new Profiler();
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,$"Start");
|
||||
MDTrace.WriteLine(LogLevel.DEBUG,$"Done, total took {profiler.End()} (ms)");
|
||||
return Environment.OSVersion.VersionString;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user