aggrstruct.py 1.22 KB
Newer Older
akhuziy's avatar
akhuziy committed
1
2
3
4
5
6
7
class SeqVals:
    delta = None
    seq = []
    def __init__(self, delta=None, seq=None):
        self.delta = delta
        self.seq = seq

8
9
10
11
12
13
14
15
16
17
18
19
20
21
class ProcData:
    cpu_time_user = None
    cpu_time_system = None
    cpu_time_idle = None
    cpu_time_iowait = None
    write_bytes = None
    write_count = None
    read_bytes = None
    read_count = None
    mem_rss_max = None
    mem_rss_avg = None
    mem_swap_max = None
    mem_vms = None
    cpu_usage = None
akhuziy's avatar
akhuziy committed
22
23
    seq_cpu_usage = SeqVals()
    seq_mem_rss_sum = SeqVals()
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

class AllocCUData:
    node_id = None
    cu_count = None
    def __init__(self, node=None, cu=None):
        self.node_id = node
        self.cu_count = cu

class JobData:
    id = None
    user_name = None
    used_queue = None
    submit_time = None
    start_time = None
    end_time = None
    run_time = None
    requested_time = None
    requested_cu = None
    num_nodes = None
    alloc_cu = [AllocCUData()]

class NodeData:
    name = None
    cpu_model = None
    sockets = None
    cores_per_socket = None
    virt_thr_core = None
    phys_thr_core = None
    main_mem = None
akhuziy's avatar
akhuziy committed
53
54
    seq_cpu_usage = SeqVals()
    seq_load = SeqVals()
55
56
57
58
59
    proc = ProcData()

class Aggregator:
    job = JobData()
    nodes = [NodeData()]