public AddChild ( string n, float i, float e ) : |
||
n | string | |
i | float | |
e | float | |
Résultat |
private void prepareModulesViewModel() { mainForm.SetStatus("Preparing modules view:"); mainForm.SetBar(0); int count = runTime.Modules.Count; int curr = 0; foreach (KeyValuePair <string, Dictionary <string, Tuple <float, float> > > pair in runTime.Modules) { TreeModel item = new TreeModel(pair.Key, 0, 0); //float modIncl = 0; float modExcl = 0; models.ModulesModel.Add(item); foreach (KeyValuePair <string, Tuple <float, float> > mpair in pair.Value) { item.AddChild(mpair.Key, 100 * mpair.Value.Item1 / ((float)(runTime.TotalCalls)), 100 * mpair.Value.Item2 / ((float)(runTime.TotalCalls))); //modIncl += mpair.Value.Item1; modExcl += mpair.Value.Item2; } //item.Incl = 100 * modIncl / ((float)(runTime.TotalCalls)); item.Excl = 100 * modExcl / ((float)(runTime.TotalCalls)); mainForm.SetBar(++curr, count); } }
private void appendChildren(TreeModel model, CallPaths path) { mainForm.SetStatus("Preparing function details:"); mainForm.SetBar(0); int count = runTime.Paths.Count; int curr = 0; foreach (KeyValuePair <int, CallPaths> pair in path.Children) { Function func = runTime.Functions[pair.Key]; TreeModel child = model.AddChild(func.Module + "@" + func.Name, 100 * (float)(pair.Value.Incl) / ((float)(runTime.TotalCalls)), 100 * (float)(pair.Value.Excl) / ((float)(runTime.TotalCalls))); appendChildren(child, pair.Value); mainForm.SetBar(++curr, count); } }
private void appendChildren(TreeModel model, CallPaths path) { mainForm.SetStatus("Preparing function details:"); mainForm.SetBar(0); int count = runTime.Paths.Count; int curr = 0; foreach (KeyValuePair<int, CallPaths> pair in path.Children) { Function func = runTime.Functions[pair.Key]; TreeModel child=model.AddChild(func.Module + "@" + func.Name, 100 * (float)(pair.Value.Incl) / ((float)(runTime.TotalCalls)), 100 * (float)(pair.Value.Excl) / ((float)(runTime.TotalCalls))); appendChildren(child, pair.Value); mainForm.SetBar(++curr, count); } }
private void prepareModulesViewModel() { mainForm.SetStatus("Preparing modules view:"); mainForm.SetBar(0); int count = runTime.Modules.Count; int curr = 0; foreach (KeyValuePair<string, Dictionary<string, Tuple<float,float>>> pair in runTime.Modules) { TreeModel item = new TreeModel(pair.Key, 0, 0); //float modIncl = 0; float modExcl = 0; models.ModulesModel.Add(item); foreach (KeyValuePair<string, Tuple<float, float>> mpair in pair.Value) { item.AddChild(mpair.Key, 100 * mpair.Value.Item1 / ((float)(runTime.TotalCalls)), 100 * mpair.Value.Item2 / ((float)(runTime.TotalCalls))); //modIncl += mpair.Value.Item1; modExcl += mpair.Value.Item2; } //item.Incl = 100 * modIncl / ((float)(runTime.TotalCalls)); item.Excl = 100 * modExcl / ((float)(runTime.TotalCalls)); mainForm.SetBar(++curr, count); } }