Skip to content

Fix code comment docs #1692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix code comment docs #1692

wants to merge 1 commit into from

Conversation

jamipouchi
Copy link

@jamipouchi jamipouchi commented Apr 23, 2025

What was changed

I made sure that the comments documenting the code were right.

Here it says defaults are (10ms wf task, 50ms activity task)

/**
     * Minimum time we will wait (after passing the minimum slots number) between handing out new
     * slots. Defaults to 10ms for workflow tasks and 50ms for activity tasks.
     */
    rampThrottle?: Duration;

But on the workflowTaskSlotOptions is says there is no rampThrottle

/**
     * Options for workflow task slots. Defaults to a minimum of 2 slots and a maximum of 1000 slots
     * with no ramp throttle
     */
    workflowTaskSlotOptions?: ResourceBasedSlotOptions;

which looking at the implementation, the right one is the one that says there is a 10ms throttle:

if (kind === 'workflow') {
        return {
            minimumSlots: slotOptions.minimumSlots ?? 2,
            maximumSlots: slotOptions.maximumSlots ?? 1000,
            rampThrottle: slotOptions.rampThrottle ?? 10,
        };
    }

Why?

Looking at how to improve tuner configs, I saw that comments were wrong:
https://temporalio.slack.com/archives/C046BRWDV2R/p1745395666974519?thread_ts=1745334134.022959&cid=C046BRWDV2R

Checklist

  1. Closes

  2. How was this tested:
    No tests needed

  3. Any docs updates needed?
    Not sure, don't think so.

@jamipouchi jamipouchi requested a review from a team as a code owner April 23, 2025 08:28
@CLAassistant
Copy link

CLAassistant commented Apr 23, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants