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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/AwTYhPar)
# Лабораторная работа № 1: определение достижимости параллелизма и реализация параллельных алгоритмов.

Шаги выполнения:
Expand Down
21 changes: 20 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
kotlin("jvm") version "1.9.20"
java
application
}

Expand All @@ -12,6 +13,8 @@ repositories {

dependencies {
testImplementation(kotlin("test"))
testImplementation("org.openjdk.jcstress:jcstress-core:0.16")
testAnnotationProcessor("org.openjdk.jcstress:jcstress-core:0.16")
}

tasks.test {
Expand All @@ -24,4 +27,20 @@ kotlin {

application {
mainClass.set("MainKt")
}
}

// JCStress runner task: runs JCStress tests located on the test runtime classpath
// Use: ./gradlew jcstress [-PjcstressArgs="-v -m quick"]
tasks.register<JavaExec>("jcstress") {
group = "verification"
description = "Run JCStress stress tests"
mainClass.set("org.openjdk.jcstress.Main")
classpath = sourceSets.test.get().runtimeClasspath
dependsOn("testClasses")

val argsProp = project.findProperty("jcstressArgs") as String?
if (!argsProp.isNullOrBlank()) {
args = argsProp.split("\\s+".toRegex())
}
}

Binary file added graphs/ParallelOnDifferentThreads.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 graphs/SerialAndParallel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 128 additions & 0 deletions results/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@

<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">
0%
</p>
<table width="100%" cellpadding="3" cellspacing="0">
<tr><td width="100%" class="failedProgress">&nbsp;</td></tr>
<tr><td nowrap><b>Overall pass rate:</b> 0/1&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>17</td>
</tr>
<tr>
<td nowrap>java.vendor</td>
<td nowrap>Amazon.com Inc.</td>
</tr>
<tr>
<td nowrap>java.version</td>
<td nowrap>17.0.11</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>Amazon.com Inc.</td>
</tr>
<tr>
<td nowrap>java.vm.version</td>
<td nowrap>17.0.11+9-LTS</td>
</tr>
<tr>
<td nowrap>os.arch</td>
<td nowrap>amd64</td>
</tr>
<tr>
<td nowrap>os.name</td>
<td nowrap>Linux</td>
</tr>
<tr>
<td nowrap>os.version</td>
<td nowrap>6.8.0-79-generic</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.JSStressGraphTest.html">org.itmo.JSStressGraphTest</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.JSStressGraphTest.html">org.itmo.JSStressGraphTest</a></td>
<td>10<sup>4</sup></td><td class="failed">FAILED</td>
<td class="interesting"></td>
<td class="passed"></td>
</tr>
</table>
<br>
</body>
</html>
Loading