<commit_before>package dmtest

import stack._
import fs._

class WIP extends DMTestSuite {
  test("write-around can log rotate") {
    slowDevice(Sector.G(1)) { backing =>
      fastDevice(Sector.M(10)) { caching =>
        Writeboost.sweepCaches(caching)
        Writeboost.Table(backing, caching, Map("write_around_mode" -> 1, "read_cache_threshold" -> 127)).create { s =>

        }
      }
    }
  }
}

<commit_msg>wip<commit_after>package dmtest

import stack._
import fs._

class WIP extends DMTestSuite {
  test("write-around can log rotate") {
    slowDevice(Sector.G(1)) { backing =>
      fastDevice(Sector.M(10)) { caching =>
        Writeboost.sweepCaches(caching)
        Writeboost.Table(backing, caching, Map("write_around_mode" -> 1, "read_cache_threshold" -> 1)).create { s =>
          import PatternedSeqIO._

          val reader = new PatternedSeqIO(Seq(Read(Sector.K(4)), Skip(Sector.K(4))))
          reader.maxIOAmount = Sector.G(1)
          reader.run(s)

          Thread.sleep(5000)

          reader.maxIOAmount = Sector.G(1)
          reader.run(s)

          assert(s.status.currentId > s.status.nrSegments)
        }
      }
    }
  }
}


{'fraction_non_alphanumeric': 0.13247863247863248, 'fraction_numerical': 0.017094017094017096, 'mean_word_length': 2.6141975308641974, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2991428', 'n_tokens_mistral': 416, 'n_tokens_neox': 386, 'n_words': 68}