{"id":17161145,"url":"https://github.com/barryvanveen/ab-runner","last_synced_at":"2025-04-13T14:11:38.315Z","repository":{"id":43349406,"uuid":"461252980","full_name":"barryvanveen/ab-runner","owner":"barryvanveen","description":"Apache Benchmark runner and plotter","archived":false,"fork":false,"pushed_at":"2022-03-06T21:26:40.000Z","size":20,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T05:12:36.949Z","etag":null,"topics":["ab","apache","benchmark","gnuplot","performance-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/barryvanveen.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":"2022-02-19T16:48:14.000Z","updated_at":"2025-02-20T22:31:00.000Z","dependencies_parsed_at":"2022-09-01T02:20:54.125Z","dependency_job_id":null,"html_url":"https://github.com/barryvanveen/ab-runner","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/barryvanveen%2Fab-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barryvanveen%2Fab-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barryvanveen%2Fab-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barryvanveen%2Fab-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barryvanveen","download_url":"https://codeload.github.com/barryvanveen/ab-runner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724629,"owners_count":21151561,"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":["ab","apache","benchmark","gnuplot","performance-testing"],"created_at":"2024-10-14T22:27:19.076Z","updated_at":"2025-04-13T14:11:38.294Z","avatar_url":"https://github.com/barryvanveen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AB runner\nAn opinionated Apache Benchmark (`ab`) runner and result plotter.\n\n![Comparison boxplot example](./docs/comparison_250.png)\n\n## Purpose\n\nRunning `ab` once can give unreliable results. Maybe your server is doing other work or your machine running the test is busy. To circumvent that issue, this script can take multiple measurements with a wait time in between.\n\n## Contents\n- [Installation](#installation)\n- [Quick start](#quick-start)\n- [Measure](#measure)\n- [Compare](#compare)\n- [Troubleshooting](#troubleshooting)\n\n## Installation\n\nRequirements:\n- A unix terminal (tested on macOS)\n- [Apache Benchmark (ab)](https://httpd.apache.org/docs/2.4/programs/ab.html)\n- [Gnuplot](http://gnuplot.info/)\n- [NodeJS](https://nodejs.org/en/) (\u003e= 14.6)\n\nTo install:\n- Clone this repository.\n- Run `npm install`\n\n## Quick start\n\n```shell\n./abrunner.js measure --help\n./abrunner.js compare --help\n```\n\n## Measure\n\nA typical run can be started like this:\n```shell\n./abrunner.js measure -u https://localhost.test/ -o results/foo\n```\n\nThis used the default settings. It will run 10 measurements of 500 requests with 10 concurrency. Between each measurement it will wait for 5 minutes. The results will be stored in `./results/foo`.\n\nFor more advanced options, read the [advanced measure docs](./docs/measure_advanced.md).\n\n### Results\n\nRunning this command will create a bunch of outputs:\n- `iteration*.dat` files contain the `ab` raw measurements\n- `iteration*.out` files contain the `ab` output (that is normally outputted in the terminal)\n- `combined.dat` contains all combined measurements\n- `combined.stats` contain some statistics collected from the combined measurements\n- `measure.png` contains a plot with which you can visually inspect the response times of the individual runs and everything combined\n- `measure.p` is the Gnuplot script used to create above plot\n\n## Compare\n\nCompare any number of measurements you took before. The result will be a combined boxplot.\n\nFor each measurement you want to incorporate into the comparison, provide the `combined.dat` datafile (or another `ab` gnuplot output file) and an appropriate label.\n\n```shell\n./abrunner.js compare -i results/foo/combined.dat results/bar/combined.dat -l \"Foo\" \"Bar\" -o results/comparison\n```\n\n### Results\n\nRunning this command will create a bunch of outputs:\n- `run*.dat` files are a copy of the input files\n- `run*.stats` files contain some statistics collected from the input file\n- `compare.png` contains a plot comparing all input files\n- `compare.p` is the Gnuplot script used to create above plot\n\nThe comparison plot will look something like this:\n\n![Example comparison plot](./docs/comparison.png)\n\n## Troubleshooting\n\nWhen running a new measurement, the `iteration*.out` file captures the `ab` output. Sometimes this contains an error that helps you pinpoint the problem.\n\nIf you run `ab` against a domain, make sure it ends with a `/`. If the url includes a path this should not be a problem.\n\nThe `output.log` file always contains always contains a list of the command input and all commands that were run. If somehow the input arguments are not parsed correctly, you should be able to spot that here.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarryvanveen%2Fab-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarryvanveen%2Fab-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarryvanveen%2Fab-runner/lists"}