summaryrefslogtreecommitdiff
path: root/storage/perfschema/pfs_con_slice.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/perfschema/pfs_con_slice.cc')
-rw-r--r--storage/perfschema/pfs_con_slice.cc78
1 files changed, 17 insertions, 61 deletions
diff --git a/storage/perfschema/pfs_con_slice.cc b/storage/perfschema/pfs_con_slice.cc
index 9f9deb0919c..3733ad9e3d0 100644
--- a/storage/perfschema/pfs_con_slice.cc
+++ b/storage/perfschema/pfs_con_slice.cc
@@ -22,7 +22,7 @@
#include "my_global.h"
-#include "my_pthread.h"
+#include "my_thread.h"
#include "pfs_con_slice.h"
#include "pfs_stat.h"
#include "pfs_global.h"
@@ -38,66 +38,6 @@
@{
*/
-PFS_single_stat *
-PFS_connection_slice::alloc_waits_slice(uint sizing)
-{
- PFS_single_stat *slice= NULL;
- uint index;
-
- if (sizing > 0)
- {
- slice= PFS_MALLOC_ARRAY(sizing, sizeof(PFS_single_stat), PFS_single_stat,
- MYF(MY_ZEROFILL));
- if (unlikely(slice == NULL))
- return NULL;
-
- for (index= 0; index < sizing; index++)
- slice[index].reset();
- }
-
- return slice;
-}
-
-PFS_stage_stat *
-PFS_connection_slice::alloc_stages_slice(uint sizing)
-{
- PFS_stage_stat *slice= NULL;
- uint index;
-
- if (sizing > 0)
- {
- slice= PFS_MALLOC_ARRAY(sizing, sizeof(PFS_stage_stat), PFS_stage_stat,
- MYF(MY_ZEROFILL));
- if (unlikely(slice == NULL))
- return NULL;
-
- for (index= 0; index < sizing; index++)
- slice[index].reset();
- }
-
- return slice;
-}
-
-PFS_statement_stat *
-PFS_connection_slice::alloc_statements_slice(uint sizing)
-{
- PFS_statement_stat *slice= NULL;
- uint index;
-
- if (sizing > 0)
- {
- slice= PFS_MALLOC_ARRAY(sizing, sizeof(PFS_statement_stat), PFS_statement_stat,
- MYF(MY_ZEROFILL));
- if (unlikely(slice == NULL))
- return NULL;
-
- for (index= 0; index < sizing; index++)
- slice[index].reset();
- }
-
- return slice;
-}
-
void PFS_connection_slice::reset_waits_stats()
{
PFS_single_stat *stat= m_instr_class_waits_stats;
@@ -122,5 +62,21 @@ void PFS_connection_slice::reset_statements_stats()
stat->reset();
}
+void PFS_connection_slice::reset_transactions_stats()
+{
+ PFS_transaction_stat *stat=
+ &m_instr_class_transactions_stats[GLOBAL_TRANSACTION_INDEX];
+ if (stat)
+ stat->reset();
+}
+
+void PFS_connection_slice::rebase_memory_stats()
+{
+ PFS_memory_stat *stat= m_instr_class_memory_stats;
+ PFS_memory_stat *stat_last= stat + memory_class_max;
+ for ( ; stat < stat_last; stat++)
+ stat->reset();
+}
+
/** @} */