{"id":33215670,"url":"https://github.com/itsMohammadHeidari/Telcometer","last_synced_at":"2025-11-21T07:01:50.807Z","repository":{"id":230963799,"uuid":"771168960","full_name":"itsMohammadHeidari/Telcometer","owner":"itsMohammadHeidari","description":"Diameter Credit-Control Application Load Testing script powered by Grafana K6","archived":false,"fork":false,"pushed_at":"2024-08-02T16:27:56.000Z","size":73,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-03T17:20:00.430Z","etag":null,"topics":["diameter","k6","load-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itsMohammadHeidari.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":"2024-03-12T20:12:09.000Z","updated_at":"2024-08-02T16:27:59.000Z","dependencies_parsed_at":"2024-08-02T17:25:26.554Z","dependency_job_id":null,"html_url":"https://github.com/itsMohammadHeidari/Telcometer","commit_stats":null,"previous_names":["itsmohammadheidari/telcometer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsMohammadHeidari/Telcometer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsMohammadHeidari%2FTelcometer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsMohammadHeidari%2FTelcometer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsMohammadHeidari%2FTelcometer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsMohammadHeidari%2FTelcometer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsMohammadHeidari","download_url":"https://codeload.github.com/itsMohammadHeidari/Telcometer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsMohammadHeidari%2FTelcometer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285573085,"owners_count":27194648,"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","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"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":["diameter","k6","load-testing"],"created_at":"2025-11-16T13:00:29.584Z","updated_at":"2025-11-21T07:01:50.802Z","avatar_url":"https://github.com/itsMohammadHeidari.png","language":"JavaScript","funding_links":[],"categories":["Testing"],"sub_categories":["GPS, Time"],"readme":"# Diameter Credit-Control Application Load Testing with K6  \n\n## Table of contents\n\n- [Overview](#overview)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n- [Acknowledgements](#acknowledgements)\n- [Contact](#contact)\n\n## Overview\n\n\u003e [!NOTE]\n\u003e\n\u003e The Diameter Credit-Control Application serves as a foundational framework for real-time charging, facilitating communication between gateways/control-points and the back-end account/balance systems. This is particularly crucial for the integration with an Online Charging System (e.g. [Cgrates](https://github.com/cgrates/cgrates)), enabling seamless and efficient management of end-user services.\n\nThis project provides a K6 script tailored for load testing Diameter Credit-Control Applications, as specified in IETF standards [RFC 4006](https://www.rfc-editor.org/rfc/rfc4006) and [RFC 8506](https://www.rfc-editor.org/rfc/rfc8506).  \nThe script is designed to emulate real-world credit-control scenarios for a variety of end-user services, ensuring the resilience and scalability of Diameter-based systems under significant loads.  \nSpecifically, it simulates the interactions within a LTE core network (e.g. [Open5gs](https://github.com/open5gs/open5gs)) and a IP multimedia subsystem (e.g. [Kamailio](https://github.com/open5gs/open5gs)) packets, closely mimicking the behavior of real-world ISP providers charging systems.  \nThis simulation is crucial for validating the performance and reliability of Diameter Credit-Control Applications under various load conditions, providing insights into potential bottlenecks and areas for optimization.\n\n## Prerequisites\n\n\u003e [!IMPORTANT]  \n\u003e\n\u003e - **Custom K6 binary with Diameter support:** Grafana k6 lacks native support for the Diameter protocol. Enabling Diameter protocol functionality requires the creation of a custom k6 binary utilizing the [xk6](https://github.com/grafana/xk6) extension, alongside integration with the [xk6-diameter](https://github.com/MATRIXXSoftware/xk6-diameter) extension. This tailored approach empowers k6 to effectively simulate Diameter Credit-Control Applications.  \nTo achieve this, simply follow the steps outlined in the [Installation](#installation) section.\n\n- **[Go installed](https://golang.org/doc/install)**: At least version 1.17 is needed.\n\n- **Diameter Credit-Control Application Server:** You'll need access to a Diameter Credit-Control Application server to perform the tests. This could be either an actual production server or a mock server set up specifically for testing purposes.\n\n## Installation\n\n### Install xk6\n\n```bash\ngo install go.k6.io/xk6/cmd/xk6@latest\n```\n\nThis will install the `xk6` binary in your `$GOPATH/bin` directory.  \nIf you're getting a `command not found` error when trying to run `xk6`, make sure that you precisely follow the [Go installation instructions](https://go.dev/doc/install) for your platform.\nSpecifically, ensure that the `$GOPATH/bin` directory is part of your `$PATH`. For example, you might want to add this to your shell's initialization file: `export PATH=$(go env GOPATH)/bin:$PATH`. See [this article](https://go.dev/doc/gopath_code#GOPATH) for more information.\n\n### build custom K6 binary with diameter support\n\nMake sure you are in the root project directory and execute the following command:\n\n```bash\nxk6 build --with github.com/matrixxsoftware/xk6-diameter --output ./bin/k6\n```\n\n## Usage\n\n1. **Configure the Script:** Before executing the script, ensure to adjust the `const options` in the [main.js](src/main.js) and `get object of cfg SharedArray` in the [config.js](src/configs/config.js) to match your testing environment and requirements. This includes specifying the target URL of your Diameter Credit-Control Application server and any other relevant parameters for the load test.\n\n2. **Run the Test:** Make sure you are in the root project directory and execute the run.sh script.\n\n    ```bash\n    ./run.sh\n    ```\n\n## Contributing\n\nContributions are highly encouraged! If you have any suggestions for improvements or encounter any bugs, please feel free to open an issue or submit a pull request.\n\n## License\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)  \nThis project is licensed under the GNU General Public License v3.0. For more information, refer to the `LICENSE` file.\n\n## Acknowledgements\n\nThe developers of [@grafana/k6](https://github.com/grafana/k6) and the [@MATRIXXSoftware/xk6-diameter](https://github.com/MATRIXXSoftware/xk6-diameter) for their invaluable contributions to the open-source community.  \n![Alt text](\u003chttps://img.shields.io/badge/k6-7D64FF.svg?style=for-the-badge\u0026logo=k6\u0026logoColor=white\u003e)\n\n## Contact\n\nFor any inquiries or support, please contact \u003citsMohammadHeidari@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FitsMohammadHeidari%2FTelcometer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FitsMohammadHeidari%2FTelcometer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FitsMohammadHeidari%2FTelcometer/lists"}