~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/benchmark/benchmarkudf.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-11-12 12:26:01 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101112122601-myppfj3tfmlkccuq
Tags: upstream-2010.11.03
ImportĀ upstreamĀ versionĀ 2010.11.03

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
  null_value= false;
82
82
 
83
83
  uint64_t loop;
84
 
  for (loop= 0 ; loop < loop_count && !session->killed; loop++)
 
84
  for (loop= 0 ; loop < loop_count && not session->getKilled(); loop++)
85
85
  {
86
86
    switch (args[1]->result_type()) 
87
87
    {
118
118
 
119
119
plugin::Create_function<BenchmarkFunction> *benchmarkudf= NULL;
120
120
 
121
 
static int initialize(plugin::Registry &registry)
 
121
static int initialize(module::Context &context)
122
122
{
123
123
  benchmarkudf= new plugin::Create_function<BenchmarkFunction>("benchmark");
124
 
  registry.add(benchmarkudf);
 
124
  context.add(benchmarkudf);
125
125
  return 0;
126
126
}
127
127
 
128
 
static int finalize(plugin::Registry &registry)
129
 
{
130
 
   registry.remove(benchmarkudf);
131
 
   delete benchmarkudf;
132
 
   return 0;
133
 
}
134
 
 
135
128
DRIZZLE_DECLARE_PLUGIN
136
129
{
137
130
  DRIZZLE_VERSION_ID,
141
134
  "Measure time for repeated calls to a function.",
142
135
  PLUGIN_LICENSE_GPL,
143
136
  initialize, /* Plugin Init */
144
 
  finalize,   /* Plugin Deinit */
145
137
  NULL,   /* system variables */
146
138
  NULL    /* config options */
147
139
}