You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve code and fix some bugs in the Ktor benchmarks (#7983)
* Improve and simplify the code in the benchmark portions "ktor" and "ktor-pgclient"
In both projects:
1. Remove the manually created serializer variables as they don't improve performance as tested.
In "ktor":
1. Extract a common `selectWorlds` function to simplify the code.
1. Separate the Single Database Query test from the Multiple Database Queries so that the `queries` parameter doesn't need to be parsed in the Single Database Query test.
1. Simplify a for loop and remove some redundant while loops.
1. Remove the redundant explicit `HttpStatusCode.OK` arguments.
In "ktor-pgclient":
1. Set `pipeliningLimit = 100000` as in other Vert.x benchmarks.
1. Refactor `toBoxedInt` to not catch exceptions because catching exceptions is expensive.
1. Simplify `(1..queries).map { db.getWorld() }` to `List(queries) { db.getWorld() }`.
* Fix the issues that Database Updates fails and Plaintext yields poor performance in the "ktor-pgclient" portion
Database Updates fails due to 2 reasons: the data are not sorted before batch-updating which causes data race and deadlocks, and the prepared statement arguments in wrong order in the `Tuple`.
Poor Plaintext performance especially with a lot of connections, is caused by a too low memory limit (`-Xmx1G`).
0 commit comments