BonsaiDb Commerce Benchmark

small, readheavy, 2 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 2 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 889.6ms 444.8ms None
bonsaidb-local+lz4 848.4ms 424.2ms TCP
bonsaidb-quic 3.377s 1.689s UDP with TLS
bonsaidb-ws 2.336s 1.168s TCP
postgresql 6.385s 3.193s 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.770ms 9.770ms 9.770ms 0s 0
bonsaidb-local+lz4 10.41ms 10.41ms 10.41ms 0s 0
bonsaidb-quic 15.13ms 15.13ms 15.13ms 0s 0
bonsaidb-ws 11.65ms 11.65ms 11.65ms 0s 0
postgresql 437.2ms 437.2ms 437.2ms 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 85.55us 25.20us 2.668ms 115.1us 28
bonsaidb-local+lz4 76.57us 22.60us 1.656ms 72.04us 25
bonsaidb-quic 470.3us 291.3us 4.977ms 205.8us 47
bonsaidb-ws 303.4us 192.3us 5.081ms 132.6us 31
postgresql 727.5us 272.0us 20.48ms 741.7us 20
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 136.0us 41.20us 2.768ms 144.0us 23
bonsaidb-local+lz4 131.3us 45.80us 3.596ms 123.3us 23
bonsaidb-quic 516.7us 333.5us 3.786ms 216.3us 50
bonsaidb-ws 365.3us 237.4us 5.542ms 173.9us 40
postgresql 768.6us 342.7us 29.52ms 869.0us 14
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 181.3us 90.90us 782.5us 76.62us 12
bonsaidb-local+lz4 187.1us 92.30us 1.609ms 118.4us 6
bonsaidb-quic 374.8us 241.0us 2.272ms 131.3us 5
bonsaidb-ws 287.3us 195.2us 1.668ms 106.0us 6
postgresql 1.598ms 930.4us 6.139ms 554.7us 9
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 264.1us 124.3us 4.355ms 273.0us 5
bonsaidb-local+lz4 250.6us 137.0us 2.145ms 154.4us 9
bonsaidb-quic 635.4us 448.9us 3.075ms 232.7us 11
bonsaidb-ws 475.2us 320.0us 5.479ms 234.1us 3
postgresql 1.610ms 860.1us 11.11ms 825.5us 10
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 377.5us 230.2us 604.7us 78.00us 0
bonsaidb-local+lz4 415.8us 274.2us 1.395ms 184.8us 1
bonsaidb-quic 1.002ms 769.5us 2.056ms 265.9us 1
bonsaidb-ws 737.0us 573.5us 1.098ms 106.6us 1
postgresql 1.902ms 1.115ms 4.547ms 745.9us 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.042ms 485.8us 2.853ms 907.8us 0
bonsaidb-local+lz4 1.128ms 605.6us 2.643ms 772.3us 0
bonsaidb-quic 1.396ms 906.1us 2.847ms 741.4us 0
bonsaidb-ws 1.271ms 770.4us 2.741ms 752.8us 0
postgresql 4.494ms 3.790ms 5.038ms 466.2us 0