public double findPutMessageEntireTimePX(double px) {
        Map<Long, LongAdder> lastBuckets = this.lastBuckets;
        long start = System.currentTimeMillis();
        double result = 0.0;
        long totalRequest = lastBuckets.values().stream().mapToLong(LongAdder::longValue).sum();
        long pxIndex = (long) (totalRequest * px);
        long passCount = 0;
        List<Long> bucketValue = new ArrayList<>(lastBuckets.keySet());
        for (int i = 0; i < bucketValue.size(); i++) {
            long count = lastBuckets.get(bucketValue.get(i)).longValue();
            if (pxIndex <= passCount + count) {
                long relativeIndex = pxIndex - passCount;
                if (i == 0) {
                    result = count == 0 ? 0 : bucketValue.get(i) * relativeIndex / (double)count;
                } else {
                    long lastBucket = bucketValue.get(i - 1);
                    result = lastBucket + (count == 0 ? 0 : (bucketValue.get(i) - lastBucket) * relativeIndex / (double)count);
                }
                break;
            } else {
                passCount += count;
            }
        }
        log.info("findPutMessageEntireTimePX {}={}ms cost {}ms", px, String.format("%.2f", result), System.currentTimeMillis() - start);
        return result;
    }
@Test
    public void findPutMessageEntireTimePXTest() throws InvocationTargetException, NoSuchMethodException, IllegalAccessException {
        final StoreStatsService storeStatsService = new StoreStatsService();
        for (int i = 1; i <= 1000; i++) {
            for (int j = 0; j < i; j++) {
                storeStatsService.incPutMessageEntireTime(i);
            }
        }
        Method method = StoreStatsService.class.getDeclaredMethod("resetPutMessageTimeBuckets");
        method.setAccessible(true);
        method.invoke(storeStatsService);
    }