Skip to content

Commit

Permalink
fix(wal/benchmark): append at a fixed rate
Browse files Browse the repository at this point in the history
Signed-off-by: Ning Yu <[email protected]>
  • Loading branch information
Chillax-0v0 committed Nov 14, 2023
1 parent 6d60a43 commit de3a8a3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private void runAppendTask(int index, AppendTaskConfig config, Stat stat) throws
long now = System.nanoTime();
long elapsedNanos = now - lastAppendTimeNanos;
if (elapsedNanos >= intervalNanos) {
lastAppendTimeNanos = now;
lastAppendTimeNanos += intervalNanos;

Check warning on line 141 in s3stream/src/main/java/com/automq/stream/s3/wal/benchmark/WriteBench.java

View check run for this annotation

Codecov / codecov/patch

s3stream/src/main/java/com/automq/stream/s3/wal/benchmark/WriteBench.java#L141

Added line #L141 was not covered by tests
break;
}
LockSupport.parkNanos((intervalNanos - elapsedNanos) >> 2);
Expand Down

0 comments on commit de3a8a3

Please sign in to comment.