Commit 32b2dbf9 authored by Philippe SWARTVAGHER's avatar Philippe SWARTVAGHER
Browse files

Add documentation for attributes of FilesParser

parent d5795912
......@@ -93,10 +93,42 @@ class CommCompGraphCommType(Enum):
class FilesParser:
"""
A class used to parse the output files of bench_* programs.
Attributes
----------
comm_bw_alone_results : {x => [min, med, max]}
The network bandwidth performances of communications executed alone.
comm_bw_with_comp_results : {x => [min, med, max]}
The network bandwidth performances of communications executed along with computations.
comm_lat_alone_results : {x => [min, med, max]}
The network latency performances of communications executed alone.
comm_lat_with_comp_results : {x => [min, med, max]}
The network latency performances of communications executed along with computations.
comp_alone_results : {op => { x => {"time" => [min, avg, max], "other metric (gflops, bw, ...)" => [min, avg, max]}}}
The computation performances when executed alone.
comp_with_comm_results : {op => { x => {"time" => [min, avg, max], "other metric (gflops, bw, ...)" => [min, avg, max]}}}
The computation performances when executed along with communications.
comp_alone_per_thread_results : {op => { x => {"time" => {"min" => [], "avg" => [], "max" => []}, "other metric (gflops, bw, ...)" => {"min" => [], "avg" => [], "max" => []}}}}
The computation performances per thread when executed alone.
comp_with_comm_per_thread_results : {op => { x => {"time" => {"min" => [], "avg" => [], "max" => []}, "other metric (gflops, bw, ...)" => {"min" => [], "avg" => [], "max" => []}}}}
The computation performances per thread when executed along with communications.
machine : {key => int}
Machine properties (#PUs, LLC size, #NUMA, #sockets).
x_type : string
The type of X values, among "cursor", "thread", "byte". It can be
forced with the parameter of the constructor, otherwise it is
defined according to filenames.
filename_prefix : string
The common prefix of parsed files, automatically guessed.
compute_bench_type : CompType
A child class of CompType representing the type of computations.
x_values : [number]
The sorted list of X values.
"""
def __init__(self, files, per_core=False, user_per_core_nb=None, x_type=None):
"""
x_type can be forced, otherwise it is defined according to filenames.
"""
if len(files) == 0:
raise Exception("You have to provide some files to parse !")
......@@ -105,6 +137,7 @@ class FilesParser:
self.comm_lat_alone_results = {}
self.comm_lat_with_comp_results = {}
self.comp_alone_results = {} # {op => { x => {"time" => [min, avg, max], "other metric (gflops, bw, ...)" => [min, avg, max]}}}
self.comp_with_comm_results = {}
self.comp_alone_per_thread_results = {} # {op => { x => {"time" => {"min" => [], "avg" => [], "max" => []}, "other metric (gflops, bw, ...)" => {"min" => [], "avg" => [], "max" => []}}}}
self.comp_with_comm_per_thread_results = {}
self.machine = {
......@@ -113,7 +146,6 @@ class FilesParser:
"nb_numa_nodes": None,
"nb_sockets": None
}
self.comp_with_comm_results = {}
self._forced_x_type = (x_type is not None)
self.x_type = x_type
self.filename_prefix = None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment