本文整理汇总了C#中TestUtilities.UI.Python.PythonVisualStudioApp.LaunchPythonProfiling方法的典型用法代码示例。如果您正苦于以下问题:C# PythonVisualStudioApp.LaunchPythonProfiling方法的具体用法?C# PythonVisualStudioApp.LaunchPythonProfiling怎么用?C# PythonVisualStudioApp.LaunchPythonProfiling使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestUtilities.UI.Python.PythonVisualStudioApp
的用法示例。
在下文中一共展示了PythonVisualStudioApp.LaunchPythonProfiling方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LaunchPythonProfilingWizard
public void LaunchPythonProfilingWizard() {
using (var app = new PythonVisualStudioApp()) {
var project = app.OpenProject(@"TestData\ProfileTest.sln");
using (var perfTarget = app.LaunchPythonProfiling()) {
perfTarget.SelectProfileProject();
perfTarget.SelectedProjectComboBox.SelectItem("HelloWorld");
try {
perfTarget.Ok();
} catch (ElementNotEnabledException) {
Assert.Fail("Settings were invalid:\n SelectedProject = {0}",
perfTarget.SelectedProjectComboBox.GetSelectedItemName());
}
}
app.WaitForDialogDismissed();
var profiling = (IPythonProfiling)app.Dte.GetObject("PythonProfiling");
var session = profiling.GetSession(1);
Assert.IsNotNull(app.PythonPerformanceExplorerTreeView.WaitForItem("HelloWorld *"));
while (profiling.IsProfiling) {
// wait for profiling to finish...
Thread.Sleep(100);
}
}
}
示例2: DefaultInterpreterSelected
public void DefaultInterpreterSelected() {
using (var app = new PythonVisualStudioApp()) {
var service = app.InterpreterService;
var originalDefault = service.DefaultInterpreter;
try {
foreach (var interpreter in service.Interpreters) {
service.DefaultInterpreter = interpreter;
using (var dialog = app.LaunchPythonProfiling()) {
Assert.AreEqual(interpreter.Description, dialog.SelectedInterpreter);
}
app.WaitForDialogDismissed();
}
} finally {
service.DefaultInterpreter = originalDefault;
}
}
}
示例3: StartupProjectSelected
public void StartupProjectSelected() {
using (var app = new PythonVisualStudioApp()) {
app.OpenProject(TestData.GetPath(@"TestData\MultiProjectAnalysis\MultiProjectAnalysis.sln"));
foreach (var project in app.Dte.Solution.Projects.Cast<EnvDTE.Project>()) {
var tree = app.OpenSolutionExplorer();
var item = tree.FindByName(project.Name);
item.Select();
app.Dte.ExecuteCommand("Project.SetasStartupProject");
using (var dialog = app.LaunchPythonProfiling()) {
Assert.AreEqual(project.Name, dialog.SelectedProject);
}
app.WaitForDialogDismissed();
}
}
}