diff --git a/IPMonitor/Services/MainService.cs b/IPMonitor/Services/MainService.cs
index 299faac..ca88d3e 100755
--- a/IPMonitor/Services/MainService.cs
+++ b/IPMonitor/Services/MainService.cs
@@ -27,6 +27,7 @@ namespace IPMonitor
///
public void RunService(String[] args,IConfiguration configuration)
{
+ Profiler profiler=new Profiler();
DateTime currentDate = DateTime.Now;
GlobalConfig.Instance.Configuration = configuration; // This call sets up configuration stuff so it needs to be first.
@@ -41,8 +42,6 @@ namespace IPMonitor
try
{
- Profiler profiler=new Profiler();
- profiler.Start();
MDTrace.WriteLine(LogLevel.DEBUG,$"[RunService] Started @ {Utility.DateTimeToStringYYYYHMMHDDHHMMSSTT(currentDate)} in {Directory.GetCurrentDirectory()}");
MDTrace.WriteLine(LogLevel.DEBUG,$"[RunService] Argument {arg}");
@@ -59,6 +58,10 @@ namespace IPMonitor
{
MDTrace.WriteLine(LogLevel.DEBUG,String.Format("Exception:{0}",exception.ToString()));
}
+ finally
+ {
+ MDTrace.WriteLine(LogLevel.DEBUG,$"Done, total took {profiler.End()} (ms)");
+ }
}
private static bool CreateLogging(String task)
@@ -147,7 +150,7 @@ namespace IPMonitor
for(int index=0;index
- /// Indicates whether any network connection is available
- /// Filter connections below a specified speed, as well as virtual network cards.
- ///
- ///
- /// true if a network connection is available; otherwise, false.
- ///
- public static bool IsNetworkAvailable()
- {
- return IsNetworkAvailable(0);
- }
-
// On Linux platforms we must be priveleged to send custom payloads so we are using the send option that does not require a payload
// This differs from the windows implementation
public static bool IsInternetConnected()
@@ -53,11 +41,10 @@ namespace MarketData.Integration
/// Indicates whether any network connection is available.
/// Filter connections below a specified speed, as well as virtual network cards.
///
- /// The minimum speed required. Passing 0 will not filter connection using speed.
///
/// true if a network connection is available; otherwise, false.
///
- public static bool IsNetworkAvailable(long minimumSpeed)
+ public static bool IsNetworkAvailable()
{
if (!NetworkInterface.GetIsNetworkAvailable())
return false;