{"id":31028243,"url":"https://github.com/guacsec/trustify-scale-testing","last_synced_at":"2026-01-20T17:14:46.922Z","repository":{"id":228343100,"uuid":"772694370","full_name":"guacsec/trustify-scale-testing","owner":"guacsec","description":"Utilities for testing trustification at scale","archived":false,"fork":false,"pushed_at":"2025-10-29T12:34:08.000Z","size":508,"stargazers_count":0,"open_issues_count":5,"forks_count":6,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-10-29T13:24:41.946Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/guacsec.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-15T17:44:42.000Z","updated_at":"2025-10-29T12:34:10.000Z","dependencies_parsed_at":"2024-03-29T15:32:20.155Z","dependency_job_id":"09354135-04d5-41f9-89f0-e64eba3ca98a","html_url":"https://github.com/guacsec/trustify-scale-testing","commit_stats":null,"previous_names":["trustification/scale-testing","guacsec/trustify-scale-testing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guacsec/trustify-scale-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guacsec%2Ftrustify-scale-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guacsec%2Ftrustify-scale-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guacsec%2Ftrustify-scale-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guacsec%2Ftrustify-scale-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guacsec","download_url":"https://codeload.github.com/guacsec/trustify-scale-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guacsec%2Ftrustify-scale-testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-09-13T20:06:58.817Z","updated_at":"2026-01-20T17:14:46.903Z","avatar_url":"https://github.com/guacsec.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trustify loadtest\n\nA set of simple [goose](https://book.goose.rs/) load tests against the web and rest endpoints.\n\n## quickstart\n\n1. Ensure trustify is running.\n\n2. Set environment variables for OIDC authentication:\n   ```bash\n   export ISSUER_URL = \"http://localhost:8090/realms/trustify\"\n   export CLIENT_ID = \"testing-user\"\n   export CLIENT_SECRET = \"****************\"\n   ```\n\n   If you're using the devmode auth settings, you can use:\n\n   ```bash\n   export ISSUER_URL = \"http://localhost:8090/realms/trustify\"\n   export CLIENT_ID = \"testing-user\"\n   export CLIENT_SECRET = \"R8A6KFeyxJsMDBhjfHbpZTIF0GWt43HP\"\n   ```\n\n   Or prefix calls with:\n\n   ```shell\n   env ISSUER_URL=\"http://localhost:8090/realms/trustify\" CLIENT_ID=\"testing-user\" CLIENT_SECRET=\"R8A6KFeyxJsMDBhjfHbpZTIF0GWt43HP\"\n   ```\n\n   To change wait times between http invokes set the following env vars:\n\n   ```bash\n   export WAIT_TIME_FROM = 1\n   export WAIT_TIME_TO =  2\n   ```\n\n   Alternately, for no wait times between http invokes set these env vars to 0.\n\n3. Choose a scenario file or let it evaluate one\n\n   Other provide an existing file using `SCENARIO_FILE`:\n\n   ```bash\n   export SCENARIO_FILE=empty.json5 # for disabling all test with variables\n   ```\n\n   Or provide `DATABASE_URL` to generate one on the fly:\n\n   ```bash\n   export DATABASE_URL=\"postgresql://postgres:trustify@localhost:5432/trustify\"\n   ```\n\n   See below for creating a scenario file. Or check the folder [scenarios/](scenarios/) for existing files.\n\n4. To load trustify endpoints with 3 concurrent users.\n   ```bash\n   cargo run --release --bin loadtest -- --host http://localhost:8080 -u 3\n   ```\n\n   To stop load test hit [ctl-C], which should generate aggregate statistics.\n\n   To load trustify endpoints against 10 concurrent users, generating an html report.\n\n   ```bash\n   cargo run --release -- --host http://localhost:8080  --report-file=report.html --no-reset-metrics -u 10\n   ```\n\n5. More goose run-time options [here](https://book.goose.rs/getting-started/runtime-options.html)\n\n## Using an existing database dump\n\nYou can either create a database dump using the following command in the `trustify` repository:\n\n```shell\ncargo run --bin xtask generate-dump\n```\n\nOr, download one from the S3 bucket. e.g.:\n`https://trustify-dumps.s3.eu-west-1.amazonaws.com/20250604T002104Z/dump.sql.gz`\n\nThen, add the dump to the compose startup `trustify/etc/deploy/compose/compose.yaml` (in the `trustify` repository):\n\n```yaml\n    volumes:\n      - /dump_path_here/dump.sql.gz:/docker-entrypoint-initdb.d/dump.sql.gz:Z\n```\n\nStart Postgres like you normally would do:\n\n```shell\npodman-compose -f etc/deploy/compose/compose.yaml up\n```\n\n## Scenario files\n\nSome tests require a single document, like an SBOM. This information can be provided using a \"scenario\" file, using the\nenvironment variable `SCENARIO_FILE`. All fields are mandatory, though it is possible to disable tests by providing\na `null`, value:\n\n```json5\n{\n  \"disable_me\": null,\n}\n```\n\nThe repository has a default file (`empty.json5`), disabling all such tests.\n\nIf the scenario file is not being provided, the scale tests will try to auto-evaluate candidate documents. However, this\nis not reproducible, and should only be used for local testing.\n\nIt is possible to generate the content for a scenario file by setting the environment variable `GENERATE_SCENARIO=true`:\n\n```bash\nenv GENERATE_SCENARIO=true DATABASE_URL=postgresql://postgres:trustify@localhost:5432/trustify cargo run --release \n```\n\n## Request timeouts\n\nTo prevent calls from failing due to timeouts, it is possible to use `REQUEST_TIMEOUT` with a humantime format\n(`1s`, `1m` = \"60 seconds\"). The default is `5m`.\n\n## Memory profiling with heaptrack\n\n* Install [heaptrack](https://github.com/KDE/heaptrack)\n\n```shell\nsudo dnf install heaptrack\n```\n\n* [Use a database dump](#using-an-existing-database-dump)\n\n* Change `trustify/Cargo.toml`\n    * Add the following:\n\n```toml\n[profile.release]\ndebug = true\n```\n\n* Clean and build with `--release`\n\n```shell\ncargo clean ; cargo build --release\n```\n\n* Open a terminal and start trustify with heaptrack and graphql feature\n\n```shell\ncd target/release/\nTRUSTD_WITH_GRAPHQL=true heaptrack ./trustd api --db-password eggs --devmode --auth-disabled\n```\n\n* Run loadtest\n\n* Stop loadtest and trustify, and heaptrack will show the results\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguacsec%2Ftrustify-scale-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguacsec%2Ftrustify-scale-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguacsec%2Ftrustify-scale-testing/lists"}