{"id":15871004,"url":"https://github.com/int128/typescript-k6","last_synced_at":"2025-08-30T23:46:01.899Z","repository":{"id":154186384,"uuid":"615712618","full_name":"int128/typescript-k6","owner":"int128","description":"Write grafana/k6 in TypeScript, run in GitHub Actions and send metrics via OpenTelemetry","archived":false,"fork":false,"pushed_at":"2025-08-28T03:30:19.000Z","size":1263,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-28T04:57:09.525Z","etag":null,"topics":["datadog","github-actions","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/int128.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,"zenodo":null}},"created_at":"2023-03-18T13:13:00.000Z","updated_at":"2025-08-28T03:30:21.000Z","dependencies_parsed_at":"2024-06-25T17:06:32.149Z","dependency_job_id":"8cf7a616-2801-4a10-89bd-a281668889a5","html_url":"https://github.com/int128/typescript-k6","commit_stats":{"total_commits":602,"total_committers":2,"mean_commits":301.0,"dds":0.01827242524916939,"last_synced_commit":"423ebf5fc46e7b976649af56bf2272027cd1e8a7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/int128/typescript-k6","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Ftypescript-k6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Ftypescript-k6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Ftypescript-k6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Ftypescript-k6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/int128","download_url":"https://codeload.github.com/int128/typescript-k6/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Ftypescript-k6/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272922276,"owners_count":25015766,"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-08-30T02:00:09.474Z","response_time":77,"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":["datadog","github-actions","k6","load-testing"],"created_at":"2024-10-06T00:41:20.878Z","updated_at":"2025-08-30T23:46:01.849Z","avatar_url":"https://github.com/int128.png","language":"JavaScript","readme":"# typescript-k6 [![test](https://github.com/int128/typescript-k6/actions/workflows/test.yaml/badge.svg)](https://github.com/int128/typescript-k6/actions/workflows/test.yaml)\n\nWrite your [grafana/k6](https://k6.io) test with TypeScript, and run the test in GitHub Actions.\n\n## Getting Started\n\n### Run in GitHub Actions\n\nCreate a pull request and then k6 will run.\n\n### Run locally\n\n```console\n% k6 run src/http-get.ts\n\n         /\\      Grafana   /‾‾/\n    /\\  /  \\     |\\  __   /  /\n   /  \\/    \\    | |/ /  /   ‾‾\\\n  /          \\   |   (  |  (‾)  |\n / __________ \\  |_|\\_\\  \\_____/\n\n     execution: local\n        script: src/http-get.ts\n        output: -\n\n     scenarios: (100.00%) 1 scenario, 10 max VUs, 35s max duration (incl. graceful stop):\n              * default: 10 looping VUs for 5s (gracefulStop: 30s)\n\n\n     data_received..................: 504 kB 87 kB/s\n     data_sent......................: 7.3 kB 1.3 kB/s\n     http_req_blocked...............: avg=211.96ms min=2µs      med=6µs      max=856.16ms p(90)=844.27ms p(95)=855.71ms\n     http_req_connecting............: avg=47.51ms  min=0s       med=0s       max=196.59ms p(90)=190.64ms p(95)=192.15ms\n     http_req_duration..............: avg=201.2ms  min=184.74ms med=191.84ms max=379.63ms p(90)=197.48ms p(95)=207.26ms\n       { expected_response:true }...: avg=201.2ms  min=184.74ms med=191.84ms max=379.63ms p(90)=197.48ms p(95)=207.26ms\n     http_req_failed................: 0.00%  0 out of 40\n     http_req_receiving.............: avg=9.47ms   min=21µs     med=64µs     max=188.36ms p(90)=245.5µs  p(95)=10.08ms\n     http_req_sending...............: avg=34.69µs  min=5µs      med=16µs     max=513µs    p(90)=79.6µs   p(95)=87.44µs\n     http_req_tls_handshaking.......: avg=143.27ms min=0s       med=0s       max=587.26ms p(90)=573.75ms p(95)=575.04ms\n     http_req_waiting...............: avg=191.69ms min=184.57ms med=191.42ms max=198.19ms p(90)=196.22ms p(95)=196.87ms\n     http_reqs......................: 40     6.896836/s\n     iteration_duration.............: avg=1.41s    min=1.18s    med=1.19s    max=2.05s    p(90)=2.04s    p(95)=2.04s\n     iterations.....................: 40     6.896836/s\n     vus............................: 10     min=10      max=10\n     vus_max........................: 10     min=10      max=10\n\n\nrunning (05.8s), 00/10 VUs, 40 complete and 0 interrupted iterations\ndefault ✓ [======================================] 10 VUs  5s\n```\n\n## Datadog k6 integration\n\n### Prepare\n\nTo send the metrics from GitHub Actions to Datadog,\n\n1. Create [an API key of Datadog](https://docs.datadoghq.com/account_management/api-app-keys/).\n2. Put the API key to the repository secret `DATADOG_API_KEY` in GitHub Actions.\n3. Enable [k6 integration](https://docs.datadoghq.com/integrations/k6/) in Datadog.\n\n### Run\n\nThe workflow runs the test and exports the metrics to Datadog via OpenTelemetry.\n\n1. Start the Datadog Agent container.\n2. Run k6 with [OpenTelemetry output](https://grafana.com/docs/k6/latest/results-output/real-time/opentelemetry/).\n3. Datadog Agent sends the metrics to Datadog.\n\nHere is an example of metrics.\n\n\u003cimg width=\"970\" alt=\"image\" src=\"https://user-images.githubusercontent.com/321266/226154959-24f03266-2ec2-4cbd-8f2b-fffccbae8b0f.png\"\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Ftypescript-k6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fint128%2Ftypescript-k6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Ftypescript-k6/lists"}