{"id":20571995,"url":"https://github.com/netease/pomelo-robot","last_synced_at":"2025-07-30T03:38:56.389Z","repository":{"id":4400235,"uuid":"5537407","full_name":"NetEase/pomelo-robot","owner":"NetEase","description":"the client test framework for websocket ","archived":false,"fork":false,"pushed_at":"2015-12-03T08:11:11.000Z","size":14770,"stargazers_count":41,"open_issues_count":0,"forks_count":34,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-07-09T15:50:11.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"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/NetEase.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}},"created_at":"2012-08-24T07:58:48.000Z","updated_at":"2024-03-29T15:22:16.000Z","dependencies_parsed_at":"2022-09-11T07:10:23.083Z","dependency_job_id":null,"html_url":"https://github.com/NetEase/pomelo-robot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NetEase/pomelo-robot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEase%2Fpomelo-robot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEase%2Fpomelo-robot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEase%2Fpomelo-robot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEase%2Fpomelo-robot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NetEase","download_url":"https://codeload.github.com/NetEase/pomelo-robot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetEase%2Fpomelo-robot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267804058,"owners_count":24146530,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-16T05:17:59.349Z","updated_at":"2025-07-30T03:38:56.359Z","avatar_url":"https://github.com/NetEase.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#pomelo-robot\npomelo-robot is a simple tool to benchmark the socket.io server's performance.\n\npomelo-robot can run in multiple mode such as single machine or distributed machines with many processes.\n\npomelo-robot executes developer's custom javascript in a sand box and statistical analysis monitors including avg(min/max) responsing time and QPS, etc. Then reports data to the http server with graph display.\n\npomelo-robot can be also used in http benchmark with developer script.\n\n\n##Installation\n```\nnpm install pomelo-robot\n```\n\n##Usage\n``` javascript\nvar envConfig = require('./app/config/env.json');\nvar config = require('./app/config/' + envConfig.env + '/config');\nvar Robot = require('pomelo-robot').Robot;\n\nvar robot = new Robot(config);\nvar mode = 'master';\n\nif (process.argv.length \u003e 2){\n  mode = process.argv[2];\n}\n\nif (mode !== 'master' \u0026\u0026 mode !== 'client') {\n  throw new Error(' mode must be master or client');\n}\n\nif (mode === 'master') {\n  robot.runMaster(__filename);\n} else {\n  var script = (process.cwd() + envConfig.script);\n  robot.runAgent(script);\n}\n``` \n\n##API\n###robot.runMaster()\nrun master server and http server, then init server status including clients with startup file. \n####Arguments\n+ startupFile - The master server auto startup agent file name, default is current running file;\n\n###robot.runAgent()\nrobot run in client agent mode.\n####Arguments\n+ script - The developer's custom script that the agent will execute. \n\n###Notice\nWhen pomelo-robot run in distribute mode, every client should be in same directory path and master could be ssh login automatic. Otherwise developer can start up agent manually. For the custom script, refer to [the demo](https://github.com/NetEase/pomelo-robot-demo).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetease%2Fpomelo-robot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetease%2Fpomelo-robot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetease%2Fpomelo-robot/lists"}