This commit is contained in:
@@ -12,5 +12,7 @@ When the AyaNova server is booted it starts gathering snapshots of statistical d
|
||||
- link to chart control in common controls doc
|
||||
- What each stat means and how it's to be interpreted
|
||||
- Frequency of stat gathering
|
||||
- every 5 minutes for memory and cpu metrics
|
||||
- every 24 hours for disk space db total size
|
||||
- Auto deleted after 365 days
|
||||
- Used to provide trend monitoring over time so can know if need to upgrade the server it's hosted on or to anticipate running out of disk space, overwhelmed cpu pegging at 100% etc etc
|
||||
|
||||
@@ -26,11 +26,11 @@ namespace AyaNova.Biz
|
||||
private static double _cpu = 0;
|
||||
|
||||
#if (DEBUG)
|
||||
private static TimeSpan tsOneMinute = new TimeSpan(0, 1, 0);
|
||||
private static TimeSpan ts24Hours = new TimeSpan(24, 0, 0);
|
||||
private static TimeSpan tsMMFrequency = new TimeSpan(0, 5, 0);
|
||||
private static TimeSpan tsDDFrequency = new TimeSpan(24, 0, 0);
|
||||
#else
|
||||
private static TimeSpan tsOneMinute = new TimeSpan(0, 1, 0);
|
||||
private static TimeSpan ts24Hours = new TimeSpan(24, 0, 0);
|
||||
private static TimeSpan tsMMFrequency = new TimeSpan(0, 5, 0);
|
||||
private static TimeSpan tsDDFrequency = new TimeSpan(24, 0, 0);
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -39,7 +39,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
|
||||
|
||||
if (DateUtil.IsAfterDuration(_lastMMSnapshot, tsOneMinute))
|
||||
if (DateUtil.IsAfterDuration(_lastMMSnapshot, tsMMFrequency))
|
||||
{
|
||||
/////////////////////////////////////////////
|
||||
//ONE MINUTE SNAPS
|
||||
@@ -89,7 +89,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
_lastMMSnapshot = now;
|
||||
#if (DEBUG)
|
||||
log.LogInformation($"DEBUG DD ISSUE: during MM metrics snapshot, _lastDDSnapshot was {_lastDDSnapshot.ToString()}, IsAfterduration return value is {DateUtil.IsAfterDuration(_lastDDSnapshot, ts24Hours)} ");
|
||||
log.LogInformation($"DEBUG DD ISSUE: during MM metrics snapshot, _lastDDSnapshot was {_lastDDSnapshot.ToString()}, IsAfterduration return value is {DateUtil.IsAfterDuration(_lastDDSnapshot, tsDDFrequency)} ");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace AyaNova.Biz
|
||||
/////////////////////////////////////////////
|
||||
//ONCE A DAY SNAPS AND CLEANUP
|
||||
//
|
||||
if (DateUtil.IsAfterDuration(_lastDDSnapshot, ts24Hours))
|
||||
if (DateUtil.IsAfterDuration(_lastDDSnapshot, tsDDFrequency))
|
||||
{
|
||||
#if (DEBUG)
|
||||
log.LogInformation("DEBUG DD metrics snapshot");
|
||||
|
||||
Reference in New Issue
Block a user