BonsaiDb Commerce Benchmark

small, writeheavy, 1 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 1 worker(s). All total, the workers will execute the following breakdown of operations:

Operation Invocations
Load 1
LookupProduct 2747
FindProduct 2893
CreateCart 988
AddProductToCart 5053
Checkout 892
RateProduct 4133

Summary

Backend Total Time Wall Time Transport
bonsaidb-local 20.47s 20.47s None
bonsaidb-local+lz4 19.54s 19.54s TCP
bonsaidb-quic 27.41s 27.41s UDP with TLS
bonsaidb-ws 25.11s 25.11s TCP
postgresql 15.80s 15.80s 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 33.81ms 33.81ms 33.81ms 0s 0
bonsaidb-local+lz4 36.14ms 36.14ms 36.14ms 0s 0
bonsaidb-quic 34.39ms 34.39ms 34.39ms 0s 0
bonsaidb-ws 33.41ms 33.41ms 33.41ms 0s 0
postgresql 289.0ms 289.0ms 289.0ms 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 2747 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 94.88us 67.46us 388.4us 12.35us 28
bonsaidb-local+lz4 96.51us 68.49us 173.5us 10.93us 38
bonsaidb-quic 463.7us 391.8us 4.213ms 78.14us 3
bonsaidb-ws 338.5us 287.0us 624.5us 23.64us 37
postgresql 365.2us 234.8us 1.193ms 92.09us 1
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 2893 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 177.0us 100.5us 1.499ms 31.81us 5
bonsaidb-local+lz4 182.1us 99.31us 1.569ms 32.61us 3
bonsaidb-quic 744.4us 634.2us 3.204ms 66.92us 16
bonsaidb-ws 553.7us 443.2us 2.035ms 48.86us 13
postgresql 421.2us 251.1us 1.220ms 121.7us 4
CreateCart

Measures the time spent creating a shopping cart.

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

Backend Avg Min Max StdDev Outliers
bonsaidb-local 1.067ms 609.8us 12.88ms 530.5us 9
bonsaidb-local+lz4 1.004ms 622.3us 5.156ms 353.3us 12
bonsaidb-quic 1.261ms 823.0us 7.017ms 462.6us 15
bonsaidb-ws 1.184ms 758.8us 5.626ms 354.1us 11
postgresql 666.1us 510.0us 4.594ms 229.1us 7
AddProductToCart

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

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

Backend Avg Min Max StdDev Outliers
bonsaidb-local 1.101ms 619.1us 8.042ms 441.5us 64
bonsaidb-local+lz4 1.064ms 629.6us 7.630ms 419.4us 66
bonsaidb-quic 1.521ms 1.031ms 20.60ms 569.6us 69
bonsaidb-ws 1.379ms 897.9us 46.78ms 825.6us 44
postgresql 634.2us 482.9us 18.87ms 368.9us 26
Checkout

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

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

Backend Avg Min Max StdDev Outliers
bonsaidb-local 2.119ms 1.300ms 7.974ms 663.8us 17
bonsaidb-local+lz4 2.033ms 1.313ms 9.281ms 629.4us 12
bonsaidb-quic 2.686ms 1.943ms 11.96ms 579.1us 10
bonsaidb-ws 2.520ms 1.739ms 8.484ms 612.5us 12
postgresql 993.9us 764.3us 34.89ms 1.169ms 2
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 4133 time(s) across each backend.

Backend Avg Min Max StdDev Outliers
bonsaidb-local 2.699ms 1.600ms 35.66ms 1.036ms 45
bonsaidb-local+lz4 2.547ms 1.624ms 14.76ms 723.1us 66
bonsaidb-quic 3.052ms 2.074ms 19.39ms 726.4us 75
bonsaidb-ws 2.941ms 1.935ms 19.75ms 708.6us 64
postgresql 2.067ms 1.512ms 34.32ms 1.006ms 28