protected void SetupMetrics(string unityVersion, bool firstRun) { Logger.Trace("Setup metrics"); var usagePath = Environment.UserCachePath.Combine(Constants.UsageFile); string id = null; if (UserSettings.Exists(Constants.GuidKey)) { id = UserSettings.Get(Constants.GuidKey); } if (String.IsNullOrEmpty(id)) { id = Guid.NewGuid().ToString(); UserSettings.Set(Constants.GuidKey, id); } UsageTracker = new UsageTracker(UserSettings, usagePath, id, unityVersion); if (firstRun) { UsageTracker.IncrementLaunchCount(); } }
protected void SetupMetrics(string unityVersion, bool firstRun) { //Logger.Trace("Setup metrics"); var usagePath = Environment.UserCachePath.Combine(Constants.UsageFile); string id = null; if (UserSettings.Exists(Constants.GuidKey)) { id = UserSettings.Get(Constants.GuidKey); } if (String.IsNullOrEmpty(id)) { id = Guid.NewGuid().ToString(); UserSettings.Set(Constants.GuidKey, id); } #if ENABLE_METRICS var metricsService = new MetricsService(ProcessManager, TaskManager, Environment.FileSystem, Environment.NodeJsExecutablePath, Environment.OctorunScriptPath); UsageTracker = new UsageTracker(metricsService, UserSettings, usagePath, id, unityVersion); if (firstRun) { UsageTracker.IncrementLaunchCount(); } #endif }