~drizzle-trunk/drizzle/development

1537.2.1 by Joe Daly
add statistics_variables.h
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
1537.2.1 by Joe Daly
add statistics_variables.h
5
 *  Copyright (C) 2010 Joseph Daly 
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; version 2 of the License.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 */
20
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
21
#pragma once
1537.2.1 by Joe Daly
add statistics_variables.h
22
2241.2.11 by Olaf van der Spek
Refactor
23
namespace drizzled {
1537.2.1 by Joe Daly
add statistics_variables.h
24
25
extern struct global_counters current_global_counters;
26
1537.2.2 by Joe Daly
add comment to statistics_variables.h
27
/* 
28
 * These statistics are global and are not per session
29
 * they are not reset once initialized. 
30
 */
1537.2.1 by Joe Daly
add statistics_variables.h
31
typedef struct global_counters
32
{
1561.3.1 by Joe Daly
add status_vars to scoreboard, initial pass
33
  uint64_t max_used_connections;
1726.3.3 by LinuxJedi
Add a proper connections counter.
34
  uint64_t connections;
1561.3.1 by Joe Daly
add status_vars to scoreboard, initial pass
35
  uint64_t locks_immediate;
36
  uint64_t locks_waited;
1537.2.1 by Joe Daly
add statistics_variables.h
37
} global_counters;
38
1537.2.2 by Joe Daly
add comment to statistics_variables.h
39
/* 
40
 * These statistics are per session and are reset at the end
41
 * of each session, after being copied into a global 
42
 * system_status_var
43
 */
1537.2.1 by Joe Daly
add statistics_variables.h
44
typedef struct system_status_var
45
{
1625.2.1 by Joe Daly
initial user stats impl
46
  uint64_t aborted_connects;
47
  uint64_t aborted_threads;
48
  uint64_t access_denied;
1537.2.1 by Joe Daly
add statistics_variables.h
49
  uint64_t bytes_received;
50
  uint64_t bytes_sent;
1561.3.1 by Joe Daly
add status_vars to scoreboard, initial pass
51
  uint64_t com_other;
52
  uint64_t created_tmp_disk_tables;
53
  uint64_t created_tmp_tables;
54
  uint64_t ha_commit_count;
55
  uint64_t ha_delete_count;
56
  uint64_t ha_read_first_count;
57
  uint64_t ha_read_last_count;
58
  uint64_t ha_read_key_count;
59
  uint64_t ha_read_next_count;
60
  uint64_t ha_read_prev_count;
61
  uint64_t ha_read_rnd_count;
62
  uint64_t ha_read_rnd_next_count;
63
  uint64_t ha_rollback_count;
64
  uint64_t ha_update_count;
65
  uint64_t ha_write_count;
66
  uint64_t ha_prepare_count;
67
  uint64_t ha_savepoint_count;
68
  uint64_t ha_savepoint_rollback_count;
1537.2.1 by Joe Daly
add statistics_variables.h
69
1561.3.1 by Joe Daly
add status_vars to scoreboard, initial pass
70
  uint64_t select_full_join_count;
71
  uint64_t select_full_range_join_count;
72
  uint64_t select_range_count;
73
  uint64_t select_range_check_count;
74
  uint64_t select_scan_count;
75
  uint64_t long_query_count;
76
  uint64_t filesort_merge_passes;
77
  uint64_t filesort_range_count;
78
  uint64_t filesort_rows;
79
  uint64_t filesort_scan_count;
1625.2.1 by Joe Daly
initial user stats impl
80
  uint64_t connection_time;
81
  uint64_t execution_time_nsec;
1625.2.2 by Joe Daly
add counter logic for rows sent/received/inserted/updated
82
  uint64_t updated_row_count;
83
  uint64_t deleted_row_count;
84
  uint64_t inserted_row_count;
1537.2.1 by Joe Daly
add statistics_variables.h
85
  /*
86
    Number of statements sent from the client
87
  */
1561.3.1 by Joe Daly
add status_vars to scoreboard, initial pass
88
  uint64_t questions;
1537.2.1 by Joe Daly
add statistics_variables.h
89
  /*
90
    IMPORTANT!
91
    SEE last_system_status_var DEFINITION BELOW.
92
93
    Below 'last_system_status_var' are all variables which doesn't make any
94
    sense to add to the /global/ status variable counter.
95
  */
96
  double last_query_cost;
97
} system_status_var;
98
99
#define last_system_status_var questions
100
101
} /* namespace drizzled */
102