{"id":14967118,"url":"https://github.com/golemfactory/ya-perf","last_synced_at":"2025-10-19T09:31:32.130Z","repository":{"id":38194844,"uuid":"499468651","full_name":"golemfactory/ya-perf","owner":"golemfactory","description":"ya-perf is a performance analyzing tool for NET","archived":false,"fork":false,"pushed_at":"2024-06-06T15:41:48.000Z","size":137,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-10-01T04:29:47.243Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golemfactory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-03T10:24:21.000Z","updated_at":"2022-10-27T03:25:16.000Z","dependencies_parsed_at":"2024-09-14T03:49:36.162Z","dependency_job_id":"3babd69e-cda0-42e5-97df-9090ab0ed0fe","html_url":"https://github.com/golemfactory/ya-perf","commit_stats":{"total_commits":45,"total_committers":6,"mean_commits":7.5,"dds":0.4,"last_synced_commit":"eb139eb192ff13e78d662c8c48cfe1258993fc3a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fya-perf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fya-perf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fya-perf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fya-perf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golemfactory","download_url":"https://codeload.github.com/golemfactory/ya-perf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869245,"owners_count":16555571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:37:28.972Z","updated_at":"2025-10-19T09:31:31.764Z","avatar_url":"https://github.com/golemfactory.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ya-perf\n\nPerformance analyzing tool for NET\n\n### Available tests\n\n* **GFTP transfer test** between Requestor and each Provider. Only one transfer at a time between Requestor and Provider.\n\n| Command line option  | Default  | Description                            |\n|----------------------|----------|----------------------------------------|\n| --transfer           | disabled | Optional flag to enable test           |\n| --transfer-file-size | 10       | Sets transferred file size (in Mbytes) |\n\nWARNING: Be aware that large size of transferred files increase total test time.\n\n* **Command output test** between Requestor and each Provider.\n\n| Command line option | Default   | Description                               |\n|---------------------|-----------|-------------------------------------------|\n| --cmd-output-count  | 0         | Specifies the number of commands to send. |\n| --cmd-output-size   | 393216    | Sets command output size (in bytes).      |\n\n* **VPN ping test** between Providers. Only one ping test at a time between Providers. Each Provider is engaged in only one call at a time, as a client or a server.\nTest is only completed when each Provider call others (total number of ping test: _n(n-1)_ where _n_ is number of instances). In example the VPN ping test is completed when \n3 nodes (A,B,C) complete 6 tests (A-\u003eB, B-\u003eA, A-\u003eC, C-\u003eA, B-\u003eC, C-\u003eB).\n\n| Command line option | Default  | Description                                   |\n|---------------------|----------|-----------------------------------------------|\n| --vpn-ping          | disabled | Optional flag to enable test                  |\n| --ping-count        | 10       | Specifies the number of ping packets to send. |\n\n* **VPN transfer test** between Providers. Only one transfer test at a time between Providers. Each Provider is engaged in only one call at a time, as a client or a server.\nTest is only completed when each Provider call others (total number of transfer test: _n(n-1)_ where _n_ is number of instances). In example the VPN transfer test is completed when \n3 nodes (A,B,C) complete 6 tests (A-\u003eB, B-\u003eA, A-\u003eC, C-\u003eA, B-\u003eC, C-\u003eB). In the background script uses by default `iperf 3.10.1` as a performance testing tool. Bandwidth is measured on TCP protocol.\nTCP window size is set to 60000 bytes. Default performance testing tool can be switched to `scp` utility with --scp flag. Remember that TCP, Encryption, and SSH control messages add overhead, so your true throughput will be a little higher than the number reported by `scp` for the file transfer.\n`scp` randomly transfers 10MB file. The file size can be set up using --scp-transfer-file-size option.\n\n| Command line option      | Default  | Description                            |\n|--------------------------|----------|----------------------------------------|\n| --vpn-transfer           | disabled | Optional flag to enable test           |\n| --scp                    | disabled | Optional flag to enable test           |\n| --scp-transfer-file-size | 10       | Sets transferred file size (in Mbytes) |\n\n### General options\n\n| Command line option          | Default        | Description                                                                    |\n|------------------------------|----------------|--------------------------------------------------------------------------------|\n| --num-instances              | 2              | Number of provider nodes to be tested                                          |\n| --subnet-tag                 | devnet-beta    | Set subnet name                                                                |\n| --payment-driver, --driver   | erc20          | Set payment network driver                                                     |\n| --payment-network, --network | rinkeby        | Set payment network name                                                       |\n| --json                       | disabled       | Set the flag and save results in JSON format                                   |\n| --log-file                   | ya-perf        | Log file for YAPAPI                                                            |\n| --running-time               | 7200           | Option to set time the instance run before the cluster is stopped (in seconds) |\n| --output-dir                 | main directory | Sets output directory for results and mapping file                             |\n\n### Filtering nodes\nYou can use any Providers in the subnet (by default) or specify nodes to test. If order to filter nodes, enter Provider ID in `providers_list.json` file,\ni.e.\n```json\n[\n  \"0x83a086e7779c31476eefee36ab8814bca3d35aa2\",\n  \"0xd2ca30dff73047cb3619416b9de187686c31c6f6\",\n  \"0xb7925f9378650e7291836ef9249e2fcdf8a378da\",\n  \"0x02a71376b982cb3752e99252625aa4cc33b7ed3d\",\n  \"0x0d6beaeec5e3a250ef909ffad58271780a340fea\",\n  \"0xdf4b685011fb4b061e6ecb1f418d44e6cb3504d6\"\n]\n```\nProviders are selected for the test according to the order given in the file.\n\n### Example\n\n```bash\npython3 performance.py --num-instances 2 --subnet-tag testnet --transfer --transfer-file-size 25 --vpn-ping --ping-count 5 --vpn-transfer --json\n```\n\n# GSB perf\n\nMeasuring local GSB performance. File is published and downloaded on the same machine.\n\n`poetry run python3 gsb-perf.py --transfer-file-size 100`\n\n\n# Saturate\n\nHarness for the [`saturate` tool](https://github.com/golemfactory/ya-relay/blob/main/client/examples/saturate.rs) from\nthe `ya-relay` repository.\n\n`saturate` is a `ya-relay` client, executed in either listening or sending mode. The latter discovers the former\nvia a designated relay server, establishes a connection, and tries to send as much data as possible. The listener tracks\ninbound speed rates and dumps that data to a CSV file.\n\n## Prerequisites\n\n1. `saturate` supporting CSV file dumps (https://github.com/golemfactory/ya-relay/pull/181)\n\n2. `saturate` binary is present on PATH\n\n3. This tool requires key-authorized SSH access to all hosts specified in the configuration file\n    - the SSH daemon must be running on each designated host\n    - runner host on must be pre-authorized on each host\n      (no password or key acknowledgment prompts are supported)\n\n## Usage\n\nRun a test suite, download CSV results and generate plots:\n\n```bash\npoetry run python3 saturate.py config.json ./saturate-output run\n```\n\nGenerate plots from CSV data in a `saturate-output` directory:\n\n```bash\npoetry run python3 saturate.py config.json ./saturate-output gen\n```\n\n## Configuration\n\nAn example configuration file can be found [here](saturate-template.json).\n\nAvailable configuration options:\n  - `hosts` - SSH destination hosts (w/ an optional username)\n  - `ports` - (optional) ya-relay client bind ports, specified 1:1 for hosts \n  - `env` - environment variables to create a product of; a test will be run for each entry\n  - `time` - testing time in seconds\n\n\n# Cross-SCP\n\nA tool for executing SCP file transfers between hosts. The scripts dumps a summary output file on successful execution.\n\n## Prerequisites\n\n- your SSH key needs to be trusted by each node you're executing the script on\n- node id to name map file is mandatory; it serves as a source of input node combinations\n- YAML node file definition file is mandatory \n  \n  The file path can be provided via `-y | --yaml` argument(s), via `-d | --dir` argument(s) to automatically locate YAML\n  files, or both.\n\n## Options\n\n| Command line option | Default | Description                                                                  |\n|---------------------|---------|------------------------------------------------------------------------------|\n| -n, --nodes         | -       | Node id to name map file (JSON)                                              |\n| -y, --yaml          | -       | `yagna-testnet-scripts` YAML node file definition                            |\n| -d, --dir           | -       | directory to scan for YAML node file definitions (e.g. testnet scripts repo) |\n| -s, --size          | 100M    | file size to transfer                                                        |\n\n## Example\n\n```bash\n./cross-scp.sh -n nodes-map.json -d ../yagna-testnet-scripts\n````\n\n`nodes-map.json`\n\n```json\n{\n\"0x0acd48076bd190282a23ca6d6add18ee4a1f7871\": \"DE1-13.h\",\n\"0xa51979f16829b4370d2e653f39ed49e12cf358de\": \"GRA11-15.h\",\n\"0x052877c2324abb1915d25acc3da69e11871f733d\": \"SBG5-6.h\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolemfactory%2Fya-perf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolemfactory%2Fya-perf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolemfactory%2Fya-perf/lists"}