Browse Source

Changes goodput calculation.

master
Lukas Prause 2 years ago
parent
commit
7187e62c9c
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      plot_transmission_timeline.py

+ 5
- 3
plot_transmission_timeline.py View File

@@ -53,13 +53,13 @@ def plot_cdf(dataframe, column_name):
.rename(columns={column_name: "frequency"})

# PDF
stats_df["pdf"] = stats_df["frequency"] / sum(stats_df["frequency"])
stats_df["PDF"] = stats_df["frequency"] / sum(stats_df["frequency"])

# CDF
stats_df["cdf"] = stats_df["pdf"].cumsum()
stats_df["CDF"] = stats_df["PDF"].cumsum()
stats_df = stats_df.reset_index()

stats_df.plot(x=column_name, y=["cdf"], grid=True)
stats_df.plot(x=column_name, y=["CDF"], grid=True)


if __name__ == "__main__":
@@ -217,6 +217,8 @@ if __name__ == "__main__":

print("Calculate and polt CDF...")
plot_cdf(transmission_df, "goodput")
plt.xlabel("goodput [mbps]")
plt.ylabel("CDF")

if args.save:
plt.savefig("{}{}_cdf_plot.pdf".format(args.save, "goodput"))

Loading…
Cancel
Save