Closed stevewgh closed 3 years ago
Do you have a comparison of RU cost in addition to rps?
@afscrome using a free Cosmos account (limited to 400 RU's) I had to scale the test back considerably to get it to run but here's the results:
Type | Min RU | Max RU | Avg RU |
---|---|---|---|
Stored Procedure | 8.57 | 12.06 | 9.36 |
Transaction Batch | 7.24 | 8.24 | 7.74 |
So less RU's and more RPS's which kinda makes sense if you consider it an optimised operation server side.
Overview
Removed appendToStream.js and replaced the appending code with TransactionBatch instead. Added a performance test to check the improvements of TransactionBatch. Removed AssemblyInfo from the repo debug folder which had been added in error in a previous commit
Performance Improvements
Events written per second
** this test only shows a minor performance improvement potentially because of hard limitations of the test machine. A distributed load test should be used to establish true performance gains but the 'like for like' test does show repeatable gains over the use of a stored procedure.
External Links
https://devblogs.microsoft.com/cosmosdb/introducing-transactionalbatch-in-the-net-sdk/