Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions measurements/CPU/plotResourceUsageDuringThrouputTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@
df_plot = pd.DataFrame(data)

# Create the grouped bar chart
plt.figure(figsize=(8.27, 11.69)) # A4 size in inches (210mm x 297mm)
plt.figure(figsize=(10, 7), dpi=100) # Changed to 1000x700 pixels equivalent
sns.barplot(x='Metric', y='Value', hue='Protocol', data=df_plot, palette={'Mediator': '#F44336', 'ZeroMQ': '#4CAF50'})

plt.xlabel('Performance Metric', fontsize=14)
plt.ylabel('Average Usage', fontsize=14)
plt.legend(title='Protocol', fontsize=12, title_fontsize=12)
plt.xlabel('Performance Metric', fontsize=18)
plt.ylabel('Average Usage', fontsize=18)
plt.xticks(fontsize=16)
plt.legend(title='Protocol', fontsize=16, title_fontsize=16)
plt.grid(axis='y', linestyle='--', alpha=0.7)

plt.tight_layout()

# Save to PDF
plt.savefig("resource_utilization.pdf", format="pdf")
plt.savefig("resource_utilization.pdf", format="pdf", dpi=100)
plt.show()
Binary file modified measurements/CPU/resource_utilization.pdf
Binary file not shown.
12 changes: 6 additions & 6 deletions measurements/Latency/latencyDistributionComparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def generate_comparison_plot():
df_combined = pd.concat([df_zmq, df_mediator], ignore_index=True)

print("Generating plot...")
plt.figure(figsize=(8.27, 11.69)) # A4 size in inches
plt.figure(figsize=(10, 7), dpi=100) # Changed to 1000x700 pixels equivalent

sns.violinplot(
x='Protocol',
Expand All @@ -31,14 +31,14 @@ def generate_comparison_plot():
palette={'ZeroMQ': '#4CAF50', 'Mediator': '#F44336'}
)

plt.xlabel('Communication Protocol', fontsize=14)
plt.ylabel('Round-Trip Latency (ms)', fontsize=14)
plt.xticks(fontsize=12)
plt.yticks(fontsize=12)
plt.xlabel('Communication Protocol', fontsize=18)
plt.ylabel('Round-Trip Latency (ms)', fontsize=18)
plt.xticks(fontsize=16)
plt.yticks(fontsize=16)
plt.grid(True, which='major', linestyle='--', linewidth=0.5, color='grey')

plt.tight_layout()
plt.savefig('latency_comparison.pdf', format='pdf')
plt.savefig('latency_comparison.pdf', format='pdf', dpi=100)
print("Plot saved as 'latency_comparison.pdf'")

plt.show()
Expand Down
10 changes: 5 additions & 5 deletions measurements/Latency/latencyDistributionOfZMQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
exit()

# Create the plot
plt.figure(figsize=(8.27, 11.69)) # A4 size in inches
plt.figure(figsize=(10, 7), dpi=100) # 1000x700 px at 100 dpi

sns.violinplot(
x='Protocol',
Expand All @@ -22,15 +22,15 @@

# Add details to the plot
plt.xlabel('')
plt.ylabel('Round-Trip Latency (ms)', fontsize=14)
plt.ylabel('Round-Trip Latency (ms)', fontsize=16)
plt.grid(True, linestyle='--', alpha=0.6)
plt.xticks(fontsize=12)
plt.yticks(fontsize=12)
plt.xticks(fontsize=14)
plt.yticks(fontsize=14)

plt.tight_layout()

# Save to PDF
plt.savefig('zmq_latency.pdf', format='pdf')
plt.savefig('zmq_latency.pdf', format='pdf', dpi=100)
print("Plot saved as 'zmq_latency.pdf'")

# Calculate and print stats for your paper
Expand Down
Binary file modified measurements/Latency/latency_comparison.pdf
Binary file not shown.
Binary file modified measurements/Latency/zmq_latency.pdf
Binary file not shown.
19 changes: 8 additions & 11 deletions measurements/Throughput/maximumThroughputComaprison.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
import matplotlib.pyplot as plt

# --- Enter your collected data here ---
throughput_mediator = 15.7 # messages/sec
throughput_zmq = 25432.1 # messages/sec
# -------------------------------------

protocols = ['Mediator', 'ZeroMQ']
values = [throughput_mediator, throughput_zmq]
colors = ['#F44336', '#4CAF50']

plt.figure(figsize=(8.27, 11.69)) # A4 size in inches
# Match exact pixel size: 1000x700 with dpi=100
plt.figure(figsize=(10, 7), dpi=100)

bars = plt.bar(protocols, values, color=colors)

# Add plot details
plt.ylabel('Throughput (Messages/Second)', fontsize=14)
plt.xticks(fontsize=12)
plt.yscale('log') # log scale for large differences
plt.ylabel('Throughput (Messages/Second)', fontsize=18)
plt.xticks(fontsize=16)
plt.yscale('log')
plt.grid(axis='y', linestyle='--', alpha=0.7)

# Add text labels on top of the bars
for bar in bars:
yval = bar.get_height()
plt.text(
Expand All @@ -28,13 +25,13 @@
f'{yval:,.0f}',
va='bottom',
ha='center',
fontsize=12
fontsize=16
)

plt.tight_layout()

# Save the figure as PDF
plt.savefig('throughput_comparison.pdf', format='pdf')
# Save with the same dimensions
plt.savefig("throughput_comparison.pdf", format="pdf", dpi=100)
print("Plot saved as 'throughput_comparison.pdf'")

plt.show()
Binary file modified measurements/Throughput/throughput_comparison.pdf
Binary file not shown.