/// <summary> /// /// </summary> public static void Start() { _refreshTime = DateTime.Now; int intervalSecond = GetSection().ProfileCollectInterval; _operateTimer = new SyncTimer(obj => WriteToStorage(), 1000, 1000); _operateTimer.Start(); _collectTimer = new SyncTimer(obj => Collect(), 100, intervalSecond * 1000); _collectTimer.Start(); StorageMode = ProfileStorageMode.File; if (WorkingLogPath.ToLower().StartsWith("mysql:")) { StorageMode = ProfileStorageMode.MySql; CheckLogTable(typeof(MySqlDataProvider).Name, WorkingLogPath.Substring(6)); } else if (WorkingLogPath.ToLower().StartsWith("sql:")) { StorageMode = ProfileStorageMode.Sql; CheckLogTable(typeof(SqlDataProvider).Name, WorkingLogPath.Substring(4)); } }