{"id":20424208,"url":"https://github.com/itpey/taz","last_synced_at":"2026-06-08T10:02:19.240Z","repository":{"id":207704211,"uuid":"709014406","full_name":"itpey/taz","owner":"itpey","description":"A simple yet powerful load testing framework for Go.","archived":false,"fork":false,"pushed_at":"2024-05-02T22:04:29.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T04:42:58.353Z","etag":null,"topics":["api","attack","bugbounty","ddos","go","high-performance","load-testing","penetration-testing","pentesting","pentesting-tools","testing","unit-test","unittesting"],"latest_commit_sha":null,"homepage":"https://github.com/itpey/taz","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itpey.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":"2023-10-23T20:57:28.000Z","updated_at":"2024-08-16T08:42:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"d663249e-5c69-41ba-a7a1-06cdcc7924c1","html_url":"https://github.com/itpey/taz","commit_stats":null,"previous_names":["itpey/taz"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/itpey/taz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itpey%2Ftaz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itpey%2Ftaz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itpey%2Ftaz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itpey%2Ftaz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itpey","download_url":"https://codeload.github.com/itpey/taz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itpey%2Ftaz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34057158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":["api","attack","bugbounty","ddos","go","high-performance","load-testing","penetration-testing","pentesting","pentesting-tools","testing","unit-test","unittesting"],"created_at":"2024-11-15T07:08:55.487Z","updated_at":"2026-06-08T10:02:19.222Z","avatar_url":"https://github.com/itpey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # \"Title: taz\"\n[//]: # \"Author: itpey\"\n[//]: # \"Attendees: itpey\"\n[//]: # \"Tags: #itpey #go #load #golang #go-lang #test #api #http #tazmani\"\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt= \"itpey taz tazmani \" src=\"https://raw.githubusercontent.com/itpey/taz/main/static/images/taz_icon.png\" width=\"168\" height=\"200\" border=\"10\"/\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eTaz - A Go Load Testing Framework\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  A simple yet powerful load testing framework for Go, designed to help you simulate and measure the performance of your applications under various loads.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/itpey/taz\"\u003e\n    \u003cimg src=\"https://pkg.go.dev/badge/github.com/itpey/taz.svg\" alt=\"itpey taz Go Reference\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/itpey/taz/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/itpey/taz\" alt=\"itpey taz license\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Features\n\n- **Configurability:** Taz allows you to fine-tune your load tests by specifying the number of worker goroutines, desired requests per second, and the total number of requests to send.\n\n- **Response Times:** Measure the response times for each request to gain insights into your application's performance.\n\n- **Error Handling:** Track and report errors encountered during load testing to help identify potential issues.\n\n- **Context Support:** Utilize Go's context package to manage the load test's lifecycle and control its execution.\n\n## Getting Started\n\n## Installation\n\nTo start using Taz in your Go project, follow these simple steps:\n\n```bash\ngo get github.com/itpey/taz\n```\n\n## Usage\n\nImport the Taz package in your code:\n\n```go\nimport \"github.com/itpey/taz\"\n```\n\nCreate a LoadTestConfig to configure your load test:\n\n```go\nconfig := taz.LoadTestConfig{\n    WorkerCount:       10,\n    RequestsPerSecond: 100,\n    TotalRequests:     1000,\n    LoadTestFunc: func() error {\n        // Your workload simulation logic here\n        return nil\n    },\n}\n```\n\nExecute the load test using the RunLoadTest function:\n\n```go\nresult, err := taz.RunLoadTest(context.Background(), config)\nif err is not nil {\n    // Handle errors\n}\n```\n\n# Configuration\n\nTaz offers several configuration options to customize your load tests:\n\n- **WorkerCount:** The number of worker goroutines to use in the load test.\n\n- **RequestsPerSecond:** The desired rate of requests to be sent per second.\n\n- **TotalRequests:** The total number of requests to send during the load test.\n\n- **LoadTestFunc:** A user-defined function that simulates the workload for each request.\n\n# Results\n\nThe RunLoadTest function returns a LoadTestResult structure that contains important information:\n\n- **ResponseTimes:** An array of response times for each request, allowing you to analyze performance.\n\n- **Errors:** An array of errors encountered during the load test, helping you identify potential issues.\n\n# Error Handling\n\nProper error handling is crucial when working with Taz. Check the Errors array in the LoadTestResult to identify and troubleshoot any issues that may have occurred during the load test.\n\n# Examples\n\nHere's an example of a simple load test using Taz:\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math/rand\"\n\t\"github.com/itpey/taz\"\n\t\"time\"\n)\n\nfunc main() {\n\t// Define the load test configuration\n\tconfig := taz.LoadTestConfig{\n\t\tWorkerCount:       10,\n\t\tRequestsPerSecond: 100,\n\t\tTotalRequests:     1000,\n\t\tLoadTestFunc:      simulateWorkload,\n\t}\n\n\t// Create a context\n\tctx, cancel := context.WithCancel(context.Background())\n\tdefer cancel()\n\n\t// Run\n\tresult, err := taz.RunLoadTest(ctx, config)\n\n\t// Check for errors\n\tif err != nil {\n\t\tfmt.Printf(\"Error: %v\\n\", err)\n\t\treturn\n\t}\n\n\t// Output load test results\n\tfmt.Printf(\"Load Test Results:\\n\")\n\tfmt.Printf(\"Total Requests: %d\\n\", config.TotalRequests)\n\tfmt.Printf(\"Successful Requests: %d\\n\", config.TotalRequests-uint64(len(result.Errors)))\n\tfmt.Printf(\"Failed Requests: %d\\n\", len(result.Errors))\n\tfmt.Printf(\"Average Response Time: %s\\n\", calculateAverageResponseTime(result.ResponseTimes))\n}\n\n// Simulate a workload by sleeping for a random duration (representing the work being done).\nfunc simulateWorkload() error {\n\t// Simulate a workload by sleeping for a random duration between 100ms and 500ms.\n\tsleepDuration := time.Duration(rand.Intn(400)+100) * time.Millisecond\n\ttime.Sleep(sleepDuration)\n\treturn nil\n}\n\n// Calculate the average response time from the list of response times.\nfunc calculateAverageResponseTime(responseTimes []time.Duration) time.Duration {\n\tif len(responseTimes) == 0 {\n\t\treturn 0\n\t}\n\n\tvar total time.Duration\n\tfor _, rt := range responseTimes {\n\t\ttotal += rt\n\t}\n\treturn total / time.Duration(len(responseTimes))\n}\n```\n\n# Running Tests\n\nTo run tests for Taz, use the following command:\n\n```bash\ngo test github.com/itpey/taz\n```\n\n# Feedback and Contributions\n\nIf you encounter any issues or have suggestions for improvement, please [open an issue](https://github.com/itpey/taz/issues) on GitHub.\n\nWe welcome contributions! Fork the repository, make your changes, and submit a pull request.\n\n# License\n\nTaz is open-source software released under the Apache License, Version 2.0. You can find a copy of the license in the [LICENSE](https://github.com/itpey/taz/blob/main/LICENSE) file.\n\n# Author\n\nTaz was created by [itpey](https://github.com/itpey)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitpey%2Ftaz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitpey%2Ftaz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitpey%2Ftaz/lists"}