Skip to content

Cannot Disable CPU Emulation in emulate_cpu Tool #245

@mithun50

Description

@mithun50

Description:
The emulate_cpu tool located in src/tools/emulation.ts does not currently support disabling CPU emulation once it has been enabled. The throttlingRate parameter enforces a minimum value of 1, which applies the lowest level of throttling but does not fully disable the emulation. This behavior is inconsistent with the emulate_network tool, which allows network emulation to be completely turned off.

The underlying Puppeteer API (page.emulateCPUThrottling) expects a value of null or 0 to disable CPU throttling, which is not supported by the current implementation.


To Reproduce:

  1. Enable CPU emulation using the emulate_cpu tool.
  2. Try setting throttlingRate = 0 or attempt to disable the feature.
  3. Observe that throttling remains active at the minimum level instead of turning off.
  4. Compare this behavior with emulate_network, which allows disabling.

Expected Behavior:
Setting throttlingRate to 0 or null should fully disable CPU emulation, in line with how emulate_network behaves. The tool should allow disabling the feature entirely without requiring a full reload.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions