mirror of
https://github.com/logos-storage/bittorrent-benchmarks.git
synced 2026-01-06 23:13:08 +00:00
fix: adjust Codex logging cooldown, insert polling backoff on download completion, define default Codex experiment
This commit is contained in:
parent
68ee1bad87
commit
f336df8da7
@ -130,7 +130,7 @@ class CodexDownloadHandle(DownloadHandle):
|
|||||||
completion = self.completion()
|
completion = self.completion()
|
||||||
return completion.downloaded == completion.total
|
return completion.downloaded == completion.total
|
||||||
|
|
||||||
return await_predicate(_predicate, timeout)
|
return await_predicate(_predicate, timeout, polling_interval=1)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def node(self) -> Node:
|
def node(self) -> Node:
|
||||||
|
|||||||
@ -74,7 +74,7 @@ class CodexExperimentConfig(ExperimentBuilder[CodexDisseminationExperiment]):
|
|||||||
)
|
)
|
||||||
|
|
||||||
logging_cooldown: int = Field(
|
logging_cooldown: int = Field(
|
||||||
gt=0,
|
ge=0,
|
||||||
default=0,
|
default=0,
|
||||||
description="Time to wait after the last download completes before tearing down the experiment.",
|
description="Time to wait after the last download completes before tearing down the experiment.",
|
||||||
)
|
)
|
||||||
|
|||||||
@ -83,7 +83,7 @@ class ExperimentEnvironment(ExperimentComponent):
|
|||||||
def await_ready(self, timeout: float = 0) -> bool:
|
def await_ready(self, timeout: float = 0) -> bool:
|
||||||
"""Awaits for all components to be ready, or until a timeout is reached."""
|
"""Awaits for all components to be ready, or until a timeout is reached."""
|
||||||
logging.info(
|
logging.info(
|
||||||
f"Awaiting for components to be ready:\n {'\n'.join(self._component_names(self.not_ready))}"
|
f"Awaiting for components to be ready:\n {self._component_names(self.not_ready, sep='\n')}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if not await_predicate(self.is_ready, timeout, self.polling_interval):
|
if not await_predicate(self.is_ready, timeout, self.polling_interval):
|
||||||
@ -110,8 +110,8 @@ class ExperimentEnvironment(ExperimentComponent):
|
|||||||
return components[: self.ping_max]
|
return components[: self.ping_max]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _component_names(components: List[ExperimentComponent]) -> str:
|
def _component_names(components: List[ExperimentComponent], sep: str = ", ") -> str:
|
||||||
return ", ".join(str(component) for component in components)
|
return sep.join(str(component) for component in components)
|
||||||
|
|
||||||
def run(self, experiment: Experiment):
|
def run(self, experiment: Experiment):
|
||||||
"""Runs the :class:`Experiment` within this :class:`ExperimentEnvironment`."""
|
"""Runs the :class:`Experiment` within this :class:`ExperimentEnvironment`."""
|
||||||
|
|||||||
@ -84,7 +84,7 @@ class DelugeExperimentConfig(ExperimentBuilder[DelugeDisseminationExperiment]):
|
|||||||
)
|
)
|
||||||
|
|
||||||
logging_cooldown: int = Field(
|
logging_cooldown: int = Field(
|
||||||
gt=0,
|
ge=0,
|
||||||
default=0,
|
default=0,
|
||||||
description="Time to wait after the last download completes before tearing down the experiment.",
|
description="Time to wait after the last download completes before tearing down the experiment.",
|
||||||
)
|
)
|
||||||
|
|||||||
@ -4,7 +4,8 @@ codex_experiment:
|
|||||||
seeders: ${SEEDERS}
|
seeders: ${SEEDERS}
|
||||||
file_size: ${FILE_SIZE}
|
file_size: ${FILE_SIZE}
|
||||||
repetitions: ${REPETITIONS}
|
repetitions: ${REPETITIONS}
|
||||||
logging_cooldown: 10
|
# No need for cooldown as Codex takes forever to remove files, so there's plenty of time to log stuff. :-)
|
||||||
|
logging_cooldown: 0
|
||||||
|
|
||||||
nodes:
|
nodes:
|
||||||
network_size: ${NETWORK_SIZE}
|
network_size: ${NETWORK_SIZE}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
experiment:
|
experiment:
|
||||||
networkSize: 5
|
networkSize: 10
|
||||||
fileSize: "100MB"
|
fileSize: "100MB"
|
||||||
seeders: 1
|
seeders: 4
|
||||||
seederSets: 1
|
seederSets: 4
|
||||||
repetitions: 1
|
repetitions: 10
|
||||||
|
|
||||||
blockTTL: 360000
|
blockTTL: 360000
|
||||||
blockMaintenanceInterval: 360000
|
blockMaintenanceInterval: 360000
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user