示例#1
0
 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();
                }
            }
        }
示例#3
0
 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);
 }