{"id":16111198,"url":"https://github.com/heckj/mpcf-testbench","last_synced_at":"2025-03-18T09:31:02.195Z","repository":{"id":137339241,"uuid":"255194069","full_name":"heckj/MPCF-TestBench","owner":"heckj","description":"Tooling for benchmarking Multipeerconnectivity framework on apple platforms","archived":false,"fork":false,"pushed_at":"2022-08-26T15:57:43.000Z","size":232,"stargazers_count":7,"open_issues_count":6,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-14T18:51:37.555Z","etag":null,"topics":["ios","macos","peer-to-peer","swift5","swiftui","tvos"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heckj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-04-13T00:12:29.000Z","updated_at":"2024-01-07T10:08:58.000Z","dependencies_parsed_at":"2024-02-16T03:43:45.621Z","dependency_job_id":null,"html_url":"https://github.com/heckj/MPCF-TestBench","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckj%2FMPCF-TestBench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckj%2FMPCF-TestBench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckj%2FMPCF-TestBench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heckj%2FMPCF-TestBench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heckj","download_url":"https://codeload.github.com/heckj/MPCF-TestBench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243911178,"owners_count":20367641,"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":["ios","macos","peer-to-peer","swift5","swiftui","tvos"],"created_at":"2024-10-09T19:40:40.119Z","updated_at":"2025-03-18T09:31:01.868Z","avatar_url":"https://github.com/heckj.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MPCF-TestBench\n\n[![Actions Status](https://github.com/heckj/MPCF-TestBench/workflows/CI/badge.svg)](https://github.com/heckj/MPCF-TestBench/actions)\n[![license](https://img.shields.io/badge/license-mit-brightgreen.svg)](https://en.wikipedia.org/wiki/MIT_License)\n![swift-5.2](https://img.shields.io/badge/Swift-5.2-orange.svg \"Swift 5.2\")\n![@heckj](https://img.shields.io/badge/twitter-@heckj-blue.svg?style=flat \"Twitter: @heckj\")\n\nI was curious how \"fast\" [MultipeerConnectivity](http://developer.apple.com/documentation/multipeerconnectivity/) operates.\n\nMultipeerConnectivity does a lot of \"magic\" in a really nice way: peer to peer advertising,\nsupporting delegated connects, and transfer of data. And it operates seamlessly over multiple transports - bluetooth\nand wifi, focusing on connecting \"nearby\" peers - while hiding a lot of that detail away.\n\nThere are some really interesting wrappers over the top of it as well, such as [MultipeerKit](https://multipeerkit.rambo.codes) ([github repo](https://github.com/insidegui/MultipeerKit)).\nThis repository, with it's workspace and targets, is how I'm answering that question.\n\nI found other repositories that worked MultipeerConnectivity to create benchmarks, but most of them are\ndated and didn't directly compile. This is written with Swift 5, simple UI with SwiftUI, and has targets\nbuilding for macOS, iOS, and tvOS.\n\nThere are two sides to this \"benchmark generator app\": a reflector and a test runner.\n\n- The reflector broadcasts that it's open to chat and reflects back any data sent to it.\n- The test runner is the UI that can be used to trigger data sends and collects data about how it's operating.\n\nIt's up to you - running the benchmark - to configure your devices appropriately if you want to see differences in transport modes.\n\nBecause MultipeerConnectivity works over bluetooth or wifi, and seamlessly across both - and iOS doesn't provide\nmechanisms to control what's on and off, I'm leaving that to the user setup if that's a dimension you want to gather\nmeasurements against.\n\nThe project includes 3 reflector targets and 2 test-runner targets.\n\nReflector\n- macOS\n- iOS\n- tvOS\n\nTest Runner\n- macOS\n- iOS\n\n## Command Line Builds\n\n### Development setup\n\n    brew bundle\n\ninvestigating the workspace:\n\n    xcodebuild -list -workspace MPCF-TestBench.xcworkspace\n\nschemes:\n\n    MPCF-Reflector-ios\n    MPCF-Reflector-mac\n    MPCF-Reflector-tvOS\n    MPCF-TestRunner-ios\n    MPCF-TestRunner-mac\n\n### building the projects on the command line\n\n    xcodebuild -workspace MPCF-TestBench.xcworkspace \\\n    -scheme MPCF-Reflector-ios \\\n    -destination 'platform=iOS Simulator,OS=13.4,name=iPhone 8'\n\n    xcodebuild -workspace MPCF-TestBench.xcworkspace \\\n    -scheme MPCF-TestRunner-ios \\\n    -destination 'platform=iOS Simulator,OS=13.4,name=iPhone 8'\n\n    xcodebuild -workspace MPCF-TestBench.xcworkspace \\\n    -scheme MPCF-Reflector-mac\n\n    xcodebuild -workspace MPCF-TestBench.xcworkspace \\\n    -scheme MPCF-TestRunner-mac\n\n    xcodebuild -workspace MPCF-TestBench.xcworkspace \\\n    -scheme MPCF-Reflector-tvOS \\\n    -destination 'platform=tvOS Simulator,OS=13.4,name=Apple TV'\n\n### linting the code\n\n    brew bundle\n    swift format lint --configuration .swift-format-config -r .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheckj%2Fmpcf-testbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheckj%2Fmpcf-testbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheckj%2Fmpcf-testbench/lists"}