public static long keyToBucketId(long key) {
        long retVal = Long.reverse(key);
        long usedCountMSB = key << (64 - BucketId.COUNT_BITS);
        retVal <<= BucketId.COUNT_BITS;
        retVal >>>= BucketId.COUNT_BITS;
        retVal |= usedCountMSB;

        return retVal;
    }
Calculate an estimate on how far we've managed to iterate over both the
superbuckets and the sub-buckets.

Runs in <em>O(n+m)</em> time, where <em>n</em> is the number of active buckets
and <em>m</em> is the number of pending buckets. Both these values should
be fairly small in practice, however.

Method is synchronized, as legacy code treats this as an atomic read.

@return A value in the range [0, 100] estimating the progress.
documentapi/src/main/java/com/yahoo/documentapi/ProgressToken.java