Skip to content
Open
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
Binary file added charts/bfs_time_vs_size_advanced.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added charts/bfs_time_vs_size_advanced_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added charts/bfs_time_vs_threads_advanced.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added charts/bfs_time_vs_threads_advanced_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions plot_bfs_performance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

# Читаем CSV
df = pd.read_csv("tmp/results.csv")

# --- График 1: Serial vs Parallel (разные потоки) ---
plt.figure(figsize=(12,6))

serial_df = df[df['Type'] == 'Serial']
parallel_df = df[df['Type'] == 'Parallel']
threads = sorted(parallel_df['Threads'].unique())

plt.plot(serial_df['Vertices'], serial_df['Time_ms'], label='Serial BFS', marker='o', linewidth=2, color='black')

for t in threads:
t_df = parallel_df[parallel_df['Threads'] == t]
plt.plot(t_df['Vertices'], t_df['Time_ms'], marker='o', linestyle='--', label=f'Parallel BFS ({t} threads)')

plt.xlabel('Number of vertices')
plt.ylabel('Time (ms)')
plt.title('BFS Performance: Serial vs Parallel')
plt.legend()
plt.grid(True)
plt.savefig('bfs_time_vs_size_advanced.png')
plt.show()


# --- График 2: Влияние числа потоков на время Parallel BFS ---
plt.figure(figsize=(12,6))
max_v = 50000
parallel_maxv = parallel_df[parallel_df['Vertices'] == 50000]
plt.plot(parallel_maxv['Threads'], parallel_maxv['Time_ms'], marker='o', linestyle='-', color='red')
plt.xlabel('Number of threads')
plt.ylabel('Time (ms)')
plt.title(f'Parallel BFS Scaling with Number of Threads (V={max_v})')
plt.xticks(parallel_maxv['Threads'])
plt.grid(True)
plt.savefig('bfs_time_vs_threads_advanced.png')
plt.show()


135 changes: 135 additions & 0 deletions results/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@

<html>
<head>
<title>Java Concurrency Stress test report</title>
<style type="text/css">
* { font-family: Arial; }
table { font-size: 9pt; }
a { color: #000000; }
.progress { padding: 0px; }
.header { text-align: left; }
.section1 { font-size: 12pt; background-color: #BDB76B; color: #000000; font-weight: bold;}
.section2 { font-size: 12pt; background-color: #F0E68C; color: #000000; font-weight: bold;}
.cell1 { background-color: #FAFAD2; }
.cell2 { background-color: #EEE8AA; }
.passedProgress { background-color: #00AA00; color: #FFFFFF; text-align: center; font-weight: bold; }
.failedProgress { background-color: #FF0000; color: #FFFFFF; text-align: center; font-weight: bold; }
.passed { color: #00AA00; text-align: center; font-weight: bold; }
.failed { color: #FF0000; text-align: center; font-weight: bold; }
.interesting { color: #0000FF; text-align: center; font-weight: bold; }
.spec { color: #AAAA00; text-align: center; font-weight: bold; }
.endResult { font-size: 48pt; text-align: center; font-weight: bold; }
</style>
</head>
<body>
<table width="100%" cellspacing="20">
<tr>
<td>
<p class="endResult failed">
50%
</p>
<table width="100%" cellpadding="3" cellspacing="0">
<tr><td width="50%" class="passedProgress">&nbsp;</td></tr>
<tr><td width="50%" class="failedProgress">&nbsp;</td></tr>
<tr><td nowrap><b>Overall pass rate:</b> 1/2&nbsp;</td></tr>
</table>
<br>
</td>
<td width=100>
<table>
<tr>
<td nowrap>java.specification.name</td>
<td nowrap>Java Platform API Specification</td>
</tr>
<tr>
<td nowrap>java.specification.vendor</td>
<td nowrap>Oracle Corporation</td>
</tr>
<tr>
<td nowrap>java.specification.version</td>
<td nowrap>11</td>
</tr>
<tr>
<td nowrap>java.vendor</td>
<td nowrap>Homebrew</td>
</tr>
<tr>
<td nowrap>java.version</td>
<td nowrap>11.0.27</td>
</tr>
<tr>
<td nowrap>java.vm.name</td>
<td nowrap>OpenJDK 64-Bit Server VM</td>
</tr>
<tr>
<td nowrap>java.vm.vendor</td>
<td nowrap>Homebrew</td>
</tr>
<tr>
<td nowrap>java.vm.version</td>
<td nowrap>11.0.27+0</td>
</tr>
<tr>
<td nowrap>os.arch</td>
<td nowrap>aarch64</td>
</tr>
<tr>
<td nowrap>os.name</td>
<td nowrap>Mac OS X</td>
</tr>
<tr>
<td nowrap>os.version</td>
<td nowrap>15.7.1</td>
</tr>
</table>
</td>
</tr>
</table>
<hr>
<h3>FAILED tests</h3>
<p>Strong asserts were violated. Correct implementations should have no assert failures here.</p>
<table cellspacing=0 cellpadding=3 width="100%">
<tr class="cell2">
<td>&nbsp;&nbsp;&nbsp;<a href="org.itmo.IncorrectParallelBFSStressTest.html">org.itmo.IncorrectParallelBFSStressTest</a></td>
<td>10<sup>4</sup></td><td class="failed">FAILED</td>
<td class="interesting"></td>
<td class="passed"></td>
</tr>
</table>
<br>
<hr>
<h3>ERROR tests</h3>
<p>Tests break for some reason, other than failing the assert. Correct implementations should have none.</p>
<table cellspacing=0 cellpadding=3 width="100%">
</table>
None!
<br>
<br>
<hr>
<h3>INTERESTING tests</h3>
<p>Some interesting behaviors observed. This is for the plain curiosity.</p>
<table cellspacing=0 cellpadding=3 width="100%">
</table>
None!
<br>
<br>
<hr>
<h3>All tests</h3>
<p></p>
<table cellspacing=0 cellpadding=3 width="100%">
<tr class="cell1">
<td>&nbsp;&nbsp;&nbsp;<a href="org.itmo.IncorrectParallelBFSStressTest.html">org.itmo.IncorrectParallelBFSStressTest</a></td>
<td>10<sup>4</sup></td><td class="failed">FAILED</td>
<td class="interesting"></td>
<td class="passed"></td>
</tr>
<tr class="cell2">
<td>&nbsp;&nbsp;&nbsp;<a href="org.itmo.ParallelBFSStressTest.html">org.itmo.ParallelBFSStressTest</a></td>
<td>10<sup>4</sup></td><td class="passed">PASSED</td>
<td class="interesting"></td>
<td class="passed"></td>
</tr>
</table>
<br>
</body>
</html>
Loading