{"id":21917268,"url":"https://github.com/condy0919/moros","last_synced_at":"2025-04-19T07:35:42.839Z","repository":{"id":71860181,"uuid":"159893092","full_name":"condy0919/moros","owner":"condy0919","description":"A modern http(s) benchmark tool","archived":false,"fork":false,"pushed_at":"2019-01-27T18:03:14.000Z","size":79,"stargazers_count":14,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T06:51:36.459Z","etag":null,"topics":["benchmark","cpp14","http","https"],"latest_commit_sha":null,"homepage":"","language":"C++","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/condy0919.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,"publiccode":null,"codemeta":null}},"created_at":"2018-12-01T00:26:03.000Z","updated_at":"2020-04-10T05:40:35.000Z","dependencies_parsed_at":"2023-06-13T05:45:38.916Z","dependency_job_id":null,"html_url":"https://github.com/condy0919/moros","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/condy0919%2Fmoros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/condy0919%2Fmoros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/condy0919%2Fmoros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/condy0919%2Fmoros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/condy0919","download_url":"https://codeload.github.com/condy0919/moros/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249638251,"owners_count":21304305,"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":["benchmark","cpp14","http","https"],"created_at":"2024-11-28T19:29:14.788Z","updated_at":"2025-04-19T07:35:42.832Z","avatar_url":"https://github.com/condy0919.png","language":"C++","readme":"|CI          |Host OS    |Build Status|\n|------------|-----------|------------|\n|**CircleCi**|Debian 9   |[![CircleCI](https://circleci.com/gh/condy0919/moros.svg?style=svg)](https://circleci.com/gh/condy0919/moros)|\n\n# moros\n\nmoros is a modern HTTP benchmark tool capable of generating significant load even when using single thread.\n\nAn optional plugin(using `shared library`) can perform HTTP request generating, response processing and more on.\n\n## Basic\n\n```bash\nmoros http://localhost/a.zip\n```\n\nThis runs  a benchmark with the following default setting:\n\n```\nthreads:        1\nconnections:    10\nduration:       10s\ntimeout:        2s\n```\n\nOutput:\n\n```\nRunning 10s test @ http://localhost/a.zip\n  1 thread(s) and 10 connection(s) each\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency      0ms        0ms     5ms     99.9979%\n    Req/Sec   46.53K      3.23K  51.17K          61%\n  473743 requests in 10s, 3.72GB read\nRequests/sec: 47374.3\nTransfer/sec: 380.56MB\n```\n\n## Command Line Options\n\n```\n-p, --plugin:       Load plugin\n-H, --Header:       HTTP header\n-t, --threads:      The number of HTTP benchers\n-c, --connections:  The number of HTTP connections per bencher\n-d, --duration:     Duration of the benchmark\n-T, --timeout:      Mark HTTP request timeouted if HTTP response is not\n                    received within this amount of time\n-l, --latency:      Print latency distribution\n```\n\n## Tips\n\nMake sure file descriptors is enough. Use `ulimit -n unlimited`to handle this.\n\n## Installation\n\nArch Linux\n```bash\nyay -S moros-git\n```\n\nThe other can build from source.\n\n`moros`depends on`boost.program_options`and`openssl`library.\n\nInstall these 2 packages first.\n```bash\ngit clone https://github.com/condy0919/moros\n\ncd moros\ngit submodule update --init --recursive # nodejs/http-parser\n\ncmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release\ncmake --build build\n```\nThe`moros`binary will be placed in `moros/bin/`.\n\n## Plugin Interface\n* **setup()**\n\n  _setup_ begins before the target address has been resolved and all benchers uninitialized.\n\n* **init()**\n\n  _init_ begins after each bencher initialized.\n\n* **request(schema, host, port, serivce, query\\_string, headers[])**\n\n  _request_ generates a new HTTP request each time, which is expensive.\n\n  Generating lots of HTTP requests one time and amortizing the cost is a good solution.\n\n* **response(status, headers[], body, body\\_len)**\n\n  _response_ is called with HTTP response status, headers[], body.\n\n  In default, only status is valid.\n\n  Making `want_response_headers` and `want_response_body` symbols\n\n  visible in plugin to process headers and body.\n\n* **summary()**\n\n  _summary_ can report some data collected in above functions.\n\n## TODO\n- [ ] follow 302\n- [ ] async dns resolve\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcondy0919%2Fmoros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcondy0919%2Fmoros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcondy0919%2Fmoros/lists"}