Skip to content

Refactor LoadTestAction for usability - #3192

Merged
weiminyu merged 1 commit into
google:masterfrom
weiminyu:load-test
Aug 4, 2026
Merged

Refactor LoadTestAction for usability#3192
weiminyu merged 1 commit into
google:masterfrom
weiminyu:load-test

Conversation

@weiminyu

@weiminyu weiminyu commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Calculates the delay seconds automatically. This value helps ensure that all EPP requests are enqueued before the scheduled test start time. Since queue insertion is much slower than dispatch, this is essential to maintain a stable QPS rate.

Also parallelizes queue insertion using a thread pool. This reduces the delay for enqueuing the requests.

BUG=http://b/533414332


This change is Reviewable

Comment on lines +322 to +324
var _ =
executorService.submit(
() -> cloudTasksUtils.enqueue(getQueueName(index % NUM_QUEUES), chunks.get(index)));

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var _ ... is preferred pattern for suppressing CheckReturnValue rule.

@weiminyu weiminyu left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiminyu resolved 1 discussion.
Reviewable status: 0 of 2 files reviewed, all discussions resolved.

Comment thread core/src/main/java/google/registry/loadtest/LoadTestAction.java Fixed

@gbrodman gbrodman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbrodman reviewed 2 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on CydeWeys and weiminyu).


core/src/main/java/google/registry/loadtest/LoadTestAction.java line 163 at r3 (raw file):

  private int eppTaskCount() {
    return successfulDomainCreatesPerSecond

why add successfulDomainCreatesPerSecond again here?

oh, is it because we create hosts? maybe worth a comment here saying that


core/src/main/java/google/registry/loadtest/LoadTestAction.java line 324 at r3 (raw file):

        // lgtm[java/local-variable-is-never-read]  Suppress Github CodeQL's outdated warning
        var _ =
            executorService.submit(

should we check the future results just in case the submission fails for some reason?


core/src/main/java/google/registry/loadtest/LoadTestModule.java line 46 at r3 (raw file):

    return extractOptionalIntParameter(req, "delaySeconds").orElse(60);
  }

entirely optional: there are still contact-provider methods in this class. We can obviously remove those. No big deal either way.

@weiminyu weiminyu left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiminyu made 3 comments.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on CydeWeys and gbrodman).


core/src/main/java/google/registry/loadtest/LoadTestAction.java line 163 at r3 (raw file):

Previously, gbrodman wrote…

why add successfulDomainCreatesPerSecond again here?

oh, is it because we create hosts? maybe worth a comment here saying that

Done.


core/src/main/java/google/registry/loadtest/LoadTestAction.java line 324 at r3 (raw file):

Previously, gbrodman wrote…

should we check the future results just in case the submission fails for some reason?

Added an explanation


core/src/main/java/google/registry/loadtest/LoadTestModule.java line 46 at r3 (raw file):

Previously, gbrodman wrote…

entirely optional: there are still contact-provider methods in this class. We can obviously remove those. No big deal either way.

Done

@gbrodman gbrodman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbrodman reviewed 2 files and all commit messages, and resolved 2 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on CydeWeys).

Calculates the delay seconds automatically. This value helps ensure that
all EPP requests are enqueued before the scheduled test start time.
Since queue insertion is much slower than dispatch, this is essential to
maintain a stable QPS rate.

Also parallelizes queue insertion using a thread pool. This reduces the
delay for enqueuing the requests.

BUG=http://b/533414332
@weiminyu
weiminyu enabled auto-merge August 4, 2026 17:20
@weiminyu
weiminyu added this pull request to the merge queue Aug 4, 2026
Merged via the queue into google:master with commit b1e1277 Aug 4, 2026
16 checks passed
@weiminyu
weiminyu deleted the load-test branch August 4, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants