Example #1
0
def test_unit(full_iozone_stdout):

    ex = iozone_extract(full_iozone_stdout)
    res = ex.output_unit()
    exp = "kBytes/sec"
    assert type(res) == type(exp)
    assert res == exp
Example #2
0
def test_experiments_only(full_iozone_stdout):

    ex = iozone_extract(full_iozone_stdout)
    res = ex.experiments()

    assert type(res) == type([])
    assert len(res) == 8
Example #3
0
def test_timeres(full_iozone_stdout):

    ex = iozone_extract(full_iozone_stdout)
    res = ex.time_resolution_seconds()

    exp = "0.000001"
    assert type(res) == type(exp)
    assert res == exp
Example #4
0
def test_filestride(full_iozone_stdout):

    ex = iozone_extract(full_iozone_stdout)
    res = ex.file_stride()

    exp = 17

    assert type(res) == type(exp)
    assert res == exp
Example #5
0
def test_cachedetails(full_iozone_stdout):

    ex = iozone_extract(full_iozone_stdout)
    res = ex.assumed_cache()

    exp = (1024, 32)

    assert type(res) == type(exp)
    assert res == exp
Example #6
0
def test_version(full_iozone_stdout):

    ex = iozone_extract(full_iozone_stdout)

    res = ex.version()

    assert type(res) == type("42.2")
    assert ex.version() != 0
    assert float(res) == 3.434
Example #7
0
def test_table_header(full_iozone_stdout):

    ex = iozone_extract(full_iozone_stdout)
    res = ex.table_header()

    exp = [
        "kB", "reclen", "write", "rewrite", "read", "reread", "randomread",
        "randomwrite", "bkwdread", "recordrewrite", "strideread", "fwrite",
        "frewrite", "fread", "freread"
    ]

    assert type(res) == type(exp)
    assert res == exp
Example #8
0
def test_build(full_iozone_stdout):

    ex = iozone_extract(full_iozone_stdout)
    res = ex.build()
    assert type(res) == type("42.2")
    assert res == "linux-AMD64"
Example #9
0
def test_definition(full_iozone_stdout):

    ex = iozone_extract(full_iozone_stdout)

    assert len(ex.stdout) != 0