function performance_schema in Performance Logging and Monitoring 6
Same name and namespace in other branches
- 6.2 performance.install \performance_schema()
- 7.2 performance.install \performance_schema()
- 7 performance.install \performance_schema()
Implementation of hook_schema().
File
- ./
performance.install, line 16 - Install and update for Performance Logging
Code
function performance_schema() {
$schema = array();
$schema['performance_summary'] = array(
'fields' => array(
'path' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'last_access' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'bytes_max' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'bytes_avg' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'ms_max' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'ms_avg' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'query_count_max' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'query_count_avg' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'query_timer_max' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'query_timer_avg' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'num_accesses' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
),
'primary key' => array(
'path',
),
'indexes' => array(
'last_access' => array(
'last_access',
),
),
);
$schema['performance_detail'] = array(
'fields' => array(
'pid' => array(
'type' => 'serial',
'not null' => TRUE,
'disp-width' => '11',
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'bytes' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'ms' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'query_count' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'query_timer' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'disp-width' => '11',
),
'anon' => array(
'type' => 'int',
'not null' => FALSE,
'default' => 1,
'disp-width' => '1',
),
'path' => array(
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
),
'data' => array(
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
),
),
'primary key' => array(
'pid',
),
'indexes' => array(
'timestamp' => array(
'timestamp',
),
),
);
return $schema;
}