github.com/zuoyebang/bitalostable@v1.0.1-0.20240229032404-e3b99a834294/testdata/compaction_pacer_maybe_throttle (about)

     1  init deletion
     2  burst: 10
     3  bytesIterated: 5
     4  slowdownThreshold: 10
     5  freeBytes: 100
     6  obsoleteBytes: 1
     7  liveBytes: 100
     8  ----
     9  wait: 5
    10  
    11  # As freeBytes > slowdownThreshold and obsoleteBytesRatio < 0.20,
    12  # all 50 bytes should be asked to wait.
    13  
    14  init deletion
    15  burst: 10
    16  bytesIterated: 50
    17  slowdownThreshold: 10
    18  freeBytes: 100
    19  obsoleteBytes: 1
    20  liveBytes: 100
    21  ----
    22  wait: 10
    23  wait: 10
    24  wait: 10
    25  wait: 10
    26  wait: 10
    27  
    28  # As freeBytes < slowdownThreshold, all 50 bytes should be allowed through.
    29  
    30  init deletion
    31  burst: 10
    32  bytesIterated: 50
    33  slowdownThreshold: 10
    34  freeBytes: 5
    35  obsoleteBytes: 1
    36  liveBytes: 100
    37  ----
    38  allow: 10
    39  allow: 10
    40  allow: 10
    41  allow: 10
    42  allow: 10
    43  
    44  # As obsoleteBytesRatio > 0.20, all 50 bytes should be allowed through.
    45  
    46  init deletion
    47  burst: 10
    48  bytesIterated: 50
    49  slowdownThreshold: 10
    50  freeBytes: 500
    51  obsoleteBytes: 50
    52  liveBytes: 100
    53  ----
    54  allow: 10
    55  allow: 10
    56  allow: 10
    57  allow: 10
    58  allow: 10
    59  
    60  # When obsolete ratio unknown, all 50 bytes should be allowed through.
    61  
    62  init deletion
    63  burst: 10
    64  bytesIterated: 50
    65  slowdownThreshold: 10
    66  freeBytes: 500
    67  ----
    68  allow: 10
    69  allow: 10
    70  allow: 10
    71  allow: 10
    72  allow: 10