GetPerformanceDocument (NotesAgent - LotusScript®)

Returns the latest profiling results for an agent.

Note: This method is new with Release 7.
Note: This method is not implemented in COM.

Defined in

NotesAgent

Syntax

notesDocument = notesAgent .GetPerformanceDocument

Return value

notesDocument

NotesDocument. The profiling results. This object is considered read-only; results are undefined if you write to it. Returns Nothing if no profiling results are available.

Usage

Use of the returned NotesDocument object as the second parameter of EditDocument in NotesUIWorkspace opens the profiling results as a UI document.

Profiling results are presented in a document based on the hidden form $BEProfile. The result document contains a heading listing the name of the agent and the creation time. The Body item of the result document contains a table with a row for each Domino® Objects method called and five columns:

  • Class -- The name of a Domino® Objects class using normalized names such as Session, Database, and Document.
  • Method -- The name of a Domino® Objects method or property using normalized names such as CurrentDatabase, AppendItemValue, and Save.
  • Operation -- For properties, the type of operation: Get or Set.
  • Calls -- The number of times the method or property was called.
  • Time -- The amount of time the calls consumed in milliseconds. The symbol "<" means not enough time to calculate.

This method fails to find the $BEProfile form when it runs in the Notes® client if no profile results were previously viewed for any agent in the database. This is because the Notes® cache does not contain the newly-created form and cannot be refreshed. The user must close and reopen the database, and if this fails, close and reopen Notes®. Alternatively, you can first view profiling results for an agent in the database from the Designer UI.

To enable profiling in an agent, select the Security tab of the properties box and check "Profile this agent." Profiling occurs each time an enabled agent runs. Agent profiling occurs on both the Notes® client and Domino® server.

To view the profiling results from the UI, select the agent and choose Agent - View Profile Results.

Example