List:Commits« Previous MessageNext Message »
From:ahristov Date:March 5 2007 3:36pm
Subject:PHP mysqlnd svn commit: r88 - trunk/ext/mysqli/mysqlnd
View as plain text  
Author: ahristov
Date: 2007-03-05 16:36:48 +0100 (Mon, 05 Mar 2007)
New Revision: 88

Modified:
   trunk/ext/mysqli/mysqlnd/mysqlnd.c
   trunk/ext/mysqli/mysqlnd/mysqlnd.h
   trunk/ext/mysqli/mysqlnd/mysqlnd_statistics.c
Log:
Add two more statistics about flushed sets - unbuffered sets
not used fully - the line was flushed.


Modified: trunk/ext/mysqli/mysqlnd/mysqlnd.c
===================================================================
--- trunk/ext/mysqli/mysqlnd/mysqlnd.c	2007-03-04 03:21:46 UTC (rev 87)
+++ trunk/ext/mysqli/mysqlnd/mysqlnd.c	2007-03-05 15:36:48 UTC (rev 88)
@@ -1414,6 +1414,10 @@
 	*/
 	if (!result->data && result->conn && !result->eof_reached
&& result->m.fetch_row) {
 		/* We have to fetch all data to clean the line */
+		MYSQLND_INC_CONN_STATISTIC(&result->conn->stats,
+									result->type == MYSQLND_RES_NORMAL? STAT_FLUSHED_NORMAL_SETS:
+																		STAT_FLUSHED_PS_SETS);
+
 		while ((PASS == result->m.fetch_row(result, NULL, 0, &fetched_anything
TSRMLS_CC)) &&
 			   fetched_anything == TRUE) {
 			/* do nothing */;

Modified: trunk/ext/mysqli/mysqlnd/mysqlnd.h
===================================================================
--- trunk/ext/mysqli/mysqlnd/mysqlnd.h	2007-03-04 03:21:46 UTC (rev 87)
+++ trunk/ext/mysqli/mysqlnd/mysqlnd.h	2007-03-05 15:36:48 UTC (rev 88)
@@ -311,6 +311,8 @@
 	STAT_UNBUFFERED_SETS,
 	STAT_PS_BUFFERED_SETS,
 	STAT_PS_UNBUFFERED_SETS,
+	STAT_FLUSHED_NORMAL_SETS,
+	STAT_FLUSHED_PS_SETS,
 	STAT_ROWS_FETCHED_FROM_SERVER,
 	STAT_ROWS_FETCHED_FROM_CLIENT,
 	STAT_ROWS_SKIPPED,
@@ -539,8 +541,8 @@
 
 	MYSQLND_ROW 		(*fetch_row_old_way)(MYSQLND_RES * result TSRMLS_DC ZEND_FILE_LINE_DC);
 	unsigned long *		(*fetch_lengths)(MYSQLND_RES * const result);
-	void				(*free_result_buffers)(MYSQLND_RES * result);
-	enum_func_status	(*free_result)(MYSQLND_RES *result TSRMLS_DC);
+	void				(*free_result_buffers)(MYSQLND_RES * result);	/* private */
+	enum_func_status	(*free_result)(MYSQLND_RES * result TSRMLS_DC);
 };
 
 

Modified: trunk/ext/mysqli/mysqlnd/mysqlnd_statistics.c
===================================================================
--- trunk/ext/mysqli/mysqlnd/mysqlnd_statistics.c	2007-03-04 03:21:46 UTC (rev 87)
+++ trunk/ext/mysqli/mysqlnd/mysqlnd_statistics.c	2007-03-05 15:36:48 UTC (rev 88)
@@ -51,6 +51,8 @@
 	{ STR_W_LEN("unbuffered_sets") },
 	{ STR_W_LEN("ps_buffered_sets") },
 	{ STR_W_LEN("ps_unbuffered_sets") },
+	{ STR_W_LEN("flushed_normal_sets") },
+	{ STR_W_LEN("flushed_ps_sets") },
 	{ STR_W_LEN("rows_fetched_from_server") },
 	{ STR_W_LEN("rows_fetched_from_client") },
 	{ STR_W_LEN("rows_skipped") },
@@ -72,6 +74,7 @@
 	mysqlnd_array_init(return_value, STAT_LAST);
 	for (i = 0; i < STAT_LAST; i++) {
 		char tmp[22];
+		
 		sprintf((char *)&tmp, MYSQLND_LLU_SPEC, stats->values[i]);
 		add_assoc_string_ex(return_value, mysqlnd_stats_values_names[i].s,
 							mysqlnd_stats_values_names[i].l + 1, tmp, 1);
@@ -83,7 +86,8 @@
 void _mysqlnd_get_client_stats(zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC)
 {
 	MYSQLND_STATS stats, *stats_ptr = mysqlnd_global_stats;
-	
+
+	printf("%s\n", __FUNCTION__);
 	if (!stats_ptr) {
 		memset(&stats, 0, sizeof(stats));
 		stats_ptr = &stats;

Thread
PHP mysqlnd svn commit: r88 - trunk/ext/mysqli/mysqlndahristov5 Mar