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