Performance Testing
- Test Code: Example
- Test Scenarios: Add to cart, place order
- Command send wait mode (
WaitStrategy):SENT,PROCESSED
Deployment Environment
Performance Test Report
Add to Cart
POST {{host}}/cart/{{$uuid}}/add_cart_item
Content-Type: application/json
Command-Wait-Stage: PROCESSED
Command-Wait-Timeout: 30000
Command-Request-Id: {{$uuid}}
{
"productId": "{{$uuid}}",
"quantity": 1
}
> {%
client.test("Request executed successfully", function() {
client.assert(response.status === 200, "Response status is not 200");
});
%}With command wait strategy (
WaitStrategy) set toSENTmode, the add to cart command (AddCartItem) write request API underwent 2 minutes of stress testing, with average TPS of 59625, peak of 82312, and average response time of 29 milliseconds.

With command wait strategy (
WaitStrategy) set toPROCESSEDmode, the add to cart command (AddCartItem) write request API underwent 2 minutes of stress testing, with average TPS of 18696, peak of 24141, and average response time of 239 milliseconds.

Place Order
POST {{host}}/customer/{{$uuid}}/tenant/{{$uuid}}/order
Content-Type: application/json
Command-Wait-Stage: PROCESSED
Command-Wait-Timeout: 30000
Command-Request-Id: {{$uuid}}
{
"fromCart": false,
"items": [
{
"productId": "{{$uuid}}",
"price": 10,
"quantity": 10
}
],
"address": {
"country": "china",
"province": "shanghai",
"city": "shanghai",
"district": "huangpu",
"detail": "renmin road 1000"
}
}
> {%
client.test("Request executed successfully", function() {
client.assert(response.status === 200, "Response status is not 200");
});
%}With command wait strategy (
WaitStrategy) set toSENTmode, the place order command (CreateOrder) write request API underwent 2 minutes of stress testing, with average TPS of 47838, peak of 86200, and average response time of 217 milliseconds.

With command wait strategy (
WaitStrategy) set toPROCESSEDmode, the place order command (CreateOrder) write request API underwent 2 minutes of stress testing, with average TPS of 18230, peak of 25506, and average response time of 268 milliseconds.
