Skip to content

Commit

Permalink
Update script.py
Browse files Browse the repository at this point in the history
- refactor exploit_length into exploit_length_bits
  • Loading branch information
imAlessas committed May 29, 2024
1 parent 90ffcc2 commit 070a3e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions multimedia/hw-2/script/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,20 @@ def plot_all_data() -> None:
##### all latencies #####

# calculate the true number of retrived data in the case of some lost packages
exploit_lengths = []
exploit_lengths_bits = []
latencies = []

for key, value in stats.items():
for item in value:
# convert directly into bits whil building
exploit_lengths.append( 8 * (key + 28))
exploit_lengths_bits.append( 8 * (key + 28))
latencies.append(item)


random_colors = np.random.rand(len(exploit_lengths), 3)
random_colors = np.random.rand(len(exploit_lengths_bits), 3)

plt.figure(figsize=(10, 6))
plt.scatter(exploit_lengths, latencies, edgecolors=random_colors, facecolors="none", s=10)
plt.scatter(exploit_lengths_bits, latencies, edgecolors=random_colors, facecolors="none", s=10)
plt.xlabel("Packet size - Bits")
plt.ylabel("Round-Trip-Time(k) - millisecs")
plt.title("Total gathered latencies")
Expand Down

0 comments on commit 070a3e9

Please sign in to comment.