Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Make the name generator more random #85

Merged
merged 1 commit into from
Apr 24, 2018
Merged

Conversation

markdryan
Copy link
Contributor

@markdryan markdryan commented Apr 24, 2018

The random shuffle algorithm used by the name generator was buggy.
It swapped N pairs of randomly selected names, where N is the total
number of names. What it should have been doing was swapping each
name with a randomly chosen name. This makes it much more likely
that each name will be moved from its original position in the
slice of possible names. There should be fewer alarmed-agravains
from now on.

Signed-off-by: Mark Ryan mark.d.ryan@intel.com

@coveralls
Copy link

coveralls commented Apr 24, 2018

Coverage Status

Coverage increased (+0.01%) to 68.241% when pulling e2a455c on markdryan:fix-shuffle into 580e0af on intel:master.

The random shuffle algorithm used by the name generator was buggy.
It swapped N pairs of randomly selected names, where N is the total
number of names.  What it should have been doing was swapping each
name with a randomly chosen name.  This makes it much more likely
that each name will be moved from its original position in the
slice of possible names.  There should be fewer alarmed-agravains
from now on.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
@rbradford rbradford merged commit b9aa692 into intel:master Apr 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants