{"id":28387329,"url":"https://github.com/redisgraph/redisgraph-benchmark-go","last_synced_at":"2025-06-26T20:32:26.516Z","repository":{"id":46682507,"uuid":"331918284","full_name":"RedisGraph/redisgraph-benchmark-go","owner":"RedisGraph","description":"Benchmark utility that relies on redisgraph-go official client to do the command calls to the db","archived":false,"fork":false,"pushed_at":"2024-06-20T10:16:18.000Z","size":6716,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-30T22:47:56.752Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedisGraph.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}},"created_at":"2021-01-22T10:54:26.000Z","updated_at":"2023-12-18T03:09:23.000Z","dependencies_parsed_at":"2023-07-19T10:15:43.395Z","dependency_job_id":null,"html_url":"https://github.com/RedisGraph/redisgraph-benchmark-go","commit_stats":null,"previous_names":["filipecosta90/redisgraph-benchmark-go"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/RedisGraph/redisgraph-benchmark-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2Fredisgraph-benchmark-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2Fredisgraph-benchmark-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2Fredisgraph-benchmark-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2Fredisgraph-benchmark-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedisGraph","download_url":"https://codeload.github.com/RedisGraph/redisgraph-benchmark-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedisGraph%2Fredisgraph-benchmark-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262139786,"owners_count":23265230,"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":[],"created_at":"2025-05-30T17:11:13.469Z","updated_at":"2025-06-26T20:32:26.488Z","avatar_url":"https://github.com/RedisGraph.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redisgraph-benchmark-go\n\n[![license](https://img.shields.io/github/license/RedisGraph/redisgraph-benchmark-go.svg)](https://github.com/RedisGraph/redisgraph-benchmark-go)\n[![GitHub issues](https://img.shields.io/github/release/RedisGraph/redisgraph-benchmark-go.svg)](https://github.com/RedisGraph/redisgraph-benchmark-go/releases/latest)\n[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/gWBRT6P)\n[![codecov](https://codecov.io/github/RedisGraph/redisgraph-benchmark-go/branch/main/graph/badge.svg?token=B6ISQSDK3Y)](https://codecov.io/github/RedisGraph/redisgraph-benchmark-go)\n\n## Overview\n\nThis repo contains code to quick benchmark RedisGraph, using the official [redisgraph-go](https://github.com/RedisGraph/redisgraph-go) client.  \n\n## Installation\n\n### Download Standalone binaries ( no Golang needed )\n\nIf you don't have go on your machine and just want to use the produced binaries you can download the following prebuilt bins:\n\nhttps://github.com/RedisGraph/redisgraph-benchmark-go/releases/latest\n\n| OS | Arch | Link |\n| :---         |     :---:      |          ---: |\n| Linux   | amd64  (64-bit X86)     | [redisgraph-benchmark-go-linux-amd64](https://github.com/RedisGraph/redisgraph-benchmark-go/releases/latest/download/redisgraph-benchmark-go-linux-amd64.tar.gz)    |\n| Linux   | arm64 (64-bit ARM)     | [redisgraph-benchmark-go-linux-arm64](https://github.com/RedisGraph/redisgraph-benchmark-go/releases/latest/download/redisgraph-benchmark-go-linux-arm64.tar.gz)    |\n| Darwin   | amd64  (64-bit X86)     | [redisgraph-benchmark-go-darwin-amd64](https://github.com/RedisGraph/redisgraph-benchmark-go/releases/latest/download/redisgraph-benchmark-go-darwin-amd64.tar.gz)    |\n| Darwin   | arm64 (64-bit ARM)     | [redisgraph-benchmark-go-darwin-arm64](https://github.com/RedisGraph/redisgraph-benchmark-go/releases/latest/download/redisgraph-benchmark-go-darwin-arm64.tar.gz)    |\n\nHere's how bash script to download and try it:\n\n```bash\nwget -c https://github.com/RedisGraph/redisgraph-benchmark-go/releases/latest/download/redisgraph-benchmark-go-$(uname -mrs | awk '{ print tolower($1) }')-$(dpkg --print-architecture).tar.gz -O - | tar -xz\n\n# give it a try\n./redisgraph-benchmark-go --help\n```\n\n\n### Installation in a Golang env\n\nTo install the benchmark utility with a Go Env do as follow:\n\n`go get` and then `go install`:\n```bash\n# Fetch this repo\ngo get github.com/RedisGraph/redisgraph-benchmark-go\ncd $GOPATH/src/github.com/RedisGraph/redisgraph-benchmark-go\nmake\n```\n\n## Usage of redisgraph-benchmark-go\n\n```\n$ $ ./redisgraph-benchmark-go --help\nUsage of ./redisgraph-benchmark-go:\n  -a string\n        Password for Redis Auth.\n  -c uint\n        number of clients. (default 50)\n  -continue-on-error\n        Continue benchmark in case of error replies.\n  -debug int\n        Client debug level.\n  -enable-exporter-rps\n        Push results to redistimeseries exporter in real-time. Time granularity is set via the -reporting-period parameter.\n  -exporter-rts-auth string\n        RedisTimeSeries Password for Redis Auth.\n  -exporter-rts-host string\n        RedisTimeSeries hostname. (default \"127.0.0.1\")\n  -exporter-rts-port int\n        RedisTimeSeries port. (default 6379)\n  -exporter-run-name string\n        Run name. (default \"perf-run\")\n  -graph-key string\n        graph key. (default \"graph\")\n  -h string\n        Server hostname. (default \"127.0.0.1\")\n  -json-out-file string\n        Name of json output file to output benchmark results. If not set, will not print to json. (default \"benchmark-results.json\")\n  -n uint\n        Total number of requests (default 1000000)\n  -p int\n        Server port. (default 6379)\n  -query value\n        Specify a RedisGraph query to send in quotes. Each command that you specify is run with its ratio. For example: -query=\"CREATE (n)\" -query-ratio=1\n  -query-ratio value\n        The query ratio vs other queries used in the same benchmark. Each command that you specify is run with its ratio. For example: -query=\"CREATE (n)\" -query-ratio=0.5 -query=\"MATCH (n) RETURN n\" -query-ratio=0.5\n  -query-ro value\n        Specify a RedisGraph read-only query to send in quotes. You can run multiple commands (both read/write) on the same benchmark. Each command that you specify is run with its ratio. For example: -query=\"CREATE (n)\" -query-ratio=0.5 -query-ro=\"MATCH (n) RETURN n\" -query-ratio=0.5\n  -random-int-max int\n        __rand_int__ upper value limit. __rand_int__ distribution is uniform Random (default 1000000)\n  -random-int-min int\n        __rand_int__ lower value limit. __rand_int__ distribution is uniform Random (default 1)\n  -random-seed int\n        Random seed to use. (default 12345)\n  -reporting-period duration\n        Period to report stats. (default 10s)\n  -rps int\n        Max rps. If 0 no limit is applied and the DB is stressed up to maximum.\n  -v    Output version and exit\n```\n\n## Sample output - 100K write commands\n\n```\n$ redisgraph-benchmark-go -n 100000 -graph-key graph -query \"CREATE (u:User)\" \n2021/07/12 11:44:13 redisgraph-benchmark-go (git_sha1:)\n2021/07/12 11:44:13 RTS export disabled.\n2021/07/12 11:44:13 Debug level: 0.\n2021/07/12 11:44:13 Using random seed: 12345.\n2021/07/12 11:44:13 Total clients: 50. Commands per client: 2000 Total commands: 100000\n2021/07/12 11:44:13 Trying to extract RedisGraph version info\n2021/07/12 11:44:13 Detected RedisGraph version 999999\n\n                 Test time                    Total Commands              Total Errors                      Command Rate   Client p50 with RTT(ms) Graph Internal Time p50 (ms)\n                       10s [100.0%]                    100000                         0 [0.0%]                   9997.46               2.698 (2.698)                2.589 (2.589)       \n################# RUNTIME STATS #################\nTotal Duration 10.004 Seconds\nTotal Commands issued 100000\nTotal Errors 0 ( 0.000 %)\nThroughput summary: 9996 requests per second\n## Overall RedisGraph resultset stats table\n|      QUERY      | NODES CREATED | NODES DELETED | LABELS ADDED | PROPERTIES SET | RELATIONSHIPS CREATED  | RELATIONSHIPS DELETED  |\n|-----------------|---------------|---------------|--------------|----------------|------------------------|------------------------|\n| CREATE (u:User) |        100000 |             0 |            0 |              0 |                      0 |                      0 |\n| Total           |        100000 |             0 |            0 |              0 |                      0 |                      0 |\n## Overall RedisGraph Internal Execution Time summary table\n|      QUERY      | INTERNAL AVG  LATENCY(MS)  | INTERNAL P50 LATENCY(MS) | INTERNAL P95 LATENCY(MS) | INTERNAL P99 LATENCY(MS) |\n|-----------------|----------------------------|--------------------------|--------------------------|--------------------------|\n| CREATE (u:User) |                      2.599 |                    2.589 |                    2.912 |                    3.648 |\n| Total           |                      2.599 |                    2.589 |                    2.912 |                    3.648 |\n## Overall Client Latency summary table\n|      QUERY      | OPS/SEC | TOTAL CALLS | TOTAL ERRORS | AVG  LATENCY(MS) | P50 LATENCY(MS) | P95 LATENCY(MS) | P99 LATENCY(MS) |\n|-----------------|---------|-------------|--------------|------------------|-----------------|-----------------|-----------------|\n| CREATE (u:User) |    9996 |      100000 |            0 |            2.745 |           2.698 |           3.048 |           4.007 |\n| Total           |    9996 |      100000 |            0 |            2.745 |           2.698 |           3.048 |           4.007 |\n2021/07/12 11:44:23 Saving JSON results file to benchmark-results.json\n```\n\n\n## Sample output - running mixed read and writes benchmark\n\n```\n$ redisgraph-benchmark-go -n 100000 -graph-key graph -query \"CREATE (u:User)\" -query-ratio 0.5 -query-ro \"MATCH (n) return COUNT(n)\" -query-ratio 0.5\n2021/07/12 11:45:38 redisgraph-benchmark-go (git_sha1:)\n2021/07/12 11:45:38 RTS export disabled.\n2021/07/12 11:45:38 Debug level: 0.\n2021/07/12 11:45:38 Using random seed: 12345.\n2021/07/12 11:45:38 Total clients: 50. Commands per client: 2000 Total commands: 100000\n2021/07/12 11:45:38 Trying to extract RedisGraph version info\n2021/07/12 11:45:38 Detected RedisGraph version 999999\n\n                 Test time                    Total Commands              Total Errors                      Command Rate   Client p50 with RTT(ms) Graph Internal Time p50 (ms)\n                       10s [100.0%]                    100000                         0 [0.0%]                   9996.09               1.179 (1.179)                0.155 (0.155)       \n################# RUNTIME STATS #################\nTotal Duration 10.004 Seconds\nTotal Commands issued 100000\nTotal Errors 0 ( 0.000 %)\nThroughput summary: 9996 requests per second\n## Overall RedisGraph resultset stats table\n|           QUERY           | NODES CREATED | NODES DELETED | LABELS ADDED | PROPERTIES SET | RELATIONSHIPS CREATED  | RELATIONSHIPS DELETED  |\n|---------------------------|---------------|---------------|--------------|----------------|------------------------|------------------------|\n| CREATE (u:User)           |         49921 |             0 |            0 |              0 |                      0 |                      0 |\n| MATCH (n) return COUNT(n) |             0 |             0 |            0 |              0 |                      0 |                      0 |\n| Total                     |         49921 |             0 |            0 |              0 |                      0 |                      0 |\n## Overall RedisGraph Internal Execution Time summary table\n|           QUERY           | INTERNAL AVG  LATENCY(MS)  | INTERNAL P50 LATENCY(MS) | INTERNAL P95 LATENCY(MS) | INTERNAL P99 LATENCY(MS) |\n|---------------------------|----------------------------|--------------------------|--------------------------|--------------------------|\n| CREATE (u:User)           |                      3.825 |                    3.913 |                    4.639 |                    5.249 |\n| MATCH (n) return COUNT(n) |                      0.050 |                    0.048 |                    0.067 |                    0.100 |\n| Total                     |                      1.935 |                    0.155 |                    4.442 |                    4.929 |\n## Overall Client Latency summary table\n|           QUERY           | OPS/SEC | TOTAL CALLS | TOTAL ERRORS | AVG  LATENCY(MS) | P50 LATENCY(MS) | P95 LATENCY(MS) | P99 LATENCY(MS) |\n|---------------------------|---------|-------------|--------------|------------------|-----------------|-----------------|-----------------|\n| CREATE (u:User)           |    4990 |       49921 |            0 |            4.041 |           4.061 |           4.843 |           5.930 |\n| MATCH (n) return COUNT(n) |    5006 |       50079 |            0 |            0.236 |           0.178 |           0.442 |           1.201 |\n| Total                     |    9996 |      100000 |            0 |            2.135 |           1.179 |           4.611 |           5.287 |\n2021/07/12 11:45:48 Saving JSON results file to benchmark-results.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisgraph%2Fredisgraph-benchmark-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredisgraph%2Fredisgraph-benchmark-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredisgraph%2Fredisgraph-benchmark-go/lists"}