This commit is contained in:
@@ -13,6 +13,6 @@ When the AyaNova server is booted it starts gathering snapshots of statistical d
|
||||
- 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
|
||||
- every 12 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
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace AyaNova.Biz
|
||||
|
||||
#if (DEBUG)
|
||||
private static TimeSpan tsMMFrequency = new TimeSpan(0, 5, 0);
|
||||
private static TimeSpan tsDDFrequency = new TimeSpan(24, 0, 0);
|
||||
private static TimeSpan tsDDFrequency = new TimeSpan(12, 0, 0);
|
||||
#else
|
||||
private static TimeSpan tsMMFrequency = new TimeSpan(0, 5, 0);
|
||||
private static TimeSpan tsDDFrequency = new TimeSpan(24, 0, 0);
|
||||
private static TimeSpan tsDDFrequency = new TimeSpan(12, 0, 0);//changed to 12 hours from 24 due to weird issue not gathering like it should diagnosis
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -85,12 +85,8 @@ namespace AyaNova.Biz
|
||||
MetricMM mm = new MetricMM(Allocated, WorkingSet, PrivateBytes, CPU);
|
||||
ct.MetricMM.Add(mm);
|
||||
ct.SaveChanges();
|
||||
//System.Diagnostics.Debug.WriteLine("MM SAVED");
|
||||
}
|
||||
_lastMMSnapshot = now;
|
||||
#if (DEBUG)
|
||||
log.LogInformation($"DEBUG DD ISSUE: during MM metrics snapshot, _lastDDSnapshot was {_lastDDSnapshot.ToString()}, IsAfterduration return value is {DateUtil.IsAfterDuration(_lastDDSnapshot, tsDDFrequency)} ");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -101,10 +97,9 @@ namespace AyaNova.Biz
|
||||
if (DateUtil.IsAfterDuration(_lastDDSnapshot, tsDDFrequency))
|
||||
{
|
||||
#if (DEBUG)
|
||||
log.LogInformation("DEBUG DD metrics snapshot");
|
||||
#else
|
||||
log.LogDebug("DD metrics snapshot");
|
||||
log.LogInformation($"DD metrics snapshot, _lastDDSnapshot:{_lastDDSnapshot}, tsDDFrequency:{tsDDFrequency}");
|
||||
#endif
|
||||
log.LogDebug("DD metrics snapshot");
|
||||
|
||||
var now = DateTime.UtcNow;
|
||||
//FILES ON DISK
|
||||
|
||||
@@ -1802,7 +1802,7 @@ namespace AyaNova.Util
|
||||
u.UserOptions.EmailAddress = bogusEmail;
|
||||
u.UserOptions.Hour12 = true;
|
||||
u.UserOptions.CurrencyName = "USD";
|
||||
u.UserOptions.UiColor = Fake.Internet.Color().ToUpperInvariant();
|
||||
u.UserOptions.UiColor = Fake.Internet.Color().ToUpperInvariant()+"FF";
|
||||
|
||||
|
||||
//this seems wrong to get a new context inside a loop but in testing is actually faster!?
|
||||
|
||||
Reference in New Issue
Block a user