Skip to content

Commit

Permalink
small refactor, more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasWaldmann committed Sep 11, 2024
1 parent 45470bd commit eb1afb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/borgstore/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def __init__(self, url: Optional[str] = None, backend: Optional[BackendBase] = N
self.backend = backend
self._stats: Counter = Counter()
# this is to emulate additional latency to what the backend actually offers:
self.latency = float(os.environ.get("BORGSTORE_LATENCY", "0")) / 1e6 # [us]
self.latency = float(os.environ.get("BORGSTORE_LATENCY", "0")) / 1e6 # [us] -> [s]
# this is to emulate less bandwidth than what the backend actually offers:
self.bandwidth = float(os.environ.get("BORGSTORE_BANDWIDTH", "0")) / 8 # [bits/s]
self.bandwidth = float(os.environ.get("BORGSTORE_BANDWIDTH", "0")) / 8 # [bits/s] -> [bytes/s]

def __repr__(self):
return f"<Store(url={self.url!r}, levels={self.levels!r})>"
Expand Down

0 comments on commit eb1afb3

Please sign in to comment.