Пример #1
0
 public void PutStatistic(DBStatistics statistics, bool autoTimestamp = true)
 {
     lock (statConn) {
         if (autoTimestamp)
         {
             statistics.Timestamp = LLTools.TimestampMS();
         }
         statConn.Insert(statistics);
     }
 }
Пример #2
0
        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();
                }
            }
        }
Пример #3
0
 public static void PutStatistics(DBStatistics statistics, bool autoTimestamp = true)
 {
     ConfigurationManager.db.PutStatistic(statistics, autoTimestamp);
 }
Пример #4
0
 public static void PutStatistics(DBStatistics statistics, bool autoTimestamp = true)
 {
     db.PutStatistic(statistics, autoTimestamp);
 }