From b1485d13ede10bda1c45238780e4402ab3bba7ee Mon Sep 17 00:00:00 2001 From: Pavel Rochnyack Date: Sat, 27 Feb 2016 14:51:47 +0700 Subject: [PATCH] * mysql plugin: Change Sort_* types --- src/mysql.c | 11 +++++++++-- src/types.db | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/mysql.c b/src/mysql.c index a8a8e86d..88a56dc3 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -900,8 +900,15 @@ static int mysql_read (user_data_t *ud) } else if (strncmp (key, "Sort_", strlen ("Sort_")) == 0) { - counter_submit ("mysql_sort", key + strlen ("Sort_"), - val, db); + if (strcmp (key, "Sort_merge_passes") == 0) + counter_submit ("mysql_sort_merge_passes", NULL, val, db); + else if (strcmp (key, "Sort_rows") == 0) + counter_submit ("mysql_sort_rows", NULL, val, db); + else if (strcmp (key, "Sort_range") == 0) + counter_submit ("mysql_sort", "range", val, db); + else if (strcmp (key, "Sort_scan") == 0) + counter_submit ("mysql_sort", "scan", val, db); + } } mysql_free_result (res); res = NULL; diff --git a/src/types.db b/src/types.db index 5847218a..e2c3e6d8 100644 --- a/src/types.db +++ b/src/types.db @@ -128,6 +128,8 @@ mysql_innodb_row_lock value:DERIVE:0:U mysql_innodb_rows value:DERIVE:0:U mysql_select value:DERIVE:0:U mysql_sort value:DERIVE:0:U +mysql_sort_merge_passes value:DERIVE:0:U +mysql_sort_rows value:DERIVE:0:U nfs_procedure value:DERIVE:0:U nginx_connections value:GAUGE:0:U nginx_requests value:DERIVE:0:U -- 2.30.2