edg#
An Expression-based Data Generator driven by YAML configuration.
The reason for edg#
edg was built to help you understand how your database will behave when production traffic arrives. Connect to one of the supported databases, create database objects, seed realistic amounts of data quickly, and define transactional workloads; all from YAML. Concurrent workers and real-time throughput reporting will take of the rest.
Query arguments are written as expressions compiled at startup, giving you access to global constants, random data generation, reference lookups, and a bunch of random distributions.
Supported databases#
| Database | Driver | URL (example) |
|---|---|---|
| Aurora DSQL | dsql | clusterid.dsql.us-east-1.on.aws |
| Cassandra | cassandra | cassandra://user:pass@host1[,host2,host3]:9042/keyspace |
| CockroachDB / PostgreSQL | pgx | postgres://root@localhost:26257/db?sslmode=disable |
| Google Cloud Spanner | spanner | projects/PROJECT/instances/INSTANCE/databases/DATABASE |
| MongoDB | mongodb | mongodb://localhost:27017/db |
| MSSQL | mssql | sqlserver://user:password@host:port?database=db&encrypt=disable |
| MySQL | mysql | user:password@tcp(host:port)/db?parseTime=true |
| Oracle | oracle | oracle://system:password@localhost:1521/db |
Supported features#
| Feature | pgx | mysql | mongodb | cassandra | mssql | oracle | dsql | spanner |
|---|---|---|---|---|---|---|---|---|
| up / seed / run / deseed / down | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ |
| sync run / down | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ |
| sync verify | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ |
| init (schema introspection) | ☑️ | ☑️ | ⚠️ | 🚫 | ☑️ | ☑️ | ☑️ | ☑️ |
| Batch operations | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ |
| Expectations | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ |
| Prepared statements | ☑️ | ☑️ | ⚠️ | 🚫 | ☑️ | ☑️ | ☑️ | ☑️ |
| Stages | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ |
| Transactions | ☑️ | ☑️ | ☑️ 1 | ☑️ 2 | ☑️ | ☑️ | ☑️ | ☑️ |
| Workers | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ |
☑️ Supported · 🚫 Not yet supported · ⚠️ Not applicable
Quick start#
Install with the Go toolchain.
go install github.com/codingconcepts/edg@latestRun all of the configured config steps.
edg all \
--driver pgx \
--config _examples/tpcc/crdb.yaml \
--url "postgres://root@localhost:26257?sslmode=disable" \
-w 100 \
-d 5m