cs-codex-dist-tests/Tools/AutoClient
benbierens 04f087efe4
Bump to dotnet 8
2024-10-03 14:02:28 +02:00
..
docker
App.cs implements performance logger for autoclient 2024-09-12 15:03:06 +02:00
AutoClient.csproj Bump to dotnet 8 2024-10-03 14:02:28 +02:00
CidRepo.cs setup 2024-09-12 14:38:15 +02:00
CodexUser.cs setup 2024-09-12 14:38:15 +02:00
Configuration.cs defaults for EC params that actually work 2024-09-12 15:29:50 +02:00
ImageGenerator.cs setup 2024-09-12 14:38:15 +02:00
Performance.cs div by zero in time calculation 2024-09-12 15:14:15 +02:00
Program.cs setup 2024-09-12 14:38:15 +02:00
Purchaser.cs Adds call to get availabilities 2024-09-23 10:52:12 +02:00
README.md Readme on how to run auto-client 2024-08-23 13:37:25 +02:00

README.md

Codex auto-client

This thing will generate files, upload them, and purchase storage for them in an endless loop.

Can generate random images or random data of a specified size.

How to run

  • dotnet 7.0 and CLI arguments: dotnet run -- --codex-host=... --codex-port=...
  • docker and env-vars: codexstorage/codex-autoclient:sha-88daab3

Configuration options

Options can be configured via CLI option or environment variable.

CLI option Environment variable Description
"--codex-host" "CODEXHOST" Codex Host address. (default 'http://localhost')
"--codex-port" "CODEXPORT" port number of Codex API. (8080 by default)
"--datapath" "DATAPATH" Root path where all data files will be saved.
"--purchases" "PURCHASES" Number of concurrent purchases.
"--contract-duration" "CONTRACTDURATION" contract duration in minutes. (default 6 hours)
"--contract-expiry" "CONTRACTEXPIRY" contract expiry in minutes. (default 15 minutes)
"--num-hosts" "NUMHOSTS" Number of hosts for contract. (default 5)
"--num-hosts-tolerance" "NUMTOL" Number of host tolerance for contract. (default 2)
"--price" "PRICE" Price of contract. (default 10)
"--collateral" "COLLATERAL" Required collateral. (default 1)
"--filesizemb" "FILESIZEMB" When greater than zero, size of file generated and uploaded. When zero, random images are used instead. (default 0)

Timing

Configuration: purchases controls the number of concurrently running storage requests. Configuration: contract-duration controls the duration in minutes of each storage request. Auto-client will create a new storage request every X minutes, where X is the contract duration divided by the number of purchases. (Timing may start to vary when contracts fail or time out.)