{"id":26299236,"url":"https://github.com/trackit/stream-tester","last_synced_at":"2025-09-06T19:33:56.331Z","repository":{"id":89793016,"uuid":"305975813","full_name":"trackit/stream-tester","owner":"trackit","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-21T09:39:59.000Z","size":65159,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-03-09T02:07:32.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/trackit.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":"2020-10-21T09:37:16.000Z","updated_at":"2024-06-19T07:45:48.827Z","dependencies_parsed_at":null,"dependency_job_id":"32e0ace7-0836-4848-a183-853cf6ce31dd","html_url":"https://github.com/trackit/stream-tester","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/trackit/stream-tester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trackit%2Fstream-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trackit%2Fstream-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trackit%2Fstream-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trackit%2Fstream-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trackit","download_url":"https://codeload.github.com/trackit/stream-tester/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trackit%2Fstream-tester/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261057732,"owners_count":23103709,"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":"2025-03-15T06:47:52.412Z","updated_at":"2025-06-21T03:35:16.951Z","avatar_url":"https://github.com/trackit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README #\n\nStream tester\n\n### High level design\n* Golang test\n    * Creates influencer\n    * Pre-creates (some) fans, follows influencer\n    * Starts stream\n    * Starts spinning up fans that watch influencer's stream (either in process or over SSH remotely)\n    * Collects CSV log lines that show stream progress\n* Python visualizer\n    * Reads CSV log lines and outputs a basic UI with bitrates and N stream lagged\n\n### Setup dev environment ###\n\n* `$ export GOPATH=/path/to/your/go/workspace`\n* Clone this repository into the src folder of your GO workspace `git clone ... $GOPATH/src/trackit/stream-tester` (https://golang.org/doc/code.html#Overview)\n* Build the project:\n    ```\n    $ cd $GOPATH/src/github.com/trackit/stream-tester\n    $ go install\n    ```\n* Add dependencies to `vendor`\n    ```\n    $ govendor get github.com/trackit/stream-tester\n    ```\n\n### Build infrastructure ###\n\n* Builds AMI using packer\n    * Installs ffmpeg, rtmpdump, golang\n    * Git exports latest or specified revision\n    * Builds during AMI creation\n    * Installs display script and others\n* Builds infra using terraform, all nodes interchangeable\n\n#### Install prerequisites\n\nOn mac OS X with homebrew\n```\n$ brew install terraform\n$ brew install packer\n$ brew install git\n```\n\notherwise download and install from\n\nhttps://www.terraform.io/intro/getting-started/install.html  \nhttps://learn.hashicorp.com/tutorials/packer/getting-started-install  \n\nand use your system's package management to install git\n\n#### Creating infrastructure\n\n```\n$ cd ${GOPATH}/src/github.com/trackit/stream-tester/infra # or wherever you've unpacked this repo\n$ cat config.json # adjust config.json for right number of instances etc.\n{\n    \"aws_access_key\": \"AWS_ACCESS_KEY\",\n    \"aws_secret_key\": \"AWS_SECRET_KEY\",\n    \"aws_region\": \"AWS_REGION\",\n    \"instance_type\": \"AWS_ISTANCE_TYPE\",\n    \"number_instances\": \"AWS_NUMBER_OF_INSTANCES\",\n    \"security_group_id\": \"AWS_SECURITY_GROUP_ID\",\n    \"subnet_id\": \"AWS_SUBNET_ID\",\n    \"source_ami\": \"AWS_AMI\"\n}\n```\n\nNow, you have to copy/paste your aws public/private ssh key into infra/files directory.  \nAnd then execute **build.sh**:\n\n```\n$ ./build.sh\n```\n\n### Run test on built servers\n\n```\n$ terraform output\nnodeip = [\n    54.67.25.209,\n    54.183.51.216,\n    54.183.13.55\n]\n$ ssh -i files/id_rsa -l ubuntu 54.67.25.209 # any of the above IPs will work\n$ runtest --help\nUsage of stream_test runtest:\n  -email string\n        influencer email (default \"trackit@trackit.io\")\n  -existingoffset int\n        sequence number offset for existing users\n  -percentnew int\n        0-100 percentage of new fan users in test\n  -precreatefans\n        pre-create fans and follow influencer (not needed on repeat runs)\n  -ramp duration\n        time between users joining, e.g. 200ms (default 500ms)\n  -sleepbetweensteps\n  \tSleep between steps as a fan\n  -sshhosts string\n        space separated list of user@host to run test on (clustered)\n  -sshkeyfile string\n        path to SSH private key file\n  -token string\n        influencer token (default \"4352915049.1677ed0.13fb746250c84b928b37360fba9e4d57\")\n  -timeout duration\n    \tResponse time before timeout, e.g. 500ms\n  -users int\n        number of concurrent users (default 10)\n  -videopath string\n        path to video file used in test (default \"640.flv\")\n/usr/local/bin/runtest: line 26:  3620 Terminated              tail -n +0 -f lastrun.stderr 1\u003e\u00262\n$ runtest --users 10 # runs test with 10 users\n```\n\n### Teardown infrastructure\n\n```\n$ cd ${GOPATH}/src/github.com/trackit/stream-tester/infra # or wherever you've unpacked this repo\n$ ./destroy.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrackit%2Fstream-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrackit%2Fstream-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrackit%2Fstream-tester/lists"}