<commit_before>require('proof')(2, async (okay) => {
    const Destructible = require('destructible')
    const destructible = new Destructible('split.t')

    const Strata = require('../strata')
    const Cache = require('../cache')

    const utilities = require('./utilities')
    const path = require('path')
    const directory = path.join(utilities.directory, 'split')
    await utilities.reset(directory)
    await utilities.serialize(directory, {
        '0.0': [[ '0.1', null ]],
        '0.1': [[
            'right', null
        ], [
            'insert', 0, 'a'
        ], [
            'insert', 1, 'b'
        ], [
            'insert', 2, 'c'
        ], [
            'insert', 3, 'd'
        ], [
            'insert', 4, 'e'
        ]]
    })

    destructible.durable('test', async function () {
        async function split () {
            const cache = new Cache
            const strata = new Strata(destructible.ephemeral('split'), { directory, cache })
            await strata.open()
            const cursor = (await strata.search('f')).get()
            cursor.insert('f', 'f', cursor.index)
            cursor.release()
            await cursor.flush()
            await new Promise(resolve => setTimeout(resolve, 50))
            await strata.close()
            cache.purge(0)
            // **TODO** broken test...
            // okay(cache.heft, 0, 'cache purged')
        }
        await split()
        async function reopen () {
            const cache = new Cache
            const strata = new Strata(destructible.ephemeral('reopen'), { directory, cache })
            await strata.open()
            const cursor = (await strata.search('f')).get()
            okay(cursor.items[cursor.index].value, 'f', 'found')
            cursor.release()
            await strata.close()
        }
        await reopen()
        async function traverse () {
            const cache = new Cache
            const strata = new Strata(destructible.ephemeral('traverse'), { directory, cache })
            await strata.open()
            let right = 'a'
            const items = []
            do {
                const cursor = (await strata.search(right)).get()
                for (let i = cursor.index; i < cursor.page.items.length; i++) {
                    items.push(cursor.page.items[i].value)
                }<commit_msg>Remove pause from split test.<commit_after>require('proof')(2, async (okay) => {
    const Destructible = require('destructible')
    const destructible = new Destructible('split.t')

    const Strata = require('../strata')
    const Cache = require('../cache')

    const utilities = require('./utilities')
    const path = require('path')
    const directory = path.join(utilities.directory, 'split')
    await utilities.reset(directory)
    await utilities.serialize(directory, {
        '0.0': [[ '0.1', null ]],
        '0.1': [[
            'right', null
        ], [
            'insert', 0, 'a'
        ], [
            'insert', 1, 'b'
        ], [
            'insert', 2, 'c'
        ], [
            'insert', 3, 'd'
        ], [
            'insert', 4, 'e'
        ]]
    })

    destructible.durable('test', async function () {
        async function split () {
            const cache = new Cache
            const strata = new Strata(destructible.ephemeral('split'), { directory, cache })
            await strata.open()
            const cursor = (await strata.search('f')).get()
            cursor.insert('f', 'f', cursor.index)
            cursor.release()
            await cursor.flush()
            await strata.close()
            cache.purge(0)
            // **TODO** broken test...
            // okay(cache.heft, 0, 'cache purged')
        }
        await split()
        async function reopen () {
            const cache = new Cache
            const strata = new Strata(destructible.ephemeral('reopen'), { directory, cache })
            await strata.open()
            const cursor = (await strata.search('f')).get()
            okay(cursor.items[cursor.index].value, 'f', 'found')
            cursor.release()
            await strata.close()
        }
        await reopen()
        async function traverse () {
            const cache = new Cache
            const strata = new Strata(destructible.ephemeral('traverse'), { directory, cache })
            await strata.open()
            let right = 'a'
            const items = []
            do {
                const cursor = (await strata.search(right)).get()
                for (let i = cursor.index; i < cursor.page.items.length; i++) {
                    items.push(cursor.page.items[i].value)
                }
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.006435006435006435, 'mean_word_length': 1.670675830469645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '2173585', 'n_tokens_mistral': 1309, 'n_tokens_neox': 1263, 'n_words': 311}