BonsaiDb Commerce Benchmark

small, readheavy, 4 agent(s)

Configuration

Initial Data Set
Type Count
Products 100
Categories 10
Customers 100
Orders 125
Shopping Plans

This run executed 1000 shopping plans across 4 worker(s). All total, the workers will execute the following breakdown of operations:

Operation Invocations
Load 1
LookupProduct 2763
FindProduct 2868
CreateCart 433
AddProductToCart 588
Checkout 38
RateProduct 5

Summary

Backend Total Time Wall Time Transport
bonsaidb-local 1.302s 325.4ms None
bonsaidb-local+lz4 1.338s 334.4ms TCP
bonsaidb-quic 5.526s 1.381s UDP with TLS
bonsaidb-ws 4.176s 1.044s TCP
postgresql 10.53s 2.633s TCP
Table of Contents:

Operation Results

Load

Measures the time spent loading the initial data set and performing any pre-cache operations that most database administrators would perform on their databases periodically to ensure good performance.

This operation was executed 1 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 9.325ms 9.325ms 9.325ms 0s 0
bonsaidb-local+lz4 10.42ms 10.42ms 10.42ms 0s 0
bonsaidb-quic 14.33ms 14.33ms 14.33ms 0s 0
bonsaidb-ws 12.07ms 12.07ms 12.07ms 0s 0
postgresql 493.1ms 493.1ms 493.1ms 0s 0
LookupProduct

Meaures the time spent looking up a product by its id. This operation is meant to simulate the basic needs of the database to provide a product details page after a user clicked a direct link that contians the product's unique id, including the product's current rating.

This operation was executed 2763 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 129.1us 19.50us 4.735ms 189.9us 33
bonsaidb-local+lz4 127.2us 20.80us 2.112ms 140.6us 40
bonsaidb-quic 796.9us 382.6us 6.539ms 294.5us 35
bonsaidb-ws 592.1us 212.9us 5.053ms 313.0us 41
postgresql 1.216ms 311.3us 42.53ms 1.444ms 15
FindProduct

Measures the time spent looking up a product by its name (exact match, indexed). This operation is meant to simulate the basic needs of the database to provide a product details after finding a product by its name, including the product's current rating.

This operation was executed 2868 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 199.5us 43.10us 5.284ms 222.6us 35
bonsaidb-local+lz4 199.7us 43.50us 2.564ms 180.1us 47
bonsaidb-quic 845.4us 426.6us 7.263ms 303.9us 36
bonsaidb-ws 637.1us 292.7us 5.621ms 276.8us 41
postgresql 1.231ms 387.2us 44.12ms 1.465ms 17
CreateCart

Measures the time spent creating a shopping cart.

This operation was executed 433 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 267.4us 84.90us 2.633ms 193.8us 8
bonsaidb-local+lz4 295.1us 98.80us 1.467ms 187.0us 14
bonsaidb-quic 548.8us 295.1us 7.581ms 376.8us 2
bonsaidb-ws 465.2us 218.4us 5.531ms 379.5us 6
postgresql 3.143ms 955.9us 55.66ms 4.051ms 6
AddProductToCart

Measures the time spent adding a product to a shopping cart.

This operation was executed 588 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 365.9us 121.2us 2.318ms 189.7us 8
bonsaidb-local+lz4 415.9us 148.4us 2.952ms 243.1us 12
bonsaidb-quic 983.5us 605.7us 5.093ms 349.0us 5
bonsaidb-ws 764.0us 461.4us 4.601ms 292.6us 5
postgresql 2.761ms 948.7us 31.60ms 2.012ms 15
Checkout

Measures the time spent converting a shopping cart into an order for a customer.

This operation was executed 38 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 683.3us 316.8us 2.059ms 374.9us 2
bonsaidb-local+lz4 642.7us 331.4us 2.275ms 334.8us 1
bonsaidb-quic 1.524ms 1.144ms 2.862ms 305.1us 1
bonsaidb-ws 1.133ms 967.5us 1.576ms 139.7us 1
postgresql 3.410ms 1.905ms 10.31ms 1.571ms 1
RateProduct

Measures the time spent adding or updating a review of a product by a customer. Each customer can only have one review per product. When this operation is complete, all subsequent calls to LookupProduct and FindProduct should reflect the new rating. This simulates an 'upsert' (insert or update) operation using a unique index.

This operation was executed 5 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 1.257ms 637.6us 3.122ms 938.2us 0
bonsaidb-local+lz4 1.238ms 751.9us 2.811ms 789.9us 0
bonsaidb-quic 2.248ms 1.430ms 3.399ms 713.7us 0
bonsaidb-ws 1.512ms 1.023ms 3.022ms 758.3us 0
postgresql 7.185ms 5.489ms 8.658ms 1.040ms 0