~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/cost_vector.h

  • Committer: Mark Atwood
  • Date: 2011-08-01 05:22:14 UTC
  • mfrom: (1919.3.53 drizzle_pbms)
  • Revision ID: me@mark.atwood.name-20110801052214-3wdsx3xgld6b5v4f
mergeĀ lp:~barry-leslie/drizzle/drizzle_pbms

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#pragma once
21
21
 
22
 
namespace drizzled {
23
 
namespace optimizer {
 
22
namespace drizzled
 
23
{
 
24
namespace optimizer
 
25
{
 
26
class CostVector
 
27
{
24
28
 
25
 
class CostVector 
26
 
{
27
29
public:
28
30
  CostVector() :
29
31
    io_count(0.0),
33
35
    import_cost(0.0)
34
36
  {}
35
37
 
36
 
  double total_cost() const
 
38
  double total_cost()
37
39
  {
38
40
    return IO_COEFF*io_count*avg_io_cost + CPU_COEFF * cpu_cost +
39
41
      MEM_COEFF*mem_cost + IMPORT_COEFF*import_cost;