private int getCurrentRecord()
    {
        //Get the current time
        long currentTime = System.currentTimeMillis();

        //How far along has the test run?
        long currentDuration=currentTime-startTime;
        //How far along the test are we?
        double currentRelativePosition=(currentDuration/1000d)/testDurationInSeconds;
        //determine the position of the test window
        double currentRecordRaw=currentRelativePosition*(numKeys-windowSize);

        Long currentRecord=Math.round(currentRecordRaw);

        return currentRecord.intValue();
    }
private int getCurrentRecord ( ) { long currentTime = System . currentTimeMillis ( ) ; long currentDuration = currentTime - startTime ; double currentRelativePosition = ( currentDuration / 1000d ) / testDurationInSeconds ; double currentRecordRaw = currentRelativePosition * ( numKeys - windowSize ) ; Long currentRecord = Math . round ( currentRecordRaw ) ; return currentRecord . intValue ( ) ; }
/*
Gets the currentWindow, Window number starts from 0.