To run them, you either need to define BENCHMARK_POSTGRESQL_CONNECTION_STRING environment variable, or setup it through .env file in src/packages/dumbo/src folder. If not provided, it'll use the default docker config, so: postgresql://postgres@localhost:5432/postgres.
You can also set BENCHMARK_CONNECTION_POOLED to true or false to decide if you're running pooled or non-pooled connection.
You can run it through cmd line going to src folder:
$ npm run benchmark --workspace=@event-driven-io/dumbo
Currently when I run them from my local computer against the basic free tier NeonDB in FRA region (I'm in Poland) I got:
For pooled connection
INSERTING records in transaction x 9.60 ops/sec ±0.59% (49 runs sampled)
READING records x 28.74 ops/sec ±0.88% (68 runs sampled)
Benchmark: INSERTING records in transaction
Operations per second: 9.60 ops/sec
Mean execution time: 104.14 ms
Standard deviation: 2.20 ms
Margin of error: ±0.59%
Sample size: 49 runs
Benchmark: READING records
Operations per second: 28.74 ops/sec
Mean execution time: 34.80 ms
Standard deviation: 1.29 ms
Margin of error: ±0.88%
Sample size: 68 runs
For NON pooled connection:
INSERTING records in transaction x 2.57 ops/sec ±9.99% (17 runs sampled)
READING records x 3.10 ops/sec ±13.49% (19 runs sampled)
Benchmark: INSERTING records in transaction
Operations per second: 2.57 ops/sec
Mean execution time: 389.06 ms
Standard deviation: 75.57 ms
Margin of error: ±9.99%
Sample size: 17 runs
Benchmark: READING records
Operations per second: 3.10 ops/sec
Mean execution time: 323.08 ms
Standard deviation: 90.45 ms
Margin of error: ±13.49%
Sample size: 19 runs
They show that the main issue lies in establishing the connection.
To run them, you either need to define
BENCHMARK_POSTGRESQL_CONNECTION_STRING
environment variable, or setup it through.env
file insrc/packages/dumbo/src
folder. If not provided, it'll use the default docker config, so:postgresql://postgres@localhost:5432/postgres
.You can also set
BENCHMARK_CONNECTION_POOLED
totrue
orfalse
to decide if you're running pooled or non-pooled connection.You can run it through cmd line going to
src
folder:Currently when I run them from my local computer against the basic free tier NeonDB in FRA region (I'm in Poland) I got:
Benchmark: INSERTING records in transaction Operations per second: 2.57 ops/sec Mean execution time: 389.06 ms Standard deviation: 75.57 ms Margin of error: ±9.99% Sample size: 17 runs
Benchmark: READING records Operations per second: 3.10 ops/sec Mean execution time: 323.08 ms Standard deviation: 90.45 ms Margin of error: ±13.49% Sample size: 19 runs