コード例 #1
0
def test_number_of_jobs():
    j = Jobs()
    j.read_log_file('tdata/axiem_success.log')
    assert j.number_of_jobs() == 1
    j.read_log_file('tdata/axiem_fail.log')
    assert j.number_of_jobs() == 2
    j.read_log_file('tdata/analyst_success.log')
    assert j.number_of_jobs() == 3
コード例 #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
コード例 #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