public void AddModel(string modelId) { if (HasModel(modelId)) { return; } var model = TaskTimeMeter.CreateModel(modelId); _models[modelId] = model; }
public static Common.Resource CreateResourceRecord(string resourceName) { var info = TaskTimeMeter.GetClusterInfo(resourceName); var res = new Common.Resource(); res.Nodes = new Common.Node[info.NumberOfNodes]; res.Nodes = info.Node.Select(n => CreateNodeRecord(resourceName, n)).ToArray(); res.Parameters[NetworkDegradation.LCN] = info.LatencyClusterNode.ToString(); //res.LatencyPlannerCluster = info.LatencyPlannerCluster; res.Name = info.Name; /*res.ThroughputClusterNode = info.ThroughputClusterNode; * res.ThroughputPlannerCluster = info.ThroughputPlannerCluster;*/ return(res); }