public void PutStatistic(DBStatistics statistics, bool autoTimestamp = true) { lock (statConn) { if (autoTimestamp) { statistics.Timestamp = LLTools.TimestampMS(); } statConn.Insert(statistics); } }
public static void Update(DBStatistics stats) { lock (statistics) { stats.Timestamp = LLTools.TimestampMS(); if (stats.Timestamp == lastTimestamp) { stats.Timestamp++; } lastTimestamp = stats.Timestamp; statistics.Add(stats); if (LLTools.Timestamp() - lastCheck > checkInterval) { long startTime = LLTools.TimestampMS(); // Time to dump foreach (var s in statistics) { ConfigurationManager.PutStatistics(s, false); } statistics.Clear(); lastCheck = LLTools.Timestamp(); } } }
public static void PutStatistics(DBStatistics statistics, bool autoTimestamp = true) { ConfigurationManager.db.PutStatistic(statistics, autoTimestamp); }
public static void PutStatistics(DBStatistics statistics, bool autoTimestamp = true) { db.PutStatistic(statistics, autoTimestamp); }