{"id":13582546,"url":"https://github.com/mrichman/hargo","last_synced_at":"2025-04-05T16:09:42.069Z","repository":{"id":47223929,"uuid":"71240891","full_name":"mrichman/hargo","owner":"mrichman","description":"Hargo is a Go library and command line utility that parses HAR files, can convert to curl format, and serve as a load test driver.","archived":false,"fork":false,"pushed_at":"2024-07-08T01:11:41.000Z","size":4558,"stargazers_count":241,"open_issues_count":4,"forks_count":34,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-29T15:07:40.652Z","etag":null,"topics":["chronograf","curl","go","golang","grafana","har","har-files","http","http-request","http-requests","influxdb","load-testing","performance-testing"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mrichman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2016-10-18T11:24:45.000Z","updated_at":"2025-03-10T12:18:03.000Z","dependencies_parsed_at":"2024-02-13T02:31:30.516Z","dependency_job_id":"17be0d2f-bf96-4ef2-a2b6-c7646d6aa255","html_url":"https://github.com/mrichman/hargo","commit_stats":{"total_commits":97,"total_committers":17,"mean_commits":5.705882352941177,"dds":0.7216494845360825,"last_synced_commit":"8fe101f2d50033ff4b8b7502a211a79deb1934bf"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrichman%2Fhargo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrichman%2Fhargo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrichman%2Fhargo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrichman%2Fhargo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrichman","download_url":"https://codeload.github.com/mrichman/hargo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361693,"owners_count":20926643,"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":["chronograf","curl","go","golang","grafana","har","har-files","http","http-request","http-requests","influxdb","load-testing","performance-testing"],"created_at":"2024-08-01T15:02:49.393Z","updated_at":"2025-04-05T16:09:42.024Z","avatar_url":"https://github.com/mrichman.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 --\u003e\n\n# \u003cimg src=\"./img/hargo-logo.png\" height=\"40\"\u003e Hargo\n\n[![Hargo Build Status](https://travis-ci.org/mrichman/hargo.svg?branch=master)](https://travis-ci.org/mrichman/hargo)\u0026nbsp;[![GoDoc](https://godoc.org/github.com/mrichman/hargo?status.svg)](https://godoc.org/github.com/mrichman/hargo) [![Go Report Card](https://goreportcard.com/badge/github.com/mrichman/hargo)](https://goreportcard.com/report/github.com/mrichman/hargo) [![Join the chat at https://gitter.im/mrichman/hargo](https://badges.gitter.im/mrichman/hargo.svg)](https://gitter.im/mrichman/hargo) [![GitHub license](https://img.shields.io/github/license/mrichman/hargo.svg)](https://github.com/mrichman/hargo/blob/master/LICENSE)\n [![GitHub issues](https://img.shields.io/github/issues/mrichman/hargo.svg)](https://github.com/mrichman/hargo/issues) [![Twitter](https://img.shields.io/twitter/url/https/github.com/mrichman/hargo.svg?style=plastic)](https://twitter.com/intent/tweet?text=Wow:\u0026url=https%3A%2F%2Fgithub.com%2Fmrichman%2Fhargo)\n\nHargo parses [HAR](https://en.wikipedia.org/wiki/.har) files, can convert to curl format, and serve as a load test driver.\n\n```text\nNAME:\n   hargo - work with HTTP Archive (.har) files\n\nUSAGE:\n   hargo \u003ccommand\u003e [arguments] \u003c.har file\u003e\n\nVERSION:\n   0.2.0\n\nAUTHOR:\n   Mark A. Richman \u003cmark@markrichman.com\u003e\n\nCOMMANDS:\n     fetch, f     Fetch URLs in .har\n     curl, c      Convert .har to curl\n     run, r       Run .har file\n     validate, v  Validate .har file\n     dump, d      Dump .har file\n     load, l      Load test .har file\n     help, h      Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --debug        Show debug output\n   --help, -h     show help\n   --version, -v  print the version\n\nCOPYRIGHT:\n   (c) 2024 Mark A. Richman\n```\n\n## Building and Running Hargo\n\n```sh\ngit clone https://github.com/mrichman/hargo.git\ncd hargo\nmake install\nhargo validate test/golang.org.har\n```\n\n## About HAR Files\n\nIf you use Google Chrome, you can record these files by following the steps below:\n\n1. Right-click anywhere on that page and click on Inspect Element to open Chrome's Developer Tools\n2. The Developer Tools will open as a panel at the bottom of the page. Click on the Network tab.\n3. Click the Record button, which is the solid black circle at the bottom of the Network tab, and you'll start recording activity in your browser.\n4. Refresh the page and start working normally\n5. Right-click within the Network tab and click Save as HAR with Content to save a copy of the activity that you recorded.\n6. Within the file window, save the HAR file.\n\n## Commands\n\n### Fetch\n\nThe `fetch` command downloads all resources references in .har file:\n\n`hargo fetch foo.har`\n\nThis will produce a directory named `hargo-fetch-yyyymmddhhmmss` containing all assets references by the .har file. This is similar to what you'd see when invoking `wget` on a particular URL.\n\n### Curl\n\nThe `curl` command will output a [curl](https://curl.haxx.se/) command line for each entry in the .har file.\n\n`hargo curl foo.har`\n\n### Run\n\nThe `run` command executes each HTTP request in .har file:\n\n`hargo run foo.har`\n\nThis is similar to `fetch` but will not save any output.\n\n### Validate\n\nThe `validate` command will report any errors in the format of a .har file.\n\n`hargo validate foo.har`\n\nHAR file format is defined here: \u003chttps://w3c.github.io/web-performance/specs/HAR/Overview.html\u003e\n\n### Dump\n\nDump prints information about all HTTP requests in .har file\n\n`hargo dump foo.har`\n\n### Load\n\nHargo can act as a load test agent. Given a .har file, hargo can spawn a number of concurrent workers to repeat each HTTP request in order. By default, hargo will spawn 10 workers and run for a duration of 60 seconds.\n\nHargo will also save its results to [InfluxDB](https://www.influxdata.com/), if available. Each HTTP response is stored as a point of time-series data, which can be graphed by [Chronograf](https://www.influxdata.com/time-series-platform/chronograf/), [Grafana](http://grafana.org/), or similar visualization tool for analysis.\n\n## Docker\n\n### Build container\n\n```docker\ndocker build -t hargo .\n```\n\n### Run container\n\n```docker\ndocker run --rm -v `pwd`/test:/test hargo hargo run /test/golang.org.har\n```\n\n## Docker-compose\n\nThe example docker-compose file will start three containers:\n\n- hargo\n- influxdb\n- grafana\n\nThe hargo container will first needs to be built. See [build](#build-container). When the compose file is run it will start a hargo load process that will write the results to InfluxDB. This InfluxDB instance can be viewed using the [grafana container](http://localhost:3000). This contains an example dashboard showing the latency of the executed request. Username/password for all the containers is hargo/hargo.\n\n### commands\n\n```docker-compose\ncd example/docker-compose\ndocker-compose up\ndocker-compose down -v\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrichman%2Fhargo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrichman%2Fhargo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrichman%2Fhargo/lists"}