private boolean blockOccupancyAboveThreshold(final long cumulativeGasUsed) {
    final long gasRemaining = blockGasLimit - cumulativeGasUsed;
    final double occupancyRatio = (double) cumulativeGasUsed / (double) blockGasLimit;

    LOG.trace(
        "Min block occupancy ratio {}, gas used {}, available {}, remaining {}, used/available {}",
        context.miningConfiguration().getMinBlockOccupancyRatio(),
        cumulativeGasUsed,
        blockGasLimit,
        gasRemaining,
        occupancyRatio);

    return occupancyRatio >= context.miningConfiguration().getMinBlockOccupancyRatio();
  }
Checks if the block occupancy is above the threshold.

@param cumulativeGasUsed The cumulative gas used by previous txs.
@return True if the block occupancy is above the threshold, false otherwise.
ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/selectors/BlockSizeTransactionSelector.java