Exemple #1
0
def analyze(path):
    fs = FileStorage(path, read_only=1)
    fsi = fs.iterator()
    report = Report()
    for txn in fsi:
        analyze_trans(report, txn)
    return report
Exemple #2
0
def analyze(path):
    fs = FileStorage(path, read_only=1)
    fsi = fs.iterator()
    report = Report()
    for txn in fsi:
        analyze_trans(report, txn)
    return report
Exemple #3
0
def analyze(path, use_dbm):
    fs = FileStorage(path, read_only=1)
    fsi = fs.iterator()
    report = Report(use_dbm)
    for txn in fsi:
        analyze_trans(report, txn)
    if use_dbm:
        shutil.rmtree(report.temp_dir)
    return report
Exemple #4
0
def analyze(path, use_dbm):
    fs = FileStorage(path, read_only=1)
    fsi = fs.iterator()
    report = Report(use_dbm)
    for txn in fsi:
        analyze_trans(report, txn)
    if use_dbm:
        shutil.rmtree(report.temp_dir)
    return report
Exemple #5
0
def _zext_supported():
    tmpd = mkdtemp('', 'zext_check.')
    defer(lambda: rmtree(tmpd))
    dbfs = tmpd + '/1.fs'

    stor = FileStorage(dbfs, create=True)
    db = DB(stor)
    conn = db.open()
    root = conn.root()
    root._p_changed = True

    txn = transaction.get()
    txn.setExtendedInfo('a', 'b')
    txn.commit()

    for last_txn in stor.iterator(start=stor.lastTransaction()):
        break
    else:
        assert False, "cannot see details of last transaction"

    assert last_txn.extension == {'a': 'b'}
    return hasattr(last_txn, 'extension_bytes')