{"id":17055399,"url":"https://github.com/loganlinn/har-wrk","last_synced_at":"2025-03-23T06:15:50.718Z","repository":{"id":138879857,"uuid":"89660322","full_name":"loganlinn/har-wrk","owner":"loganlinn","description":"Tiny utility for benchmarking with HTTP requests from a HAR file","archived":false,"fork":false,"pushed_at":"2017-04-28T03:27:10.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T04:54:58.164Z","etag":null,"topics":["benchmark","har","lua-script","wrk"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/loganlinn.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":"2017-04-28T02:41:48.000Z","updated_at":"2018-07-03T20:42:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbf8d4d3-abb2-4e78-9448-ad507aa17be2","html_url":"https://github.com/loganlinn/har-wrk","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/loganlinn%2Fhar-wrk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loganlinn%2Fhar-wrk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loganlinn%2Fhar-wrk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loganlinn%2Fhar-wrk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loganlinn","download_url":"https://codeload.github.com/loganlinn/har-wrk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061374,"owners_count":20554563,"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","har","lua-script","wrk"],"created_at":"2024-10-14T10:18:07.419Z","updated_at":"2025-03-23T06:15:50.673Z","avatar_url":"https://github.com/loganlinn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# har-wrk\n\n\u003e benchmarking shouldnt be har-wrk\n\nThis is a dead-simple utility for using the [wrk HTTP benchmarking\ntool](https://github.com/wg/wrk/) and [HAR\nfiles](http://www.softwareishard.com/blog/har-12-spec/) to make the same\nrequests to your server that your browser does.\n\nIt generates a [Lua](https://www.lua.org/) script for wrk that continuously\nmakes a series of requests you choose from a HAR file.\n\n### 1. Setup\n\nInstall requirements: Node.js and wrk.\n\n```\n# on a mac\nbrew install node\nbrew install wrk\n```\n\nClone this repo and install dependencies:\n\n```\ngit clone git@github.com:loganlinn/har-wrk.git\ncd har-wrk\nnpm install\n```\n\n### 2. Get a HAR file\n\nUsing your browser of choice ([or some other HAR\ntool](http://www.softwareishard.com/blog/har-adopters/)), capture a set of\nrequests that you want to benchmark into a HAR file.\n\n### 3. Update `entryFilter.js` as necessary\n\nUpdate the function that determines whether request of a [HAR\nentry](http://www.softwareishard.com/blog/har-12-spec/#entries) should be\nincluded in the output.\n\nAt a minimum, you'll want to filter to the requests made to the server you'll be\nbenchmarking by looking at `entry.request.url`.\n\n### 4. Generate Lua script\n\nThe `harToWrkScript.js` takes HAR file on STDIN and writes a Lua script to\nSTDOUT.\n\n```\nharToWrkScript.js \u003c input.har \u003e script.lua\n```\n\nTake a peek at the generated script to make sure it has the requests you want to\nbenchmark.\n\n### 5. Run benchmark\n\nRun `wrk` with the script and specify a base URL. See `wrk --help` for available\noptions.\n\n```\nwrk -s script.lua http://localhost:8080\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floganlinn%2Fhar-wrk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floganlinn%2Fhar-wrk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floganlinn%2Fhar-wrk/lists"}