{"id":36445017,"url":"https://github.com/rockset/rockbench","last_synced_at":"2026-01-11T22:04:17.089Z","repository":{"id":55651376,"uuid":"285063334","full_name":"rockset/rockbench","owner":"rockset","description":"Benchmark ","archived":false,"fork":false,"pushed_at":"2023-07-22T21:21:52.000Z","size":61153,"stargazers_count":15,"open_issues_count":1,"forks_count":2,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-06-21T18:51:09.781Z","etag":null,"topics":["realtime-database","rockset"],"latest_commit_sha":null,"homepage":"","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/rockset.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":"2020-08-04T18:20:37.000Z","updated_at":"2024-01-08T04:57:25.000Z","dependencies_parsed_at":"2024-06-21T17:53:52.393Z","dependency_job_id":null,"html_url":"https://github.com/rockset/rockbench","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rockset/rockbench","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockset%2Frockbench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockset%2Frockbench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockset%2Frockbench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockset%2Frockbench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rockset","download_url":"https://codeload.github.com/rockset/rockbench/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rockset%2Frockbench/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28324860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"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":["realtime-database","rockset"],"created_at":"2026-01-11T22:04:16.591Z","updated_at":"2026-01-11T22:04:17.084Z","avatar_url":"https://github.com/rockset.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RockBench\n\nBenchmark to measure ingest throughput of a realtime database.\n\nA real-time database is one that can sustain a high write rate of new incoming data, while at the same time allow\napplications to make decisions based on fresh data. There could be a time lag between when the data is written to the\ndatabase and when it is visible in a query. This is called the data latency, or end-to-end latency, of the database. The\ndata latency is different from a query latency, which is what is typically used to measure the latency of querying a\ndatabase.\n\nData latency is one of the distinguishing factors that differentiates one real-time database from another. It is an\nimportant measure for developers of low-latency applications, like real-time personalization, IoT automation and\nsecurity analytics, where speed is critical.\n\nRockBench measures the data latency of any real-time database. It is designed to continuously stream documents in\nbatches of fixed size to a database and also calculate and report the data latency by querying the database at fixed\nintervals.\n\nThe goal for rockbench: have a representative way to generate real life event data with the following characteristics:\n\n- Streaming Writes: records are written in streaming fashion\n- Nested Objects: records have nested objects with arrays of nested objects inside it \n- Mutable records: support both updates and inserts\n\n## Usage\n\nYou can run this directly, or through Docker container.\n\n- Clone the repository\n\n```\ngit clone https://github.com/rockset/rockbench.git\n```\n\n- To run directly\n\n```\n# Build\ngo build\n\n# Send data to Rockset and report data latency\nROCKSET_API_KEY=xxxx ROCKSET_COLLECTION=yyyy WPS=1 BATCH_SIZE=50 DESTINATION=Rockset TRACK_LATENCY=true ./rockbench\n\n# Send data to ElasticSearch and report data latency\nELASTIC_AUTH=\"ApiKey xxx\" ELASTIC_URL=https://... ELASTIC_INDEX=index_name WPS=1 BATCH_SIZE=50 DESTINATION=Elastic TRACK_LATENCY=true ./rockbench\n\n# Send data to Snowflake and report data latency\nSNOWFLAKE_ACCOUNT=xxxx SNOWFLAKE_USER=xxxx SNOWFLAKE_PASSWORD=xxxx SNOWFLAKE_WAREHOUSE=xxxx SNOWFLAKE_DATABASE=xxxx SNOWFLAKE_STAGES3BUCKETNAME=xxxx AWS_REGION=xxxx WPS=1 BATCH_SIZE=50 TRACK_LATENCY=true DESTINATION=Snowflake ./rockbench\n```\n\n- To run with Docker container\n\n```\ndocker build -t rockset/write_generator .\ndocker run -e [env variable as above] rockset/write_generator\n```\n\n### Modes\n\nRockBench can also measure the speed of patches.\n\n| mode           | operation                                                |\n| -------------- | -------------------------------------------------------- |\n| add            | Perform strictly inserts (using either id scheme)        |\n| patch          | Perform patches on id range specified from [0, NUM_DOCS) |\n| add_then_patch | Perform add mode then patch mode                         |\n\nSetting `NUM_DOCS` to a non-negative value will limit the number of writes made and then perform patches against that\ndocument set.\nPatch mode must be explicitly enabled via `MODE=patch` or `MODE=add_then_patch` and the patches per second is controlled\nvia `PPS`.\n`PPS` == `WPS` unless `PPS` is specified.\n`BATCH_SIZE` is used for both patching and inserting.\nEach patch will update a timestamp field for latency detection and also one other field/array in the document.\n\nPatches can take on various forms, currently\n\n- replace: replaces random fields with roughly equivalent type and similar size\n- add: Adds new top level fields and prepends entries into the top level tags array\n\nSpecify `PATCH_MODE` as either 'replace' or 'add'. Default will be 'replace'.\n\nYou can also specify the `_id` scheme for Rockset destination to be either `uuid` or `sequential` (increasing sequential\nnumbers) using `ID_MODE`\n\n## How to extend RockBench to measure your favourite realtime database\n\nImplement the [Destination](https://github.com/rockset/rockbench/blob/master/generator/destination.go) interface and\nprovide the appropriate configs required.\nCheck [Rockset](https://github.com/rockset/rockbench/blob/master/generator/rockset.go)\nand [Elastic](https://github.com/rockset/rockbench/blob/master/generator/elastic.go) for reference. The interface has\ntwo methods:\n\n- `SendDocument`: Method to send batch of documents to the destination\n- `GetLatestTimestamp`: Fetch the latest timestamp from the database\n\nOnce the new source is implemented, handle it\nin [main.go](https://github.com/rockset/rockbench/blob/master/generator/main.go).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockset%2Frockbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frockset%2Frockbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frockset%2Frockbench/lists"}