Commit 75559bf2 authored by Mario Hock's avatar Mario Hock

(some cleanup)

parent 148d6c09
......@@ -13,74 +13,6 @@ class LoggingClass:
## Header definition
top = dict()
general = dict()
class_definitions = dict()
### General
##general["Classes"] = ("Time", "CPU", "NIC", "RAM")
#general["Classes"] = ("Time", "CPU", "NIC")
#general["Type"] = None
#general["Comment"] = ""
#general["Begin"] = 0
#general["End"] = 0
#general["Duration"] = 0
top["General"] = general
## Classes
#cpu = LoggingClass( name = "CPU",
#fields = ("usr", "system", "softirq", "other"),
#siblings = [ "CPU" + str(i) for i in range(1,9) ],
#description = "CPU utilization in percent" )
#class_definitions[cpu.name] = cpu.values
#nic = LoggingClass( name = "NIC",
#fields = ("send", "receive"),
#siblings = [ "eth" + str(i) for i in range(1,3) ],
#description = "Network traffic (Bits/s)" )
#class_definitions[nic.name] = nic.values
#time = LoggingClass( name = "Time",
#fields = ("begin", "end", "duration"),
#siblings = None,
#description = "Begin, end, and duration of this measurement." )
#class_definitions[time.name] = time.values
#top["ClassDefinitions"] = class_definitions
#### JSON
##pretty_json = json.dumps(top, sort_keys=True, indent=4)
##print( pretty_json )
#### CSV header
##csv_header = list()
##for _class in general["Classes"]:
###for _class in ("CPU", "NIC", ):
##c = class_definitions[_class]
##if ( c["Siblings"] ):
##for sibling in c["Siblings"]:
##for field in c["Fields"]:
##csv_header.append( ".".join([sibling, field]) )
##else:
##for field in c["Fields"]:
##csv_header.append( field )
##print( ", ".join(csv_header) )
class MeasurementLogger:
"""
Logs the given »Measurements« (derived from two »Readings«) into a JSON-header CSV-body file.
......
Markdown is supported
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