Make sa optional
This commit is contained in:
parent
a159ecdd10
commit
381d330dcd
2 changed files with 19 additions and 4 deletions
17
exp.py
17
exp.py
|
|
@ -29,6 +29,7 @@ CONFIGS = {
|
|||
"wattmeter": False,
|
||||
"perf": False,
|
||||
"rapl": False,
|
||||
"sa": True,
|
||||
"perf_dir": "/home/tuxmain/.cache/exp",
|
||||
"listen_port": 8080,
|
||||
"notify_listen": ("127.0.0.1", 8090),
|
||||
|
|
@ -62,6 +63,7 @@ CONFIGS = {
|
|||
"wattmeter": False,
|
||||
"perf": True,
|
||||
"rapl": False,
|
||||
"sa": True,
|
||||
"perf_dir": "/home/tuxmain/.cache/exp",
|
||||
"listen_port": 8080,
|
||||
"notify_listen": ("127.0.0.1", 8090),
|
||||
|
|
@ -98,6 +100,7 @@ CONFIGS = {
|
|||
"wattmeter": True,
|
||||
"perf": False,
|
||||
"rapl": False,
|
||||
"sa": True,
|
||||
"listen_port": 8080,
|
||||
"idle": "idle - - - - - - - - - 600.000081539154 0.0 896 4792 0.5399999999999991 0 -",
|
||||
"notify_listen": ("0.0.0.0", 8090),
|
||||
|
|
@ -129,6 +132,7 @@ CONFIGS = {
|
|||
"wattmeter": False,
|
||||
"perf": True,
|
||||
"rapl": False,
|
||||
"sa": True,
|
||||
"perf_dir": "/home/exp/.cache/exp",
|
||||
"listen_port": 8080,
|
||||
"notify_listen": ("127.0.0.1", 8090),
|
||||
|
|
@ -165,6 +169,7 @@ CONFIGS = {
|
|||
"wattmeter": True,
|
||||
"perf": False,
|
||||
"rapl": False,
|
||||
"sa": True,
|
||||
"listen_port": 8080,
|
||||
"idle": "idle - - - - - - - - - 1200.0000903606415 0 589 4764 3.478999999999999 0 -",
|
||||
"notify_listen": ("0.0.0.0", 8090),
|
||||
|
|
@ -196,6 +201,7 @@ CONFIGS = {
|
|||
"wattmeter": False,
|
||||
"perf": True,
|
||||
"rapl": False,
|
||||
"sa": True,
|
||||
"perf_dir": "/home/exp/.cache/exp",
|
||||
"listen_port": 8080,
|
||||
},
|
||||
|
|
@ -229,6 +235,7 @@ CONFIGS = {
|
|||
"wattmeter": True,
|
||||
"perf": False,
|
||||
"rapl": True,
|
||||
"sa": True,
|
||||
"listen_port": 8080,
|
||||
"idle": "idle - - - - - - - - - 600.000194311142 0.0 1822 6541 1.3880000000000052 304283035 -",
|
||||
"notify_listen": ("0.0.0.0", 8090),
|
||||
|
|
@ -260,6 +267,7 @@ CONFIGS = {
|
|||
"wattmeter": False,
|
||||
"perf": True,
|
||||
"rapl": False,
|
||||
"sa": True,
|
||||
"perf_dir": "/home/exp/.cache/exp",
|
||||
"listen_port": 8080,
|
||||
},
|
||||
|
|
@ -292,6 +300,7 @@ CONFIGS = {
|
|||
"wattmeter": False,
|
||||
"perf": False,
|
||||
"rapl": False,
|
||||
"sa": False,
|
||||
"listen_port": 8080,
|
||||
"idle": "idle - - - - - - - - - 600.000194311142 0.0 1822 6541 1.3880000000000052 304283035 -",#TODO
|
||||
"notify_listen": ("0.0.0.0", 8090),
|
||||
|
|
@ -913,7 +922,9 @@ def run_exp(config, only_record=None, idle=False, shutdown=False, debug=False):
|
|||
ssh_run_bg(ssh, f"perf record -F 997 --call-graph dwarf,64000 -g -o {prof_filename} -p {process_pid}")
|
||||
|
||||
# Measure
|
||||
cpu = get_cpu_stat(ssh, ["netreplay-"+impl, "tokio-runtime-w"])
|
||||
cpu = 0
|
||||
if config["sa"]:
|
||||
cpu = get_cpu_stat(ssh, ["netreplay-"+impl, "tokio-runtime-w"])
|
||||
remote_bytes_in, remote_bytes_out = get_net_stat(ssh)
|
||||
energy = 0
|
||||
energy_rapl = 0
|
||||
|
|
@ -953,7 +964,9 @@ def run_exp(config, only_record=None, idle=False, shutdown=False, debug=False):
|
|||
pass
|
||||
|
||||
# Measure CPU after (as it may update only after the process is killed)
|
||||
new_cpu = get_cpu_stat(ssh, ["netreplay-"+impl, "tokio-runtime-w"])
|
||||
new_cpu = 0
|
||||
if config["sa"]:
|
||||
new_cpu = get_cpu_stat(ssh, ["netreplay-"+impl, "tokio-runtime-w"])
|
||||
|
||||
record_filename = record["filename"]
|
||||
cpu_diff = new_cpu - cpu
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue