mirror of
https://github.com/php/php-src.git
synced 2024-12-01 05:43:38 +08:00
two new stats
This commit is contained in:
parent
8342c36f09
commit
837391a9a7
@ -887,7 +887,7 @@ if (!mysqli_query($link, "DROP SERVER IF EXISTS myself"))
|
||||
mysqli_close($link);
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(158) {
|
||||
array(160) {
|
||||
[%u|b%"bytes_sent"]=>
|
||||
%unicode|string%(1) "0"
|
||||
[%u|b%"bytes_received"]=>
|
||||
@ -1204,6 +1204,10 @@ array(158) {
|
||||
%unicode|string%(1) "0"
|
||||
[%u|b%"com_deamon"]=>
|
||||
%unicode|string%(1) "0"
|
||||
[%u|b%"bytes_received_real_data_normal"]=>
|
||||
%unicode|string%(1) "0"
|
||||
[%u|b%"bytes_received_real_data_ps"]=>
|
||||
%unicode|string%(1) "0"
|
||||
}
|
||||
Testing buffered normal...
|
||||
Testing buffered normal... - SELECT id, label FROM test
|
||||
|
@ -502,6 +502,8 @@ typedef enum mysqlnd_collected_stats
|
||||
STAT_COM_SET_OPTION,
|
||||
STAT_COM_STMT_FETCH,
|
||||
STAT_COM_DAEMON,
|
||||
STAT_BYTES_RECEIVED_PURE_DATA_TEXT,
|
||||
STAT_BYTES_RECEIVED_PURE_DATA_PS,
|
||||
STAT_LAST /* Should be always the last */
|
||||
} enum_mysqlnd_collected_stats;
|
||||
|
||||
|
@ -190,7 +190,9 @@ const MYSQLND_STRING mysqlnd_stats_values_names[STAT_LAST] =
|
||||
{ STR_W_LEN("com_stmt_reset") },
|
||||
{ STR_W_LEN("com_stmt_set_option") },
|
||||
{ STR_W_LEN("com_stmt_fetch") },
|
||||
{ STR_W_LEN("com_deamon") }
|
||||
{ STR_W_LEN("com_deamon") },
|
||||
{ STR_W_LEN("bytes_received_real_data_normal") },
|
||||
{ STR_W_LEN("bytes_received_real_data_ps") }
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
|
@ -1223,6 +1223,7 @@ php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zv
|
||||
|
||||
for (i = 0, current_field = start_field; current_field < end_field; current_field++, i++) {
|
||||
enum_mysqlnd_collected_stats statistic;
|
||||
zend_uchar * orig_p = p;
|
||||
|
||||
DBG_INF_FMT("Into zval=%p decoding column %u [%s.%s.%s] type=%u field->flags&unsigned=%u flags=%u is_bit=%u as_unicode=%u",
|
||||
*current_field, i,
|
||||
@ -1269,7 +1270,10 @@ php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zv
|
||||
}
|
||||
}
|
||||
}
|
||||
MYSQLND_INC_CONN_STATISTIC(stats, statistic);
|
||||
MYSQLND_INC_CONN_STATISTIC_W_VALUE2(stats, statistic, 1,
|
||||
STAT_BYTES_RECEIVED_PURE_DATA_PS,
|
||||
(Z_TYPE_PP(current_field) == IS_STRING)?
|
||||
Z_STRLEN_PP(current_field) : (p - orig_p));
|
||||
|
||||
if (!((bit<<=1) & 255)) {
|
||||
bit = 1; /* to the following byte */
|
||||
@ -1376,9 +1380,8 @@ php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval
|
||||
case MYSQL_TYPE_GEOMETRY: statistic = STAT_TEXT_TYPE_FETCHED_GEOMETRY; break;
|
||||
default: statistic = STAT_TEXT_TYPE_FETCHED_OTHER; break;
|
||||
}
|
||||
MYSQLND_INC_CONN_STATISTIC(stats, statistic);
|
||||
MYSQLND_INC_CONN_STATISTIC_W_VALUE2(stats, statistic, 1, STAT_BYTES_RECEIVED_PURE_DATA_TEXT, len);
|
||||
}
|
||||
|
||||
#ifdef MYSQLND_STRING_TO_INT_CONVERSION
|
||||
if (as_int_or_float && perm_bind.php_type == IS_LONG) {
|
||||
zend_uchar save = *(p + len);
|
||||
|
Loading…
Reference in New Issue
Block a user