Skip to content

Commit

Permalink
Merge branch 'master' into DYN-2332-Draft
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaylo-matov authored Jul 31, 2024
2 parents 0f137c8 + 459f1e2 commit 8bd638a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
10 changes: 8 additions & 2 deletions TuneUp/TuneUpViewExtension.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using System.Windows.Controls;
using Dynamo.Wpf.Extensions;

Expand Down Expand Up @@ -45,11 +46,12 @@ public override void Loaded(ViewLoadedParams p)
{
p.AddToExtensionsSideBar(this, TuneUpView);
ViewModel.SwitchToManualMode();
ViewModel.EnableProfiling();
ViewModel.EnableProfiling();
}
else
{
p.CloseExtensioninInSideBar(this);
ViewModel.DisableProfiling();
}
};

Expand Down Expand Up @@ -110,6 +112,10 @@ public override void Closed()
if (this.TuneUpMenuItem != null)
{
this.TuneUpMenuItem.IsChecked = false;

// Reset DataGrid sorting order & direction
ViewModel.SortingOrder = "number";
ViewModel.SortDirection = System.ComponentModel.ListSortDirection.Ascending;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion TuneUp/TuneUpWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
<StackPanel Grid.Row="2">
<DataGrid
x:Name="NodeAnalysisTable"
Grid.Row="2"
Grid.Row="2"
ItemsSource="{Binding Path=ProfiledNodesCollection.View}"
Style="{StaticResource DataGridStyle1}"
AutoGenerateColumns="False"
Expand Down
1 change: 1 addition & 0 deletions TuneUp/TuneUpWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
return DefaultBrush;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)

{
throw new NotImplementedException();
}
Expand Down
13 changes: 6 additions & 7 deletions TuneUp/TuneUpWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public bool ShowHotspotsEnabled
set
{
showHotspotsEnabled = value;
SetNodeHotspotStae();
SetNodeHotspotState();
RaisePropertyChanged(nameof(ShowHotspotsEnabled));
}
}
Expand All @@ -233,7 +233,7 @@ public int HotspotMinValue
{
hotspotMinValue = value;
RaisePropertyChanged(nameof(HotspotMinValue));
SetNodeHotspotStae();
SetNodeHotspotState();
}
}
}
Expand All @@ -250,7 +250,7 @@ public int HotspotMaxValue
{
hotspotMaxValue = value;
RaisePropertyChanged(nameof(HotspotMaxValue));
SetNodeHotspotStae();
SetNodeHotspotState();
}
}
}
Expand Down Expand Up @@ -280,8 +280,7 @@ public string TotalGraphExecutiontime
return (PreviousExecutionTimeRow?.ExecutionMilliseconds + CurrentExecutionTimeRow?.ExecutionMilliseconds).ToString() + "ms";
}
}



#endregion

#region Constructor
Expand Down Expand Up @@ -554,7 +553,7 @@ private void CalculateGroupNodes()
/// <summary>
/// Updates the hotspot state of all nodes based on execution time and configured hotspot values.
/// </summary>
private void SetNodeHotspotStae()
private void SetNodeHotspotState()
{
foreach (var node in nodeDictionary.Values)
{
Expand Down Expand Up @@ -731,7 +730,7 @@ private void CurrentWorkspaceModel_GroupRemoved(AnnotationModel group)
}
groupDictionary.Remove(groupGUID);
}

RaisePropertyChanged(nameof(ProfiledNodesCollection));
RaisePropertyChanged(nameof(ProfiledNodes));
}
Expand Down
2 changes: 1 addition & 1 deletion TuneUp/manifests/pkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"license": "",
"file_hash": null,
"name": "TuneUp",
"version": "1.0.8",
"version": "1.0.9",
"description": "*** THE TUNEUP EXTENSION USES NEW API FEATURES THAT ARE ONLY AVAILABLE IN DYNAMO VERSION 2.5 OR ABOVE ***\r\n\r\nTuneUp is in beta and 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 are skipped this run for optimization/ caching). Read more here: https://dynamobim.org/tuneup-extension-explore-your-node-and-graph-execution-times/ \r\n\r\nKnown issues:\r\n1. TuneUp does not work with .dyfs (custom nodes) yet.\r\n2.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.\r\n3. TuneUp requires Dynamo 3.0 or higher for access to new extension APIs.\r\n4. When user have TuneUp open, after switching workspace in Dynamo, the first graph run does not give execution time and nodes order.",
"group": "",
"keywords": [
Expand Down

0 comments on commit 8bd638a

Please sign in to comment.