Fix session count, concurrency, improve summary
This commit is contained in:
parent
c311c4626b
commit
eba08d3b8b
4 changed files with 103 additions and 38 deletions
34
plots.py
34
plots.py
|
|
@ -72,6 +72,10 @@ def impl_title(impl):
|
|||
# Where gnuplot files, data files and images are output
|
||||
PLOTS_DIR = "/dev/shm/plots"
|
||||
|
||||
# Energy per byte on the network, in W/s
|
||||
# Estimated at 0.06 kWh/GB by Aslan 2018
|
||||
WS_PER_BYTE = 0.06 * 1000 * 3600 / 1024**3
|
||||
|
||||
def gnuplot_histogram(**kwargs):
|
||||
if "machine" in kwargs and kwargs["machine"] != None:
|
||||
kwargs["machine"] = ", " + kwargs["machine"]
|
||||
|
|
@ -525,6 +529,7 @@ def make_summary(logs):
|
|||
n = float(log.get("n", "1000"))
|
||||
plain_results[plain_result_key(log)] = {
|
||||
"cpu": (float(log["cpu"]) - idle_val["cpu"] * float(log["time"])) / n,
|
||||
"total_energy": float(log["Wh"]) * 3600 / n,
|
||||
"energy": (float(log["Wh"]) * 3600 - idle_val["energy"] * float(log["time"])) / n,
|
||||
"in": (float(log["bytes_in"]) - idle_val["in"] * float(log["time"])) / n,
|
||||
"out": (float(log["bytes_out"]) - idle_val["out"] * float(log["time"])) / n,
|
||||
|
|
@ -533,23 +538,38 @@ def make_summary(logs):
|
|||
n = float(log.get("n", "1000"))
|
||||
results[result_key(log)] = {
|
||||
"cpu": (float(log["cpu"]) - idle_val["cpu"] * float(log["time"])) / n,
|
||||
"total_energy": float(log["Wh"]) * 3600 / n,
|
||||
"energy": (float(log["Wh"]) * 3600 - idle_val["energy"] * float(log["time"])) / n,
|
||||
"in": (float(log["bytes_in"]) - idle_val["in"] * float(log["time"])) / n,
|
||||
"out": (float(log["bytes_out"]) - idle_val["out"] * float(log["time"])) / n,
|
||||
}
|
||||
|
||||
lines = [["key", "idle (W)", "no_tls (Ws/S)", "tls (Ws/S)", "tls_only (Ws/S)", "tls_in (1)", "tls_out (1)"]]
|
||||
lines = [[
|
||||
"key",
|
||||
"idle (W)",
|
||||
"no_tls (Ws/S)",
|
||||
"tls (Ws/S)",
|
||||
"tls_min (Ws/S)",
|
||||
#"tls_max (Ws/S)",
|
||||
"tls_in (MB/S)",
|
||||
"tls_out (MB/S)",
|
||||
"tls_io (MB/S)",
|
||||
"tls_net (Ws/S)",
|
||||
]]
|
||||
for k in results:
|
||||
r = results[k]
|
||||
p = plain_results[k[:3]]
|
||||
lines.append([
|
||||
"/".join([str(i) for i in k]),
|
||||
str(idle_val["energy"]),
|
||||
str(p["energy"]),
|
||||
str(r["energy"]),
|
||||
str(r["energy"] - p["energy"]),
|
||||
str((r["in"] - p["in"]) / r["in"]),
|
||||
str((r["out"] - p["out"]) / r["out"]),
|
||||
str(round(idle_val["energy"], 1)),
|
||||
str(round(p["energy"], 1)),
|
||||
str(round(r["energy"], 1)),
|
||||
str(round(r["energy"] - p["energy"], 1)) + " (" + str(round((r["energy"] - p["energy"])/r["energy"]*100, 1)) + "%)",
|
||||
#str(round(r["total_energy"] - p["total_energy"], 1)),
|
||||
str(round((r["in"] - p["in"])/1024**2, 2)) + " (" + str(round((r["in"] - p["in"])/r["in"]*100, 1)) + "%)",
|
||||
str(round((r["out"] - p["out"])/1024**2, 2)) + " (" + str(round((r["out"] - p["out"])/r["out"]*100, 1)) + "%)",
|
||||
str(round((r["in"] + r["out"] - p["in"] - p["out"])/1024**2, 2)) + " (" + str(round((r["in"] + r["out"] - p["in"] - p["out"])/(r["in"] + r["out"])*100, 1)) + "%)",
|
||||
str(round(r["energy"] - p["energy"] + (r["out"] + r["in"] - p["out"] - p["in"]) * WS_PER_BYTE, 2)),
|
||||
])
|
||||
print(tabulate(lines))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue