Last active
December 18, 2015 14:19
-
-
Save aleskiontherun/5796678 to your computer and use it in GitHub Desktop.
A list of pinba functions with phpdoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Creates and starts new timer. | |
* @param array $tags an array of tags and their values in the form of "tag" => "value". Cannot contain numeric indexes for obvious reasons. | |
* @param array $data optional array with user data, not sent to the server. | |
* @return resource Always returns new timer resource. | |
*/ | |
function pinba_timer_start($tags, $data = array()){} | |
/** | |
* Stops the timer. | |
* @param resource $timer valid timer resource. | |
* @return bool Returns true on success and false on failure (if the timer has already been stopped). | |
*/ | |
function pinba_timer_stop($timer){} | |
/** | |
* Creates new timer. This timer is already stopped and have specified time value. | |
* @param array $tags an array of tags and their values in the form of "tag" => "value". Cannot contain numeric indexes for obvious reasons. | |
* @param int $value timer value for new timer. | |
* @param array $data optional array with user data, not sent to the server. | |
* @return resource Always returns new timer resource. | |
*/ | |
function pinba_timer_add($tags, $value, $data = array()){} | |
/** | |
* Deletes the timer. | |
* @param resource $timer valid timer resource. | |
* @return bool Returns true on success and false on failure. | |
* @since 0.0.6 | |
*/ | |
function pinba_timer_delete($timer){} | |
/** | |
* Merges $tags array with the timer tags replacing existing elements. | |
* @param resource $timer valid timer resource. | |
* @param array $tags an array of tags. | |
* @return bool Returns true on success and false on failure. | |
*/ | |
function pinba_timer_tags_merge($timer, $tags){} | |
/** | |
* Replaces timer tags with the passed $tags array. | |
* @param resource $timer valid timer resource. | |
* @param array $tags an array of tags. | |
* @return bool Returns true on success and false on failure. | |
*/ | |
function pinba_timer_tags_replace($timer, $tags){} | |
/** | |
* Merges $data array with the timer user data replacing existing elements. | |
* @param resource $timer valid timer resource. | |
* @param array $tags an array of tags. | |
* @return bool Returns true on success and false on failure. | |
*/ | |
function pinba_timer_data_merge($timer, $tags){} | |
/** | |
* Replaces timer user data with the passed $data array. | |
* Use NULL value to reset user data in the timer. | |
* @param resource $timer valid timer resource. | |
* @param array $data an array of user data. | |
* @return bool Returns true on success and false on failure. | |
*/ | |
function pinba_timer_data_replace($timer, $data){} | |
/** | |
* Returns timer data. | |
* @param resource $timer valid timer resource. | |
* @return array | |
*/ | |
function pinba_timer_get_info($timer){} | |
/** | |
* Stops all running timers. | |
* @return bool | |
*/ | |
function pinba_timers_stop(){} | |
/** | |
* Returns all request data (including timers user data). | |
* @return array | |
*/ | |
function pinba_get_info(){} | |
/** | |
* Set custom script name instead of $_SERVER['SCRIPT_NAME'] used by default. | |
* Useful for those using front controllers, when all requests are served by one PHP script. | |
* @param string $script_name | |
* @return bool | |
*/ | |
function pinba_script_name_set($script_name){} | |
/** | |
* Set custom hostname instead of the result of gethostname() used by default. | |
* @param string $hostname | |
* @return bool | |
*/ | |
function pinba_hostname_set($hostname){} | |
/** | |
* Useful when you need to send request data to the server immediately (for long running scripts). | |
* You can use optional argument script_name to set custom script name. | |
* @param string $script_name | |
* @param int $flags an optional argument added in version 1.0.0. | |
* | |
* Possible values (it's a bitmask, so you can add the constants): | |
* | |
* PINBA_FLUSH_ONLY_STOPPED_TIMERS - flush only stopped timers (by default all existing timers are stopped and flushed) - available since v. 1.0.0. | |
* | |
* PINBA_FLUSH_RESET_DATA - reset common request data - available since version 1.1.0. | |
* | |
* @return void | |
*/ | |
function pinba_flush($script_name = '', $flags = 0){} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment