private void StartPerfAnalysis(object sender, EventArgs e)
        {
            var view = new ProfilingTargetView();

            var         sessions      = ShowPerformanceExplorer().Sessions;
            SessionNode activeSession = sessions.ActiveSession;

            if (activeSession == null ||
                activeSession.Target.ProjectTarget == null ||
                !ProjectTarget.IsSame(activeSession.Target.ProjectTarget, view.Project.GetTarget()))
            {
                // need to create a new session
                var target = new ProfilingTarget()
                {
                    ProjectTarget = view.Project.GetTarget()
                };

                activeSession = AddPerformanceSession(
                    view.Project.Name,
                    target
                    );
            }

            ProfileProjectTarget(activeSession, activeSession.Target.ProjectTarget, true);
        }
Esempio n. 2
0
 internal static bool IsSame(ProfilingTarget self, ProfilingTarget other)
 {
     if (self == null)
     {
         return(other == null);
     }
     else if (other != null)
     {
         return(ProjectTarget.IsSame(self.ProjectTarget, other.ProjectTarget) &&
                StandaloneTarget.IsSame(self.StandaloneTarget, other.StandaloneTarget));
     }
     return(false);
 }