-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
random_score function - Added the index name and shard id to the rand…
…omization, and improved the PRNG itself Closes #3559
- Loading branch information
Showing
3 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,15 +107,19 @@ public void distribution() throws Exception { | |
|
||
int filled = 0; | ||
int maxRepeat = 0; | ||
int sumRepeat = 0; | ||
for (int i = 0; i < matrix.length; i++) { | ||
int value = matrix[i]; | ||
sumRepeat += value; | ||
maxRepeat = Math.max(maxRepeat, value); | ||
if (value > 0) { | ||
filled++; | ||
} | ||
} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
uboness
Author
Contributor
|
||
|
||
System.out.println(); | ||
System.out.println("max repeat: " + maxRepeat); | ||
System.out.println("avg repeat: " + sumRepeat / (double)filled); | ||
System.out.println("distribution: " + filled/(double)count); | ||
|
||
int percentile50 = filled / 2; | ||
|
Why not using ESLogger in tests?
It's not really a concern here because this test is marked as Ignore.