Fixed buggy capacity computation.

Need to re-run things to make the numbers are right still.
This commit is contained in:
Michael Whittaker 2021-02-04 11:40:31 -08:00
parent 2cbe95d39d
commit 8712493c4e

View file

@ -642,7 +642,8 @@ class Strategy(Generic[T]):
def capacity(self, def capacity(self,
read_fraction: Optional[Distribution] = None, read_fraction: Optional[Distribution] = None,
write_fraction: Optional[Distribution] = None) -> float: write_fraction: Optional[Distribution] = None) -> float:
return 1 / self.load(read_fraction, write_fraction) d = distribution.canonicalize_rw(read_fraction, write_fraction)
return sum(p * 1 / self._load(fr) for (fr, p) in d.items())
def network_load(self, def network_load(self,
read_fraction: Optional[Distribution] = None, read_fraction: Optional[Distribution] = None,