Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [%SYS] >  [PTools] >  [Stats]
Private  Storage   

persistent class %SYS.PTools.Stats extends %Persistent, %SYS.PTools.FileCreation

------------------------------------------------------------------------------- Class: %SYS.PTools.Stats Replaces: N/A Purpose: This class is designed to gather performance statistics for any type of routine or code block. The data for this class is stored in the following optimized global: ^%sqlcq($NAMESPACE,"PTools","db","Stats{C|D|I|S|Z}") By calling pairs of the Start() and Stop() methods we will record GlobalRef, commands executed, TimeSpent, and some additional process info for each code block. You need to manually add the calls to the Start() and Stop() methods to your code. Each method takes 3 parameters: NS - The namespace in which the stats collection is occurring Rou - The routine name for which the stats collection is occurring Mod - The module name for which the stats collection is occurring [DEFAULT: 1] For example, when the following code is executed, the three entries will be recorded into the %SYS_PTools.Stats table, one for each call to Stop().

	   Test ;
	      new ns
	      set ns=$NAMESPACE
	      if ns'="SAMPLES" new $NAMESPACE set $NAMESPACE="SAMPLES"  // Change to 'SAMPLES' NS
	      do ##class(%SYS.PTools.Stats).Start($NAMESPACE,"Test","Full_Module")
	      do ##class(%SYS.PTools.Stats).Start($NAMESPACE,"Test","Populate")
	    
	      do ##class(Sample.Person).Populate(100)
	    
	      do ##class(%SYS.PTools.Stats).Stop($NAMESPACE,"Test","Populate")
	      do ##class(%SYS.PTools.Stats).Start($NAMESPACE,"Test","PrintPersons")
	    
	      do ##class(Sample.Person).PrintPersons()
	    
	      do ##class(%SYS.PTools.Stats).Stop($NAMESPACE,"Test","PrintPersons")
	      do ##class(%SYS.PTools.Stats).Stop($NAMESPACE,"Test","Full_Module")
	   QUIT
-------------------------------------------------------------------------------

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
22 9 1 1


Summary

Properties
Counter CursorName DiskWait ExeName GlobalRefs
IPAddress LinesOfCode MachineName ModuleCount ModuleName
NameSpace Pid RoutineInfo RoutineName RowCount
StartTime StatsGroup StatsMarker TimeSpent TimeToFirstRow
TotalTime UserName

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %CheckConstraints
%CheckConstraintsForExtent %ClassIsLatestVersion %ClassName %ComposeOid
%ConstructClone %Delete %DeleteExtent %DeleteId
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Exists
%ExistsId %Extends %GUID %GUIDSet
%GetLock %GetParameter %GetSwizzleObject %Id
%InsertBatch %IsA %IsModified %IsNull
%KillExtent %KillExtentData %LoadFromMemory %LockExtent
%LockId %New %NormalizeObject %ObjectIsNull
%ObjectModified %Oid %OnBeforeAddToSync %OnDetermineClass
%Open %OpenId %OriginalNamespace %PackageName
%PhysicalAddress %PurgeIndices %Reload %RemoveFromSaveSet
%ResolveConcurrencyConflict %RollBack %Save %SaveDirect
%SaveIndices %SerializeObject %SetModified %SortBegin
%SortEnd %SyncObjectIn %SyncTransport %UnlockExtent
%UnlockId %ValidateIndices %ValidateObject CSVtabHead
CSVtabRow DLMtabHead DLMtabRow HTMLtabHead
HTMLtabRow Report Start Stop
TXTtabHead TXTtabRow XMLcolAuto XMLcolWidth
XMLrowHeader XMLsheet XMLsort XMLtabRow
XMLtable clearPToolsError clearStats clearStatsAllNS
condsMatch createAndOpenFile createOrderByList exportStats
fileBody fileFooter fileHeader getOutputFile
getPToolsError openFileForRead version

Subclasses
%SYS.PTools.SQLStats %SYS.PTools.StatsSQL

Properties

• property Counter as %Integer;
This is the number of times the query has been run since the last compile.
• property CursorName as %String(MAXLEN=2000) [ InitialExpression = "*",Required ];
Placeholder (*) indicating that this is not a Cursor Name for an SQL Statement [Used in %SYS.PTools.StatsSQL]
• property DiskWait as %Integer;
Number of Milliseconds spent waiting for Disk reads in this Module for the given query the Modules are nested and the count for the outer ones is cumulative
• property ExeName as %String(MAXLEN=2000);
Name of the executable that ran this query
• property GlobalRefs as %Integer;
How many global references were done in this Module for the given query the Modules are nested and the count for the outer ones is cumulative
• property IPAddress as %String(MAXLEN=100);
IP Address of the machine that ran this query
• property LinesOfCode as %Integer;
How many lines of COS code were executed in this Module for the given query the Modules are nested and the count for the outer ones is cumulative
• property MachineName as %String(MAXLEN=2000);
Name of the machine that ran this query
• property ModuleCount as %String(MAXLEN=100);
Number of times we entered this module for the run of the query Used only by Sub class
• property ModuleName as %String(MAXLEN=2000);
This is the name of the method within a given routine to be analyzed [DEFAULT: 1] This name can be used to distinguish a block of code within a give routine
• property NameSpace as %String(MAXLEN=2000) [ InitialExpression = $NAMESPACE,Required ];
The NameSpace in which the Stats collection is being invoked
• property Pid as %String(MAXLEN=2000);
OS level Process ID
• property RoutineInfo as %String(MAXLEN=4000);
Contains the NameSpace and Routine these stats are for The format is NameSpace|RoutineName This is not used in the %SYS.PTools.SQLStats class
• property RoutineName as %String(MAXLEN=2000) [ Required ];
The name of the routine in which the Stats collection is being invoked
• property RowCount as %Integer;
How many rows did the query return for this run Used only by Sub class
• property StartTime as %TimeStamp;
TimeStamp of when the query was compiled/run
• property StatsGroup as %Integer [ Required ];
This is a unique number that specifies the Stats Collection Group for each query run The counter comes from bumping the following global: ^%sqlcq($NAMESPACE,"PTools","db","StatsZ","StatsGroup",0,{NameSpace},{RoutineName},{ModuleName}) USE: $$$bumpSYSPToolsStatsGroup({NameSpace},{RoutineName},{ModuleName})
• property StatsMarker as %Boolean [ InitialExpression = 0,Required ];
This marker indicates if the statistical data is from an SQL Query, in which case the %SYS.PTools.StatsSQL class should be use, or if these stats are general purpose stats for non-SQL modules, in which case the '%SYS.PTools.Stats' class should be use.
• property TimeSpent as %Float;
How much time was spent in this Module for the given query the Modules are nested and the count for the outer ones is cumulative
• property TimeToFirstRow as %Float;
How much time was spent finding the first row This is only set for Module Main
• property TotalTime as %Float [ Transient ];
Maintained for Backward-Compatibility. See 'TimeSpent'
• property UserName as %String(MAXLEN=2000) [ InitialExpression = $UserName ];
InterSystems IRIS UserName of the person who ran this query

Methods

• classmethod Report(file="", ByRef conds, ByRef ptInfo) as %String [ SQLProc = Stats_Report ]

------------------------------------------------------------------------------- Method: Report [SQL: Stats_Report] Replaces: N/A Status: Maintained for Backward-Compatibility. See exportStats(...) [DEPRECATED] Purpose: This method generates a comma delimited file containing the data from the '%SYS.PTools.Stats' class By default the file will be created in the MGR directory of the InterSystems IRIS instance. You can pass a different value for the 'file' parameters if you wish to override the default location and file name. Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.Stats).Report(...) SQL: CALL %SYS_PTools.Stats_Report(...) SELECT %SYS_PTools.Stats_Report(...) NOTE: This 'SqlProc' method can be invoked with either the CALL-interface or the SELECT-interface. Both interfaces execute the method: the CALL-interface does not return any resulting value, while the SELECT-interface does. Examples: The following examples shows the use of this method: #1 Display this export file to the screen via a InterSystems IRIS Terminal: set io=##class(%SYS.PTools.Stats).Report($IO) #2 Display this export file via the SQL Query Page of the Management Portal: CALL %SYS_PTools.Stats_Report('$IO') Where: '$IO' = Output to the current device NOTE: '$IO' can be omitted, as it is the default 'file' when invoked via the CALL interface Data Storage: ^%sqlcq($NAMESPACE,"PTools","db","Stats{C|D|I|S|Z}") Parameters: file - The path and file in which to create and store the data from the %SYS.PTools.Stats class: (e.g. C:\exportFile.txt) NOTE: $IO = Outputs the data to the screen '$IO' = Output the data to the current device when invoked from the CALL/SELECT-interface '$DEF' = Ouput the data to the DEFAULT file when invoked from the CALL/SELECT-interface [DEFAULT: {MGR-Directory}\{computerName}_{ConfigName}_YYYYMMDD_HHMMSS.Stats] conds - A string/array of possible conditions by which to restrict the output of the Export file, in the following format: conds= OR conds(0)=pos Count (WHERE pos = {1...n}) conds(pos)=$LIST() Pieces: 1) [] (Assumed Default: &&) 2) [{Heading}] (Omit for override cond) 3) | WHERE: := := {&& | ||} (&& = AND | || = OR) @* := @ := @ = Contains no references to {Heading} * = Contains no references to {*} EXAMPLE: conds="("",INFO,MAIN,""[("",""_{Module}_"",""))||({GlobalRefs}>20)" conds(0)=3 conds(1)=$LB(,"Module","=""INFO""") conds(2)=$LB("||","Module","=""MAIN""") conds(3)=$LB("||","GlobalRefs",">20") conds(0)=2 conds(1)=$LB(,"Module",""",INFO,MAIN,""[("",""_{*}_"","")") conds(2)=$LB("||","GlobalRefs","{*}>20") WHERE: {*} = value substitution for the 'Module' & 'GlobalRefs' fields NOTE: Conditions that don't contain any references to {Heading} fields, often called s, can be included as s, as in the following example: conds(pos)=$LB(,,"$g(^zAction(""runIt""))=1") NOTE: All conditions must be satisfied for the conds() to be considered true and for the row to be exported [PASS BY REFERENCE] ptInfo - A Pass By Reference information array that returns to the user the following details: ptInfo(variable)=value ptInfo("outputFile")=The canonical name of the Export/Reporting file RETURN Value: The output locations of the exported data; Otherwise, return the error status if one occurred -------------------------------------------------------------------------------

• classmethod Start(NS As %String, Rou As %String, Mod As %String = 1)

------------------------------------------------------------------------------- Method: Start Replaces: N/A Status: Original Functionality Purpose: This method is used to START the PTools statistics collection Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.Stats).Start(...) SQL: N/A Examples: The following examples shows the use of this method: #1 Start collecting stats to analyze the class 'Populate' method: do ##class(%SYS.PTools.Stats).Start($NAMESPACE,"Test","Populate") do ##class(Sample.Person).Populate(100) do ##class(%SYS.PTools.Stats).Stop($NAMESPACE,"Test","Populate") Data Storage: ^%sqlcq($NAMESPACE,"PTools","db","Stats{C|D|I|S|Z}") Parameters: NS - The namespace in which the stats collection is occurring Rou - The routine name for which the stats collection is occurring Mod - The module name for which the stats collection is occurring [DEFAULT: 1] RETURN Value: (NONE) -------------------------------------------------------------------------------

• classmethod Stop(NS As %String, Rou As %String, Mod As %String = 1)

------------------------------------------------------------------------------- Method: Stop Replaces: N/A Status: Original Functionality Purpose: This method is used to STOP the PTools statistics collection This method INSERTs the stats information into the %SYS_PTools.Stats table Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.Stats).Stop(...) SQL: N/A Examples: The following examples shows the use of this method: #1 Stop collecting stats to analyze the class 'Populate' method: do ##class(%SYS.PTools.Stats).Start($NAMESPACE,"Test","Populate") do ##class(Sample.Person).Populate(100) do ##class(%SYS.PTools.Stats).Stop($NAMESPACE,"Test","Populate") Data Storage: ^%sqlcq($NAMESPACE,"PTools","db","Stats{C|D|I|S|Z}") Parameters: NS - The namespace in which the stats collection is occurring Rou - The routine name for which the stats collection is occurring Mod - The module name for which the stats collection is occurring RETURN Value: (NONE) -------------------------------------------------------------------------------

• classmethod clearPToolsError(errRowID As %String = "") as %Integer [ SQLProc = PT_clearPToolsError ]

------------------------------------------------------------------------------- Method: clearPToolsError [SQL: PT_clearPToolsError] Replaces: N/A Status: New Functionality Purpose: This method deletes a specific 'PTools' Application Error for the given 'errRowID' or Deletes all errors if no 'errRowID' is provided. Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.Stats).clearPToolsError(...) SQL: SELECT %SYS_PTools.PT_clearPToolsError(...) Data Storage: ^%sqlcq($NAMESPACE,"PTools","Error",errRowID) Parameters: errRowID - The 'PTools' Error RowID to delete; If none specified, then delete all recorded PTools errors RETURN Value: The 'PTools' Error RowID ({errRowID}) deleted, the empty string ("") if {errRowID} ivalid, or the word 'all' indicating an array of all errors deleted. -------------------------------------------------------------------------------

• classmethod clearStats(ns="", rtn="", returnType=0) as %Integer [ SQLProc = PT_clearStats ]

------------------------------------------------------------------------------- Method: clearStats [SQL: PT_clearStats] Replaces: N/A Status: New Functionality Purpose: This method deletes all of the data stored in the '%SYS.PTools.Stats' class based on the specified 'ns' and 'rtn' parameters... This method clears statistics which are gathered by the invocation of the following two methods: do ##class(%SYS.PTools.Stats).Start(NS,Rou,Mod) // Start Stats Collection // Invoke the method in which statistics are to be collected do ##class(%SYS.PTools.Stats).Stop(NS,Rou,Mod) // Stop Stats Collection Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.Stats).clearStats(...) SQL: CALL %SYS_PTools.PT_clearStats(...) SELECT %SYS_PTools.PT_clearStats(...) NOTE: This 'SqlProc' method can be invoked with either the CALL-interface or the SELECT-interface. Both interfaces execute the method: the CALL-interface does not return any resulting value, while the SELECT-interface does. Data Storage: ^%sqlcq($NAMESPACE,"PTools","db","Stats{C|D|I|S|Z}") Parameters: ns - The namespace in which to clear Statistics If none provided, use the current namespaces where Stats collected [DEFAULT: Current Namespace] rtn - The routine for which to clear Statistics If none provided, clear all routines in the given 'ns' [OPTIONAL] returnType - 0 = Return a %Status code of either $$$OK or $$$ERROR() 1 = Return the number of Stats deleted from the '%SYS.PTools.Stats' class [DEFAULT: 0] RETURN Value: Based on the value of the 'returnType' parameter, return one of the following: 0: Return a %Status code of either $$$OK or $$$ERROR() 1: Return the number of Stats deleted from the '%SYS.PTools.Stats' class; Otherwise, return an error message if an error occurred. -------------------------------------------------------------------------------

• classmethod clearStatsAllNS(rtn="", returnType=0) as %Integer [ SQLProc = PT_clearStatsAllNS ]

------------------------------------------------------------------------------- Method: clearStatsAllNS [SQL: PT_clearStatsAllNS] Replaces: N/A Status: New Functionality Purpose: This method deletes all of the data stored in the '%SYS.PTools.Stats' class in All Namespaces on a system for which the user has Write privileges (Write infers Read) based on the optional 'rtn' parameter. This method clears statistics in all namespaces which are gathered by the invocation of the following two methods: do ##class(%SYS.PTools.Stats).Start(NS,Rou,Mod) // Start Stats Collection // Invoke the method in which statistics are to be collected do ##class(%SYS.PTools.Stats).Stop(NS,Rou,Mod) // Stop Stats Collection Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.Stats).clearStatsAllNS(...) SQL: CALL %SYS_PTools.PT_clearStatsAllNS(...) SELECT %SYS_PTools.PT_clearStatsAllNS(...) NOTE: This 'SqlProc' method can be invoked with either the CALL-interface or the SELECT-interface. Both interfaces execute the method: the CALL-interface does not return any resulting value, while the SELECT-interface does. Data Storage: ^%sqlcq($NAMESPACE,"PTools","db","Stats{C|D|I|S|Z}") Parameters: rtn - The routine in which to clear SQL Statistics If none provided, clear all routines in all appropriate namespaces [OPTIONAL] returnType - 0 = Return a %Status code of either $$$OK or $$$ERROR() 1 = Return the number of Stats deleted from the '%SYS.PTools.Stats' class [DEFAULT: 0] RETURN Value: Based on the value of the 'returnType' parameter, return one of the following: 0: Return a %Status code of either $$$OK or $$$ERROR() 1: Return the number of Stats deleted from the '%SYS.PTools.Stats' class; Otherwise, return an error message if an error occurred. -------------------------------------------------------------------------------

• classmethod exportStats(file="", format="P", silent=0, statsType=0, rtnName="", modName="", ByRef conds As %ArrayOfObjects, ByRef ptInfo As %ArrayOfObjects, bcFlag="") as %Status [ SQLProc = PT_exportStats ]

------------------------------------------------------------------------------- Method: exportStats [SQL: PT_exportStats] Replaces: Report [DEPRECATED] Status: New Method to replicate Backward-Compatible Method it 'Replaces' Purpose: Create a Performance Tool file containing the data from the '%SYS.PTools.Stats' and return the output location... By default, the file will be created in the current directory of the InterSystems IRIS instance. NOTE: Current directory can be obtained in the following way, from a InterSystems IRIS Terminal: >write $ZU(12,"") You can pass a different value for the 'file' parameters if you wish to override the default location and file name. Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.Stats).exportStats(...) SQL: CALL %SYS_PTools.PT_exportStats(...) SELECT %SYS_PTools.PT_exportStats(...) NOTE: This 'SqlProc' method can be invoked with either the CALL-interface or the SELECT-interface. Both interfaces execute the method: the CALL-interface does not return any resulting value, while the SELECT-interface does. Examples: The following examples shows the use of this method: #1 Display this export file to the screen via a InterSystems IRIS Terminal: set tSC=##class(%SYS.PTools.Stats).exportStats($IO) #2 Display this export file via the SQL Query Page of the Management Portal: CALL %SYS_PTools.PT_exportStats('$IO','H') Where: '$IO' = Output to the current device NOTE: '$IO' can be omitted, as it is the default 'file' when invoked via the CALL interface 'H' = Output the format in HTML format NOTE: 'H' can be omitted, as it is the default 'format' when invoked via the CALL interface Data Storage: ^%sqlcq($NAMESPACE,"PTools","db","Stats{C|D|I|S|Z}") Parameters: file - The path and file in which to create and store the data from the %SYS.PTools.Stats class: (e.g. C:\exportFile.txt) NOTE: $IO = Outputs the data to the screen '$IO' = Output the data to the current device when invoked from the CALL/SELECT-interface '$DEF' = Ouput the data to the DEFAULT file when invoked from the CALL/SELECT-interface [DEFAULT: {Current-Directory}\PT_Stats_exportStats_YYYYMMDD_HHMMSS.{ext}] WHERE {Current-Directory} = The directory of the Namespace in which this method is invoked (e.g. $ZU(12,"")) NOTE 2: If Passed By Reference, then 'file' will be returned as the canonical name of the Export/Reporting file format - The output format of the Export/Reporting file This parameter has the following structure of constituent elements: format=[:$LB(,,)] Where the constituent elements have the following values: - The format of the Export/Reporting file: - P = Printable/Viewable report file (.txt file, no pagination) - D = Comma-delimited data file (.csv file) which can be read into a spreadsheet - X = Microsoft Excel XML markup file suitable for import into Excel (.xml file) - H = HTML page file (.html file) - Z = User-defined delimiter "P" formatted file (.dlm file) NOTE: The element is required or defaulted to $C(9) (TAB) Optional Elements: - User-defined delimiter [DEFAULT: $C(9) (TAB)] NOTE: This is generally used for ="Z" - .csv file header for ="D": - 0 = Don't add non-standard information header to file [DEFAULT] - 1 = Add non-standard information header to file - .csv file footer for ="D": - 0 = Don't add non-standard information footer to file [DEFAULT] - 1 = Add non-standard information footer to file EXAMPLES: Valid 'format' values: - "H" // HTML file - "D" // CSV file with No information header or footer - "D:"_$LB(,1,1) // CSV file with information header & footer - "Z:"_$LB("^") // User-defined delimiter file (delim="^") silent - 0 - Display all messages during the running of this method 1 - Don't display any messages during the running of this method statsType - 0 - Return all rows from %SYS.PTools.Stats ONLY [DEFAULT] 1 - Return all rows from %SYS.PTools.StatsSQL ONLY 2 - Return all rows from %SYS.PTools.Stats & %SYS.PTools.StatsSQL rtnName - If specified, return only the rows where the 'RoutineName' matches the value of this parameter; Otherwise, return rows for all 'RoutineName' values modName - If specified, return only the rows where the 'ModuleName' matches the value of this parameter; Otherwise, return rows for all 'ModuleName' values conds - A string/array of possible conditions by which to restrict the output of the Export file, in the following format: conds= OR conds(0)=pos Count (WHERE pos = {1...n}) conds(pos)=$LIST() Pieces: 1) [] (Assumed Default: &&) 2) [{Heading}] (Omit for override cond) 3) | WHERE: := := {&& | ||} (&& = AND | || = OR) @* := @ := @ = Contains no references to {Heading} * = Contains no references to {*} EXAMPLE: conds="("",INFO,MAIN,""[("",""_{Module}_"",""))||({GlobalRefs}>20)" conds(0)=3 conds(1)=$LB(,"Module","=""INFO""") conds(2)=$LB("||","Module","=""MAIN""") conds(3)=$LB("||","GlobalRefs",">20") conds(0)=2 conds(1)=$LB(,"Module",""",INFO,MAIN,""[("",""_{*}_"","")") conds(2)=$LB("||","GlobalRefs","{*}>20") WHERE: {*} = value substitution for the 'Module' & 'GlobalRefs' fields NOTE: Conditions that don't contain any references to {Heading} fields, often called s, can be included as s, as in the following example: conds(pos)=$LB(,,"$g(^zAction(""runIt""))=1") NOTE: All conditions must be satisfied for the conds() to be considered true and for the row to be exported [PASS BY REFERENCE] ptInfo - A Pass By Reference information array that returns to the user the following details: ptInfo(variable)=value ptInfo("outputFile")=The canonical name of the Export/Reporting file bcFlag - This is a Backward-Compatibility flag used for [Internal Purposes ONLY] RETURN Value: The status from the invocation of this method -------------------------------------------------------------------------------

• classmethod getPToolsError(errRowID As %String = "", PToolsErr As %ArrayOfObjects) as %Integer [ SQLProc = PT_getPToolsError ]

------------------------------------------------------------------------------- Method: getPToolsError [SQL: PT_getPToolsError] Replaces: N/A Status: New Functionality Purpose: This method retrieve a specific 'PTools' Application Error for the given 'errRowID' or retrieve all errors if no 'errRowID' is provided. Invocation: This method can be invoked in the following ways: ObjectScript: ##class(%SYS.PTools.Stats).getPToolsError(...) SQL: SELECT %SYS_PTools.PT_getPToolsError(...) NOTE: 'PTools' Application Errors will be returned in the 'PToolsErr' array as follows: PToolsErr={errRowID} [Counter] PToolsErr({errRowID},0)=$LIST: 1) $HOROLOG [Timestamp Internal] 2) Timestamp External [Timestamp External: YYYY-MM-DD HH:MM:SS] 3) $NAMESPACE [Current Namespace] 4) $JOB [Current $JOB] 5) $ZN [Current Routine] 6) $zu(41) [Stack Level] PToolsErr({errRowID},1)=$LIST: 1) {ns} [Error Namespace] 2) {job} [Error $JOB] 3) {rtn} [Error Routine] 4) {curs} [Error SQL Cursor] 5) {mod} [Error SQL Module] 6) {func} [Error Function/Method] 7) {ze} [Error $ZE] 8) {errMsg} [Error Message] --- SQL Errors --- 9) {class} [Error Class] 10) {table} [Error Table] 11) {SQLCODE} [Error SQLCODE] 12) {%msg} [Error SQL Message] PToolsErr({errRowID},2)=errLog(errLogID)=errLogMsg PToolsErr({errRowID},2,{errLogID})={errLogMsg} Parameters: errRowID - The 'PTools' Error RowID to retrieve; If none specified, then retrieve all errors into the 'PToolsErr()' array PToolsErr - An array in which the 'PTools' Application Errors will be returned [PASS BY REFERENCE] RETURN Value: The 'PTools' Error RowID ({errRowID}) retrieved, the empty string ("") if {errRowID} ivalid, or the word 'all' indicating an array of all errors returned. -------------------------------------------------------------------------------

• classmethod version() as %String [ SQLProc = Stats_version ]
Provide the current version for the %SYS.PTools.Stats class/section of the Performance Tools (PTools) Application

Indices

•index (IDKEY on StatsMarker,NameSpace,RoutineName,CursorName,StatsGroup,ModuleName) [IdKey];

Triggers

•trigger OnDelete (AFTER event DELETE)


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.