diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-01-30 23:07:42 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-01-30 23:07:42 +0000 |
commit | 6661faa01eb1f268d763d856f7dfb3bb2e6f5a47 (patch) | |
tree | 3e9c1ceeb1f7b9e11ed587a300be3b70c76e1ade /TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.inl | |
parent | 069e594489a66af4a875abd4cc08550cdbc323f2 (diff) | |
download | ATCD-6661faa01eb1f268d763d856f7dfb3bb2e6f5a47.tar.gz |
Fri Jan 30 16:43:43 2004 Jaiganesh B <jai@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.inl')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.inl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.inl b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.inl new file mode 100644 index 00000000000..4f096fa4040 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadMinimum.inl @@ -0,0 +1,22 @@ +// -*- C++ -*- +// +// $Id$ + +ACE_INLINE CORBA::Float +TAO_LB_LoadMinimum::effective_load (CORBA::Float previous_load, + CORBA::Float new_load) +{ + // Apply per-balance load. (Recompute raw load) + previous_load += this->per_balance_load_; + + // Apply dampening. (Recompute new raw load) + CORBA::Float result = + this->dampening_ * previous_load + (1 - this->dampening_) * new_load; + + ACE_ASSERT (this->tolerance_ != 0); + + // Compute the effective load. + result /= this->tolerance_; + + return result; +} |