finishtimecheck
TASKNAME

The finishtimecheck statement finishes a performance monitoring session.


Parameters

This statement has one parameter:

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.


Description

This statement finishes 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.

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, when the finishtimecheck statement is encountered, 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:

settimechecklongtime 1000

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.)


See Also


History

VersionStatusNotes
10.2NewNew in this version.