Skip to content

Track Dynamo performance #10

@andydandy74

Description

@andydandy74

I think these are the only Dynamo related events that can be measured fairly reliably...

Launching Dynamo
JournalCommand via ribbon:

Jrn.Command "Ribbon" , "Launch Dynamo , ID_VISUAL_PROGRAMMING_DYNAMO"

JournalCommand via keyboard shortcut:

Jrn.Command "KeyboardShortcut" , "Launch Dynamo , ID_VISUAL_PROGRAMMING_DYNAMO"

There's a JournalTimeStamp in the previous line and JournalMemoryMetrics in the following line or one line after that.
So we can take the timestamp of that block and the first memory metrics we find in that block.

Shutting down Dynamo
Shutdown is completed once we see this JournalAPIMessage:

' 1:< API_SUCCESS { Unregistering Idling event by application Dynamo For Revit (8d83c886-b739-4acd-a9db-1bc78f315b2b). } 

There's usually a JournalTimeStamp right after that, so basically the time stamp of the next block.

Launching Dynamo Player
JournalCommand via ribbon:

Jrn.Command "Ribbon" , "Launch Dynamo Playlist , ID_FILE_TOPOSURFACE_LINK"

JournalCommand via keyboard shortcut:

Jrn.Command "KeyboardShortcut" , "Launch Dynamo Playlist , ID_FILE_TOPOSURFACE_LINK"

:-) Interesting command ID...
There's a JournalTimeStamp in the previous line and JournalMemoryMetrics in the following line or one line after that.
So we can take the timestamp of that block and the first memory metrics we find in that block.
Note that this will always be followed up by another call to Dynamo Player (JournalCommand as keyboard shortcut) - I suppose this may mark the first time a script is played.

Shutting down Dynamo Player
Undetectable since it's not a Revit addin per se

Running a script in manual mode
Start:

Jrn.AddInEvent "AddInJournaling" , "WpfWindow(_this,Dynamo).WpfButton(0,RunButton).Click()"

The previous line has the JournalTimeStamp and there's JournalMemoryMetrics and JournalGUIResourceUsage info directly before it and after the JournalAddinEvent.

End:
In Dynamo 1.0:

Jrn.Data "Transaction Successful" , "Dynamo Script"

In Dynamo 1.3:

Jrn.Data "Transaction Successful" , "Dynamo-51297CB5 Script"

Again, the previous line has the JournalTimeStamp. After a JournalComment there's the JournalMemoryMetrics and JournalGUIResourceUsage info.

Running a script in automatic mode
Only the end of execution will be marked with a JournalData line (see above), but that block does not necessarily contain any JournalMemoryMetrics.

Running a script in Dynamo Player
Only the end of execution will be marked with a JournalData line (see above), that block usually also contains a JournalMemoryMetrics line.

Metadata

Metadata

Assignees

Projects

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions