public void TrackInstanceRebootDuration( string region, int index, TimeSpan duration, InstanceHealth health) { _telemetryClient.TrackMetric(InstanceRebootDuration, duration.TotalSeconds, new Dictionary <string, string> { { Subscription, _subscription }, { Region, region }, { InstanceIndex, index.ToString() }, { Health, health.ToString() }, }); }
public static async Task <Guid> StartInstanceAsync(ServerType type, int port) { var id = Guid.NewGuid(); var instance = new ServerInstance(id) { ServerType = type, ServerPort = port, ApiPort = await ClaimApiPortAsync(), }; instance.Start(DllLocation, Config.DllSource.DotNetPath); Instances.Add(instance); if (type == ServerType.World) { InstanceHeartBeats.Add(id.ToString(), 0); InstanceHealth.Add(id.ToString(), ServerHealth.Healthy); } return(id); }
public InstanceAndHealth(Instance instance, InstanceHealth health) { Instance = instance; Health = health; }