The timecheck statement identifies an intermediate point in a performance monitoring session.
This statement has two parameters:
taskname – is the name of the task. If this is omitted, the database+procedure name will be used as the task name. Multiple tasks can be running at once, each will be timed independently.
pointname – is the name of the intermediate point. This will appear in the final output of the session.
This statement identifies an intermediate point in a performance monitoring session. During a session, Panorama will record the amount of time (in milliseconds) needed to complete each section of code. The code being tested starts with the starttimecheck statement, ends with the finishtimecheck statement, and uses the timecheck statement at intermediate points. Each of these statements must use the same task name (unless you are timing multiple tasks at once). In this example, the task name is SlowThing, and there are two intermediate points, part one complete and part two complete.
starttimecheck "SlowThing" .. .. perform first part of task .. timecheck "SlowThing","part one complete" .. .. perform second part of task .. timecheck "SlowThing","part two complete" .. .. perform third part of task .. finishtimecheck "SlowThing"
At the end of the session, Panorama will output the session timing results to the console (the best way to see this is to run Panorama X using Terminal.app). The results from the session above will look something like the this:
TIMED TASK: SlowThing 00108 part one complete 00542 🔥 part two complete 00193 complete 00843 END TIMED TASK: SlowThing
In this example, the first part of the code took about 1/10th second to complete (108 milliseconds), the second part took about 1/2 second (542 milliseconds), and the last part took about 1/5th second (193 milliseconds). The entire task took 843 milliseconds.
Notice that the second section of the task has a 🔥 emoji after the timing value. This is used to highlight any sections that took a particularly long time. By default, this will appear for any section of code that takes more than 1/4th second (250 milliseconds). If you want to change the threshold for when the 🔥 emoji appears, use the settimechecklongtime statement, like this:
This example sets the threshold to one second. (Note: The threshold will remain set until you change it again, or until you quit and relaunch Panorama.)
|10.2||New||New in this version.|