This commit is contained in:
2022-03-09 18:49:11 +00:00
parent 8b5a8e323a
commit efcb0dd49d
3 changed files with 6 additions and 11 deletions

View File

@@ -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

View File

@@ -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!?