Ejemplo n.º 1
0
def test_jobs_with_duration():
    j = Jobs()
    j.read_log_file('tdata/axiem_success.log')
    x = j.jobs_with_duration()
    assert len(x) == 1
    j.read_log_file('tdata/axiem_fail.log')
    x = j.jobs_with_duration()
    assert len(x) == 2
Ejemplo n.º 2
0
def test_aggregate_stats():
    j = Jobs('tdata/awr_jobs_2016.txt')
    assert j.number_of_jobs() == 22
    assert j.first_job_at() == 1481566425.0794
    assert j.last_job_at() == 1481825588.0556
    assert len(j.jobs_with_duration()) == 17
Ejemplo n.º 3
0
def test_multiple_logs():
    j = Jobs('tdata/axiem_success.log')
    j.read_log_file('tdata/axiem_fail.log')
    j.read_log_file('tdata/axiem_deque.log')
    assert j.number_of_jobs() == 3
    assert len(j.jobs_with_duration()) == 2