~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_stats/cumulative_stats.cc

  • Committer: Monty Taylor
  • Date: 2010-07-19 05:06:59 UTC
  • mto: (1662.1.2 rollup)
  • mto: This revision was merged to the branch mainline in revision 1663.
  • Revision ID: mordred@inaugust.com-20100719050659-if3thz0k66m1jkaf
Backed out two bits that snuck in to the merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2010 Joseph Daly <skinny.moey@gmail.com>
 
2
 * Copyright (c) 2010, Joseph Daly <skinny.moey@gmail.com>
3
3
 * All rights reserved.
4
4
 *
5
5
 * Redistribution and use in source and binary forms, with or without
27
27
 * THE POSSIBILITY OF SUCH DAMAGE.
28
28
 */
29
29
 
30
 
#include <config.h>
 
30
#include "config.h"
31
31
#include "cumulative_stats.h"
32
32
 
33
33
using namespace std;
34
 
using namespace drizzled;
35
34
 
36
35
CumulativeStats::CumulativeStats(uint32_t in_cumulative_stats_by_user_max) 
37
36
    :
51
50
  isOpenUserSlots= true;
52
51
  global_stats= new GlobalStats();
53
52
  global_status_vars= new StatusVars();
54
 
 
55
 
  /* calculate the approximate memory allocation for the cumulative statistics */
56
 
  size_t statusVarsSize= sizeof(StatusVars) + sizeof(system_status_var);
57
 
  size_t userCommandsSize= sizeof(UserCommands) + sizeof(uint64_t) * SQLCOM_END;
58
 
 
59
 
  cumulative_size_bytes= (statusVarsSize + userCommandsSize) * cumulative_stats_by_user_max; 
60
53
}
61
54
 
62
55
CumulativeStats::~CumulativeStats()