diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..174f668 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,21 @@ + + + net8.0-windows + true + 512 + false + false + false + + + + 3.2.1.5366 + 1.3.2 + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 4d007e6..ae3b999 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ TuneUp is in `beta`. TuneUp is a view extension for analyzing the performance of Dynamo graphs. TuneUp allows you to see overall graph execution time, per-node execution time, and other helpful information about what's happening under the hood, e.g. nodes run in the current execution v.s. nodes run in the previous execution (which were skipped during the most recent graph run for optimization/ caching). -Here is a short demo of how to utilize it as of now: +Here is a short demo of how to utilize it as of now (now loading from the Extensions menu): ![TuneUp](design/gifs/TuneUpScroll.gif) Here is a mock up of the future design: @@ -16,8 +16,8 @@ Here is a mock up of the future design: ### Recommended Build Environment -- VisualStudio 2019 -- .Net Framework 4.7 Developer Pack +- VisualStudio 2022 or later +- .NET 8.0 Developer Pack - Dynamo repository cloned and built on the same level of TuneUp repository which means your Dynamo repo and TuneUp repo should exist under the same parent folder. ### Result Binaries @@ -32,7 +32,7 @@ Under `TuneUp\dist\TuneUp`, there is a sample package wrapped up ready for publi - TuneUp does not work with .dyfs (custom nodes) yet. - TuneUp binaries are not semantically versioned and are not intended to be built on top of as an API. Do not treat these binaries like DynamoCore. -- TuneUp requires Dynamo 2.5 or higher for access to new extension APIs. +- TuneUp requires Dynamo 3.0 or higher for access to new extension APIs. - When user have TuneUp open, after switching workspace in Dynamo, the first graph run does not give execution time and nodes order. - Although it's not an issue by itself, TuneUp profiles the execution of graphs even if not showing on the extension bar. - In some cases TuneUp may calculate incorrect execution times for nodes, we cannot reproduce this consistently, if you see this occur and can reproduce it please file an issue! @@ -43,7 +43,7 @@ Under `TuneUp\dist\TuneUp`, there is a sample package wrapped up ready for publi Please check out known issues before trying to setup testing. -- Download DynamoCoreRuntime 2.5.0 (or higher) from [dynamobuilds.com](https://dynamobuilds.com/). Alternatively, you can build Dynamo from Dynamo repository and use the bin folder equivalently. +- Download DynamoCoreRuntime 3.0.0 (or higher) from [dynamobuilds.com](https://dynamobuilds.com/). Alternatively, you can build Dynamo from Dynamo repository and use the bin folder equivalently. - Copy all contents of the DynamoCoreRuntime to `TuneUp\TuneUpTests\bin\Debug\`. If you are building Dynamo locally, copy all contents of Dynamo from `Dynamo/bin/AnyCPU/Debug` to `TuneUp\TuneUpTests\bin\Debug\` - Copy `TuneUp_ViewExtensionDefinition.xml` from `TuneUp\TuneUp\manifests\` to `TuneUp\TuneUpTests\bin\Debug\viewExtensions\` - Open the copied `TuneUp_ViewExtensionDefinition.xml` and change the assemply path to `..\TuneUp.dll` @@ -52,6 +52,6 @@ Please check out known issues before trying to setup testing. ### Running TuneUp Unit Tests -- Install NUnit 2 Test Adapter from VisualStudio->Extensions->Manage Extensions->Online. +- Install NUnit3TestAdapter from VisualStudio->Extensions->Manage Extensions->Online. - Open Test Explorer from VisualStudio->Test->Test Explorer. Now you should see a list of TuneUpTests. - Click the target test to run or run them all. diff --git a/TuneUp/TuneUp.csproj b/TuneUp/TuneUp.csproj index 13550b2..ce983c7 100644 --- a/TuneUp/TuneUp.csproj +++ b/TuneUp/TuneUp.csproj @@ -1,23 +1,16 @@ - - + + - Debug - AnyCPU - 8.0.30703 - 2.0 - {6FF12D3A-025E-49A5-A773-D99AB82778A3} - Library - Properties + net8.0-windows TuneUp TuneUp - v4.8 + Library Program - C:\Program Files\Dynamo\Dynamo Core\2\DynamoSandbox.exe - 512 - PackageReference - + C:\Program Files\Dynamo\Dynamo Core\3.2\DynamoSandbox.exe + false - + + true full false @@ -26,7 +19,8 @@ prompt 4 - + + pdbonly true bin\Release\ @@ -34,6 +28,7 @@ prompt 4 + @@ -48,62 +43,61 @@ + + TuneUpWindow.xaml - + Designer MSBuild:Compile + - - 2.12.0.5650 - runtime - compile; build; native; contentfiles; analyzers - - - 2.12.0.5650 - runtime - compile; build; native; contentfiles; analyzers - - - 2.12.0.5650 - runtime - compile; build; native; contentfiles; analyzers - + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + - - + - 2.12 + 3.2 TuneUp $(ProjectDir)dist\$(PackageName)\ $(PackageFolder)bin\ $(PackageFolder)extra\ $(PackageFolder)dyf\ + + @@ -116,10 +110,11 @@ - - + + + @@ -135,7 +130,7 @@ - - + + \ No newline at end of file diff --git a/TuneUp/TuneUpViewExtension.cs b/TuneUp/TuneUpViewExtension.cs index d31875a..fa83d03 100644 --- a/TuneUp/TuneUpViewExtension.cs +++ b/TuneUp/TuneUpViewExtension.cs @@ -54,7 +54,11 @@ public override void Loaded(ViewLoadedParams p) // Add this view extension's menu item to the Extensions tab or View tab accordingly. var dynamoMenuItems = p.dynamoMenu.Items.OfType(); - var extensionsMenuItem = dynamoMenuItems.Where(item => item.Header.ToString() == "_Extensions"); + // TODO: Investigate why TuneUpMenuItem is not added to the specified MenuItem + // When _Extensions is specified, TuneUpMenuItem goes to the View menu in Dynamo 3.0- + // and does not appear in Dynamo 3.1+. + // We need to specify _View for TuneUpMenuItem to be added to the Extensions menu + var extensionsMenuItem = dynamoMenuItems.Where(item => item.Header.ToString() == "_View"); if (extensionsMenuItem.Count() > 0) { diff --git a/TuneUpTests/TuneUpTests.cs b/TuneUpTests/TuneUpTests.cs index 09c61e5..4fd1040 100644 --- a/TuneUpTests/TuneUpTests.cs +++ b/TuneUpTests/TuneUpTests.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Threading; using System.Windows; using System.Windows.Controls; using Dynamo.Graph.Workspaces; @@ -30,7 +31,7 @@ internal TuneUpViewExtension GetTuneUpViewExtension() return tuneUpVE as TuneUpViewExtension; } - [Test, RequiresSTA] + [Test, Apartment(ApartmentState.STA)] public void TuneUpCreatesProfilingDataForEveryNodeInWorkspace() { // Open test graph @@ -63,7 +64,7 @@ public void TuneUpCreatesProfilingDataForEveryNodeInWorkspace() } } - [Test, RequiresSTA] + [Test, Apartment(ApartmentState.STA)] public void TuneUpMaintainsProfiledNodeState() { // Open test graph @@ -122,7 +123,7 @@ public void TuneUpMaintainsProfiledNodeState() } } - [Test, RequiresSTA] + [Test, Apartment(ApartmentState.STA)] public void TuneUpDeterminesCorrectNodeExecutionOrder() { // Expected execution order diff --git a/TuneUpTests/TuneUpTests.csproj b/TuneUpTests/TuneUpTests.csproj index 883c770..e377d52 100644 --- a/TuneUpTests/TuneUpTests.csproj +++ b/TuneUpTests/TuneUpTests.csproj @@ -1,36 +1,28 @@  - - + + + - Debug - AnyCPU - {B6817785-AFD9-4AF5-9562-5808E74B53E7} - Library - Properties + net8.0-windows TuneUpTests TuneUpTests - v4.8 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + Library + Properties False UnitTest - - - - + + true - full + portable false bin\Debug\ DEBUG;TRACE prompt 4 - + + pdbonly true bin\Release\ @@ -38,6 +30,7 @@ prompt 4 + @@ -53,39 +46,39 @@ + + {6ff12d3a-025e-49a5-a773-d99ab82778a3} TuneUp + - - 2.12.0.5650 - - - 2.12.0.5650 - - - 2.12.0.5650 - - - 2.12.0.5650 - - - 1.3.2 - - - 1.3.2 - - - 2.2.0 - + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + + runtime + compile; build; native; contentfiles; analyzers + + + + - \ No newline at end of file