Skip to main content

%CSP.Util.Performance

persistent class %CSP.Util.Performance extends %Library.Persistent

SQL Table Name: %CSP_Util.Performance

This class is designed to map an existing global named ^["%SYS"]ISCcspPerformance which contains data about the CSP/ZEN Performance as long as the PAGETIMING parameter is set to 1 in the page. It contais data about each time a CSP/ZEN page is executed: Day, Time Slot, Hits, Global References, Lines Executed, and Maximum, Minimum and Total Execution Time. This class will allow SQL access to the data. Some sample queries are provided. One step further will be DeepSee enable it, to be able to use DeepSee against this data.

Property Inventory

Properties

property Day as %String (TRUNCATE = 1) [ Required ];
Date in YYYY-MM-DD format
Property methods: DayDisplayToLogical(), DayGet(), DayIsValid(), DayLogicalToDisplay(), DayLogicalToOdbc(), DayNormalize(), DaySet()
property Event as %String (TRUNCATE = 1) [ Required ];
Indicates the type of the event (currently there is only one event named 'Page')
Property methods: EventDisplayToLogical(), EventGet(), EventIsValid(), EventLogicalToDisplay(), EventLogicalToOdbc(), EventNormalize(), EventSet()
property Globals as %Numeric (SCALE = 0);
Number of global references (read/write)
Property methods: GlobalsDisplayToLogical(), GlobalsGet(), GlobalsIsValid(), GlobalsLogicalToDisplay(), GlobalsNormalize(), GlobalsSet()
property GlobalsPerHit as %Integer [ Calculated ];
Property methods: GlobalsPerHitCompute(), GlobalsPerHitDisplayToLogical(), GlobalsPerHitGet(), GlobalsPerHitIsValid(), GlobalsPerHitLogicalToDisplay(), GlobalsPerHitNormalize(), GlobalsPerHitSQLCompute()
property Hits as %Numeric (SCALE = 0);
Number of times the page was executed
Property methods: HitsDisplayToLogical(), HitsGet(), HitsIsValid(), HitsLogicalToDisplay(), HitsNormalize(), HitsSet()
property Lines as %Numeric (SCALE = 0);
Number of lines of COS code executed
Property methods: LinesDisplayToLogical(), LinesGet(), LinesIsValid(), LinesLogicalToDisplay(), LinesNormalize(), LinesSet()
property LinesPerHit as %Integer [ Calculated ];
Property methods: LinesPerHitCompute(), LinesPerHitDisplayToLogical(), LinesPerHitGet(), LinesPerHitIsValid(), LinesPerHitLogicalToDisplay(), LinesPerHitNormalize(), LinesPerHitSQLCompute()
property MaxTime as %Numeric (SCALE = 6);
Maximum Page execution time
Property methods: MaxTimeDisplayToLogical(), MaxTimeGet(), MaxTimeIsValid(), MaxTimeLogicalToDisplay(), MaxTimeNormalize(), MaxTimeSet()
property MinTime as %Numeric (SCALE = 6);
Minimum Page execution time
Property methods: MinTimeDisplayToLogical(), MinTimeGet(), MinTimeIsValid(), MinTimeLogicalToDisplay(), MinTimeNormalize(), MinTimeSet()
property Page as %String (MAXLEN = 256, TRUNCATE = 1) [ Required ];
The full CSP page name, includes the application name
Property methods: PageDisplayToLogical(), PageGet(), PageIsValid(), PageLogicalToDisplay(), PageLogicalToOdbc(), PageNormalize(), PageSet()
property Slot as %Integer [ Required ];
The particular Slot within the Day the hit occured The total number of Time Slots in a day is defined in the page with the TIMINGSLOTS parameter
Property methods: SlotDisplayToLogical(), SlotGet(), SlotIsValid(), SlotLogicalToDisplay(), SlotNormalize(), SlotSet()
property TotalTime as %Numeric (SCALE = 6);
Total accumulated Page execution time
Property methods: TotalTimeDisplayToLogical(), TotalTimeGet(), TotalTimeIsValid(), TotalTimeLogicalToDisplay(), TotalTimeNormalize(), TotalTimeSet()

Queries

query PageAndDay(Page As %String, Day As %String = {""_$zdate($h, 3)})
SQL Query:
SELECT Hits,Globals,GlobalsPerHit,Lines,LinesPerHit,MaxTime,MinTime,TotalTime,Page,Day,Slot FROM %CSP_Util.Performance WHERE (Page = :Page AND Day = :Day) ORDER BY Slot
query Top10Pages(from As %String, until As %String)
SQL Query:
SELECT TOP 10 Page, Hits FROM %CSP_Util.Performance WHERE Day BETWEEN :from AND :until GROUP BY Page ORDER BY Hits DESC
top pages in number of Hits in a period of time

Indexes

index (IdKeyIdx on Event,Page,Day,Slot) [IdKey, Type = key, Unique];
Index methods: IdKeyIdxCheck(), IdKeyIdxDelete(), IdKeyIdxExists(), IdKeyIdxOpen(), IdKeyIdxSQLCheckUnique(), IdKeyIdxSQLExists(), IdKeyIdxSQLFindPKeyByConstraint(), IdKeyIdxSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: SQLStorage

Maps: 1

  • Map number 1 is named Map1

    thismap.Global: ^["%SYS"]ISCcspPerformance

  • ^["%SYS"]ISCcspPerformance({Event},{Page},{Day},{Slot})
    =
    Node Delimiter Piece Name
    "globals" "^" 1 Globals
    "hit" "^" 1 Hits
    "lines" "^" 1 Lines
    "max" "^" 1 MaxTime
    "min" "^" 1 MinTime
    "time" "^" 1 TotalTime
FeedbackOpens in a new tab