Skip to content

Commit

Permalink
review: Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
t2gran committed Jul 3, 2024
1 parent b84f117 commit eef2d6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static int[] createStopBoardAlightTransferCosts(
int[] stopBoardAlightTransferCosts = new int[stops.stopIndexSize()];

for (int i = 0; i < stops.stopIndexSize(); ++i) {
// There can be wholes in the stop index, so we need to account for 'null' here.
// There can be holes in the stop index, so we need to account for 'null' here.
var stop = stops.stopByIndex(i);
if (stop == null) {
stopBoardAlightTransferCosts[i] = defaultCost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class StopModelIndex {
regularStopSpatialIndex.compact();
locationIndex.compact();

logWholesInIndex();
logHolesInIndex();
}

/**
Expand Down Expand Up @@ -98,14 +98,14 @@ Collection<AreaStop> findAreaStops(Envelope envelope) {
* A small number of wholes in the stop-index is ok, but if there are many, it will affect
* the Raptor performance.
*/
private void logWholesInIndex() {
private void logHolesInIndex() {
int c = (int) Arrays.stream(stopsByIndex).filter(Objects::isNull).count();
if (c > 0) {
double p = (100.0 * c) / stopsByIndex.length;
// Log this as warning is more than 5% of the space is null
LOG
.atLevel(p >= 5.0 ? Level.WARN : Level.INFO)
.log("The stop index contains wholes in it. {} of {} is null.", c, stopsByIndex.length);
.log("The stop index contains holes in it. {} of {} is null.", c, stopsByIndex.length);
}
}
}

0 comments on commit eef2d6b

Please sign in to comment.