Skip to content

Unreachable code in the random_jitter function #18

Description

@reid-a

The random_jitter function takes the jitter scaling factor and uses it to modify the passed-in time value, returning a "noisy" time, to simulate complex interactions in the sytsem.

As currently written, there is a block of code (starting on line 144 of amdahl.py) which checks if abs(scaling) is out of bounds, and gives somewhat cheeky feedback to the user, and restores the scaling value to the default of 0.2

However, the scaling input is checked against the bounds when the command-line arguments are parsed, in the conditional block starting on line 219 of amdahl.py, and if out of bounds, the program aborts with the usage message.

The bounds-handling code at line 144 is not reachable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions