This is an automated email from the ASF dual-hosted git repository.
pingtimeout pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris-tools.git
The following commit(s) were added to refs/heads/main by this push:
new 899df2c Minor benchmarks improvements (#106)
899df2c is described below
commit 899df2c44776ee81b2bd99425f6347da1dc2a01c
Author: Pierre Laporte <[email protected]>
AuthorDate: Thu Dec 18 10:07:11 2025 +0100
Minor benchmarks improvements (#106)
* Retry all creations in case of HTTP 500 to ensure dataset is created fully
Just like other entities, it is possible that high concurrency results
in HTTP 500 errors for tables and views. In this case, we should retry
the creation.
* Add assertion to ensure all entities are created
* Add a parameter for namespace throughput reads
---
benchmarks/src/gatling/resources/benchmark-defaults.conf | 5 +++++
.../apache/polaris/benchmarks/parameters/BenchmarkConfig.scala | 1 +
.../polaris/benchmarks/parameters/ReadTreeDatasetParameters.scala | 3 +++
.../apache/polaris/benchmarks/simulations/CreateTreeDataset.scala | 8 ++++++--
.../apache/polaris/benchmarks/simulations/ReadTreeDataset.scala | 3 ++-
5 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/benchmarks/src/gatling/resources/benchmark-defaults.conf
b/benchmarks/src/gatling/resources/benchmark-defaults.conf
index 9caeec0..072512e 100644
--- a/benchmarks/src/gatling/resources/benchmark-defaults.conf
+++ b/benchmarks/src/gatling/resources/benchmark-defaults.conf
@@ -147,6 +147,11 @@ workload {
# Configuration for the ReadTreeDataset simulation
read-tree-dataset {
+ # Number of namespace operations to perform simultaneously
+ # This controls the concurrency level for namespace operations
+ # Default: 20
+ namespace-concurrency = 20
+
# Number of table operations to perform simultaneously
# This controls the concurrency level for table operations
# Default: 20
diff --git
a/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/parameters/BenchmarkConfig.scala
b/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/parameters/BenchmarkConfig.scala
index 2865768..6ad525e 100644
---
a/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/parameters/BenchmarkConfig.scala
+++
b/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/parameters/BenchmarkConfig.scala
@@ -57,6 +57,7 @@ object BenchmarkConfig {
ccConfig.getInt("duration-in-minutes")
),
ReadTreeDatasetParameters(
+ rtdConfig.getInt("namespace-concurrency"),
rtdConfig.getInt("table-concurrency"),
rtdConfig.getInt("view-concurrency")
),
diff --git
a/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/parameters/ReadTreeDatasetParameters.scala
b/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/parameters/ReadTreeDatasetParameters.scala
index 46594c1..b3e33a7 100644
---
a/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/parameters/ReadTreeDatasetParameters.scala
+++
b/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/parameters/ReadTreeDatasetParameters.scala
@@ -21,13 +21,16 @@ package org.apache.polaris.benchmarks.parameters
/**
* Case class to hold the parameters for the ReadTreeDataset simulation.
*
+ * @param namespaceThroughput The number of namespace operations to perform
per second.
* @param tableThroughput The number of table operations to perform per second.
* @param viewThroughput The number of view operations to perform per second.
*/
case class ReadTreeDatasetParameters(
+ namespaceThroughput: Int,
tableThroughput: Int,
viewThroughput: Int
) {
+ require(namespaceThroughput >= 0, "Namespace throughput cannot be negative")
require(tableThroughput >= 0, "Table throughput cannot be negative")
require(viewThroughput >= 0, "View throughput cannot be negative")
}
diff --git
a/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/CreateTreeDataset.scala
b/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/CreateTreeDataset.scala
index bec73a7..00fb5da 100644
---
a/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/CreateTreeDataset.scala
+++
b/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/CreateTreeDataset.scala
@@ -56,8 +56,8 @@ class CreateTreeDataset extends Simulation {
private val setupActions = SetupActions(cp, ap)
private val catalogActions = CatalogActions(dp, setupActions.accessToken, 0,
Set())
private val namespaceActions = NamespaceActions(dp, wp,
setupActions.accessToken, 5, Set(500))
- private val tableActions = TableActions(dp, wp, setupActions.accessToken, 0,
Set())
- private val viewActions = ViewActions(dp, wp, setupActions.accessToken, 0,
Set())
+ private val tableActions = TableActions(dp, wp, setupActions.accessToken, 5,
Set(500))
+ private val viewActions = ViewActions(dp, wp, setupActions.accessToken, 5,
Set(500))
private val createdCatalogs = new AtomicInteger()
private val createdNamespaces = new AtomicInteger()
@@ -142,5 +142,9 @@ class CreateTreeDataset extends Simulation {
.andThen(createTables.inject(atOnceUsers(tableThroughput)).protocols(httpProtocol))
.andThen(createViews.inject(atOnceUsers(viewThroughput)).protocols(httpProtocol))
.andThen(setupActions.stopRefreshingToken.inject(atOnceUsers(1)).protocols(httpProtocol))
+ ).assertions(
+ details("Create Namespace").successfulRequests.count.is(numNamespaces),
+ details("Create Table").successfulRequests.count.is(dp.numTables),
+ details("Create View").successfulRequests.count.is(dp.numViews)
)
}
diff --git
a/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/ReadTreeDataset.scala
b/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/ReadTreeDataset.scala
index 2b8d9e0..f203f72 100644
---
a/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/ReadTreeDataset.scala
+++
b/benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/ReadTreeDataset.scala
@@ -125,6 +125,7 @@ class ReadTreeDataset extends Simulation {
.disableCaching
// Get the configured throughput for tables and views
+ private val namespaceThroughput = wp.readTreeDataset.namespaceThroughput
private val tableThroughput = wp.readTreeDataset.tableThroughput
private val viewThroughput = wp.readTreeDataset.viewThroughput
@@ -133,7 +134,7 @@ class ReadTreeDataset extends Simulation {
setupActions.waitForAuthentication
.inject(atOnceUsers(1))
.andThen(verifyCatalogs.inject(atOnceUsers(1)).protocols(httpProtocol))
-
.andThen(verifyNamespaces.inject(atOnceUsers(dp.nsDepth)).protocols(httpProtocol))
+
.andThen(verifyNamespaces.inject(atOnceUsers(namespaceThroughput)).protocols(httpProtocol))
.andThen(verifyTables.inject(atOnceUsers(tableThroughput)).protocols(httpProtocol))
.andThen(verifyViews.inject(atOnceUsers(viewThroughput)).protocols(httpProtocol))
.andThen(setupActions.stopRefreshingToken.inject(atOnceUsers(1)).protocols(httpProtocol))