Back to index

php5  5.3.10
mysqli_report.h
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Author: Georg Richter <georg@php.net>                                |
00016   +----------------------------------------------------------------------+
00017 
00018   $Id: mysqli_report.h 321634 2012-01-01 13:15:04Z felipe $
00019 */
00020 
00021 #ifndef __HAVE_MYSQLI_PROFILER_H__
00022 #define __HAVE_MYSQLI_PROFILER_H__
00023 
00024 #ifdef PHP_WIN32
00025 #include <process.h>
00026 #include <direct.h>
00027 #include "win32/time.h"
00028 #else
00029 #include <sys/socket.h>
00030 #include <netinet/in.h>
00031 #include <arpa/inet.h>
00032 #include <netdb.h>
00033 #include <sys/time.h>
00034 #endif
00035 
00036 typedef struct {
00037        struct timeval       starttime,
00038                                    endtime;             /* execution time */
00039 } PR_TIME_INFO;
00040 
00041 
00042 #define MYSQLI_PR_REPORT_STDERR           1
00043 #define MYSQLI_PR_REPORT_PORT             2
00044 
00045 
00046 
00047 /*** PROFILER MACROS ***/
00048 #define MYSQLI_PROFILER_STARTTIME(ptr) if (MyG(profiler.mode)) gettimeofday(&ptr.starttime, NULL)
00049 #define MYSQLI_PROFILER_ENDTIME(ptr) if (MyG(profiler.mode)) gettimeofday(&ptr.endtime, NULL)
00050 #define MYSQLI_PROFILER_REPORT(_type, _time, ptr) if (MyG(profiler.mode)) php_mysqli_profiler_report(_type, _time, (void *)ptr)
00051 
00052 
00053 
00054 #endif
00055 
00056 /*
00057  * Local variables:
00058  * tab-width: 4
00059  * c-basic-offset: 4
00060  * indent-tabs-mode: t
00061  * End:
00062  * vim600: noet sw=4 ts=4 fdm=marker
00063  * vim<600: noet sw=4 ts=4
00064  */