npTime plugin

About this plugin

This plugin allow you to get the measure execution of your publication source code in an easy way. Simply use the Profiler Timers that you want and get a lot of information around the source code execution. Each Profiler Timers provide a lot information.

The number of times that the timer was activated (hit count), the total execution time, the average execution time on each hit, execution time on the first hit, execution time on the last hit, the hit with minimum execution time and the hit with maximum execution time.

Thirparty

This plugin are imposible without the aid of this people:

Thanks a lot!

Plugin actions index

npTimerStart

Start a profiler timer by their name. You can use the timer name in other plugin actions, like npTimerRawData.

↑↑

npTimerStop

Stop a profiler timer by their name. To get the timer data you can use npTimerRawData and/or npTimerTextData.

↑↑

npTimerReset

Reset the data of a timer. This action reset all possible data previosly stored in a profiler timer.

↑↑

npTimerRawData

Retrieve the raw data of a profiler timer. You can choose one of the possible values for the timer unit variable:

The raw data variable store a zero indexed NeoBook Array with the following 9 elements:

↑↑

npTimerTextData

Retrieve the data as text of a profiler timer. You can use with the timer unit variable the same values that is described in the npTimerRawData action.

The text data variable store a zero indexed NeoBook Array with the following 7 elements:

↑↑

npOnTimerStart

Set a subroutine to be executed when a profiler timer has being started. The timer name variable store the name of the profiler timer.

↑↑

npOnTimerStop

Set a subroutine to be executed when a profiler timer has being stopped. The timer name variable store the name of the profiler timer.

↑↑

Action errors subroutine

All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.

But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:

Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:

:OnNeoPluginActionError
  AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]"
Return

Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.

↑↑