Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 private void prepareCallViewModel()
 {
     mainForm.SetStatus("Preparing callstacks view:");
     mainForm.SetBar(0);
     int count = runTime.Paths.Count;
     int curr = 0;
     foreach (KeyValuePair<int, CallPaths> pair in runTime.Paths)
     {
         Function func = runTime.Functions[pair.Key];
         TreeModel model = new TreeModel(func.Module + "@" + func.Name,
             100 * (float)(pair.Value.Incl) / ((float)(runTime.TotalCalls)),
             100 * (float)(pair.Value.Excl) / ((float)(runTime.TotalCalls)));
         appendChildren(model, pair.Value);
         models.CallModel.Add(model);
         mainForm.SetBar(++curr, count);
     }
 }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 4
0
 public TreeModel AddChild(string n, float i, float e)
 {
     TreeModel child = new TreeModel(n, i, e);
     children.Add(child);
     return child;
 }