mirror of
https://github.com/logos-storage/bittorrent-benchmarks.git
synced 2026-01-02 13:03:13 +00:00
feat: add optional data removal with adjusted quotas
This commit is contained in:
parent
cd77b20a82
commit
4cbb401d12
@ -74,6 +74,7 @@ class CodexExperimentConfig(
|
||||
)
|
||||
|
||||
download_metric_unit_bytes: int = 1
|
||||
remove_data: bool = False
|
||||
|
||||
def build(self) -> CodexDisseminationExperiment:
|
||||
node_specs = (
|
||||
@ -90,6 +91,7 @@ class CodexExperimentConfig(
|
||||
CodexNode(
|
||||
codex_api_url=parse_url(f"http://{str(node.address)}:{node.api_port}"),
|
||||
agent=agents[i],
|
||||
remove_data=self.remove_data,
|
||||
)
|
||||
for i, node in enumerate(node_specs)
|
||||
]
|
||||
|
||||
@ -4,6 +4,9 @@ codex_experiment:
|
||||
seeders: ${SEEDERS}
|
||||
file_size: ${FILE_SIZE}
|
||||
repetitions: ${REPETITIONS}
|
||||
# Should we delete the data at the end of each experiment (slower, uses less space), or we just
|
||||
# leave it there (faster, uses more space)?
|
||||
remove_data: ${REMOVE_DATA}
|
||||
# No need for cooldown as Codex takes forever to remove files, so there's plenty of time to log stuff. :-)
|
||||
logging_cooldown: 0
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ codex_experiment:
|
||||
seeders: 1
|
||||
file_size: 52428800
|
||||
repetitions: 3
|
||||
remove_data: true
|
||||
|
||||
nodes:
|
||||
- name: codex-1
|
||||
|
||||
@ -9,8 +9,13 @@ Expand the name of the chart.
|
||||
{{- mul $sizeNum (index $size $sizeUnit) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "codex.quota" }}
|
||||
{{- div (mul (include "filesize.bytes" .) 13) 10 -}}
|
||||
{{- define "experiment.count" -}}
|
||||
{{- mul .Values.experiment.seederSets .Values.experiment.repetitions -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "codex.quota" -}}
|
||||
{{- $mulFactor := .Values.experiment.removeData | ternary 1 (include "experiment.count" .) -}}
|
||||
{{- div (mul (mul (include "filesize.bytes" .) $mulFactor) 13) 10 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "experiment.groupId" -}}
|
||||
|
||||
@ -36,6 +36,8 @@ spec:
|
||||
value: {{ .Values.experiment.repetitions | quote }}
|
||||
- name: SEEDER_SETS
|
||||
value: {{ .Values.experiment.seederSets | quote }}
|
||||
- name: REMOVE_DATA
|
||||
value: {{ .Values.experiment.removeData | quote }}
|
||||
- name: FILE_SIZE
|
||||
value: {{ include "filesize.bytes" . | quote }}
|
||||
- name: CODEX_STATEFULSET
|
||||
|
||||
@ -21,6 +21,10 @@ experiment:
|
||||
# If set to false, does not deploy a test runner (useful if you just want the network).
|
||||
testRunner: true
|
||||
|
||||
# If set to false, does not delete the data at the end of each experiment. This is faster
|
||||
# than deleting it, but requires more space.
|
||||
removeData: true
|
||||
|
||||
deployment:
|
||||
appName: ""
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user