-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DYN-1754: As a developer I want detailed per node profiling during perf benchmarks #9667
Changes from 1 commit
56dbd73
eec64b9
4362151
75643c7
6a07e6c
38b8461
44a00a8
5c04a06
a21fd6a
4235133
302b9dd
6bf5548
8d4511b
8f9df0f
e91ef30
82373cc
1434ba0
706974c
760ae95
6ffd883
5b1c073
f11f924
710c7ee
e8f5ade
f740c1d
7644f6b
dc0eb40
7e903d2
c1aee1d
3fc8b74
c5d3a1d
0cb178c
c463ba3
f13049c
c228452
43129bd
320ae6b
6eb5cc5
edb88eb
b94aefd
9caccd6
995ee9b
8e902db
3cb15a7
7a82082
9173bc8
87564af
686f72c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
using Dynamo.Engine.NodeToCode; | ||
using Dynamo.Engine.Profiling; | ||
using Dynamo.Graph.Nodes; | ||
using Dynamo.Graph.Workspaces; | ||
using Dynamo.Logging; | ||
using Dynamo.Scheduler; | ||
using ProtoCore.AST.AssociativeAST; | ||
|
@@ -69,7 +70,7 @@ private void OnTraceReconciliationComplete(TraceReconciliationEventArgs e) | |
/// </summary> | ||
public static CompilationServices CompilationServices; | ||
|
||
internal ProfilingSession profilingSession; | ||
internal ProfilingSession profilingSession = null; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have moved the ownership of the profiling data into the ASTBuilder only. Latest changes have just been pushed. |
||
|
||
/// <summary> | ||
/// Returns DesignScript core. | ||
|
@@ -125,7 +126,6 @@ public EngineController(LibraryServices libraryServices, string geometryFactoryF | |
this.libraryServices = libraryServices; | ||
libraryServices.LibraryLoaded += LibraryLoaded; | ||
CompilationServices = new CompilationServices(libraryServices); | ||
profilingSession = new ProfilingSession(); | ||
|
||
liveRunnerServices = new LiveRunnerServices(this, geometryFactoryFileName); | ||
|
||
|
@@ -151,6 +151,33 @@ public void Dispose() | |
codeCompletionServices = null; | ||
} | ||
|
||
/// <summary> | ||
/// Enables or disables profiling depending on the given argument | ||
/// </summary> | ||
/// <param name="enable">Indicates enabling or disabling of profiling.</param> | ||
/// <param name="workspace">The workspace to enable or disable profiling for.</param> | ||
/// <param name="nodes">The list of nodes to enable or disable profiling for.</param> | ||
public void EnableProfiling(bool enable, HomeWorkspaceModel workspace, IEnumerable<NodeModel> nodes) | ||
{ | ||
Validity.Assert(workspace != null, "Workspace csannot be null"); | ||
Validity.Assert(nodes != null, "Node list csannot be null"); | ||
|
||
if (enable) | ||
{ | ||
if (profilingSession == null) | ||
{ | ||
profilingSession = new ProfilingSession(); | ||
} | ||
} | ||
else | ||
{ | ||
profilingSession = null; | ||
} | ||
|
||
astBuilder.SetProfilingSession(profilingSession); | ||
workspace.MarkNodesAsModifiedAndRequestRun(nodes); | ||
} | ||
|
||
#region Function Groups | ||
|
||
/// <summary> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this internal for a specific reason? (sorry have not looked further down to see if that's the case yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, has been changed to be private now