Skip to content
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

Track Dynamo performance #10

Open
andydandy74 opened this issue Nov 24, 2017 · 0 comments
Open

Track Dynamo performance #10

andydandy74 opened this issue Nov 24, 2017 · 0 comments
Assignees

Comments

@andydandy74
Copy link
Owner

andydandy74 commented Nov 24, 2017

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.

@andydandy74 andydandy74 added this to the Post-Release milestone May 9, 2018
@andydandy74 andydandy74 self-assigned this Nov 30, 2018
@andydandy74 andydandy74 removed this from the Post-Release milestone Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

1 participant