Skip to content

Commit c2e1625

Browse files
committed
chore: Show slot distribution
1 parent ffea541 commit c2e1625

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

buildSrc/src/main/kotlin/datadog/gradle/plugin/ci/CIJobsExtensions.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ val Project.isInSelectedSlot: Provider<Boolean>
2525
val selectedSlot = parts[0]
2626
val totalSlots = parts[1]
2727

28+
// Distribution numbers when running on rootProject.allprojects indicates
29+
// bucket sizes are reasonably balanced:
30+
//
31+
// * size 4 distribution: {2=146, 0=143, 1=157, 3=145}
32+
// * size 6 distribution: {4=100, 0=92, 3=97, 2=97, 1=108, 5=97}
33+
// * size 8 distribution: {2=62, 4=72, 0=71, 5=70, 7=78, 6=84, 1=87, 3=67}
34+
// * size 10 distribution: {8=62, 0=65, 5=70, 9=59, 3=54, 1=56, 6=63, 4=47, 2=52, 7=63}
35+
// * size 12 distribution: {10=55, 0=47, 4=45, 9=46, 8=51, 3=51, 2=46, 1=59, 5=52, 7=49, 11=45, 6=45}
2836
val currentTaskPartition = abs(project.path.hashCode() % totalSlots.toInt())
2937

3038
project.logger.info(

0 commit comments

Comments
 (0)