adutra commented on code in PR #6:
URL: https://github.com/apache/polaris-tools/pull/6#discussion_r2050896162
##########
benchmarks/src/gatling/scala/org/apache/polaris/benchmarks/simulations/CreateTreeDataset.scala:
##########
@@ -64,11 +67,31 @@ class CreateTreeDataset extends Simulation {
private val createdViews = new AtomicInteger()
//
--------------------------------------------------------------------------------
- // Workload: Authenticate and store the access token for later use
+ // Authentication related workloads:
+ // * Authenticate and store the access token for later use every minute
+ // * Wait for an OAuth token to be available
+ // * Stop the token refresh loop
//
--------------------------------------------------------------------------------
- val authenticate: ScenarioBuilder = scenario("Authenticate using the OAuth2
REST API endpoint")
- .feed(authenticationActions.feeder())
- .exec(authenticationActions.authenticateAndSaveAccessToken)
+ val continuouslyRefreshOauthToken: ScenarioBuilder =
+ scenario("Authenticate every minute using the Iceberg REST API")
+ .asLongAs(_ => shouldRefreshToken.get())(
+ feed(authenticationActions.feeder())
+ .exec(authenticationActions.authenticateAndSaveAccessToken)
+ .pause(1.minute)
Review Comment:
I agree this is misleading, as you could easily infer that changing to
`.pause(30.minutes)` wouldn't have any consequence on the test duration.
Suggestion (but I don't know Gatling very well): instead of continuously
polling the atomic integer until it becomes false, couldn't the caller send an
interrupt signal to the scenario?
But it's OK imo to investigate improvements later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]