Skip to content

Commit

Permalink
* replace intersection login into other object
Browse files Browse the repository at this point in the history
* replace Java7 sources in `examples` subproject
* update `bench_run.sh` script for independent generation and running
  • Loading branch information
bachish committed May 29, 2024
1 parent a25b64a commit b071547
Show file tree
Hide file tree
Showing 59 changed files with 493 additions and 37,770 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Generate files
run: |
./benchmarks/generate.sh
./run_bench
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ out/
hs_err_pid*

.gradle
build/
out/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
Expand Down Expand Up @@ -90,5 +88,6 @@ bin/
/gen/
/benchmarks/src/main/java/org/antlr/*
!/benchmarks/src/main/java/org/antlr/Java8.g4
/benchmarks/src/main/kotlin/org/ucfs/Java8Parser.kt
/benchmarks/src/main/java/org/ucfs/JavaLexer.java
/benchmarks/src/main/kotlin/org/ucfs/*
/benchmarks/src/main/java/org/ucfs/*
/benchmarks/logs/
40 changes: 4 additions & 36 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,11 @@
(3) Jflex
```

## Build project

#### Step 1. Clone repository

`git clone https://github.com/cyb3r-b4stard/UCFSBenchmarks.git`

or

`git@github.com:cyb3r-b4stard/UCFSBenchmarks.git`

or

`gh repo clone cyb3r-b4stard/UCFSBenchmarks`

#### Step 2. Go to the project folder

`cd UCFSBenchmarks`

#### Step 3. Install dependencies

`./ucfs_install.sh`

#### Step 4. Build project

`./ucfs_build.sh`

## Execute Benchmarks

#### Step 1. Run benchmarks

`./ucfs_bench.sh`
## Run benchmarks
Run script `run_bench.sh` stored in root folder

## Logging

Logs are stored in build/libs/Benchmarks.log

## Results
Logs are stored in `logs`

After executing all benchmarks, results file will be located in the `/build` folder
under name `results.csv`. That file shall be transfered back to Ivan Lomikovskiy
Results are stored in `build/reports/benchmarks`
64 changes: 27 additions & 37 deletions benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
// 1. for ucfs
implementation(project(":solver"))
implementation(project(":generator"))

implementation(project(":examples"))
// 2. for java_cup (?)
implementation("java_cup:java_cup:0.9e")
// 3. for antlr
Expand All @@ -36,49 +36,39 @@ fun getArgs(strFolder: String): Array<String> {
val files = resourcesDir.listFiles()!!
return files.map { it.toString() }.sorted().toTypedArray()
}

benchmark {
configurations {
named("main") {}
targets {
register("main")
named("main") {
val dataset = "dataset"
if (!hasProperty(dataset)) {
println("BENCHMARKS FAILED! Set dataset folder by property '$dataset'")
}
else{
param("fileName", *getArgs(property(dataset).toString()))
}
this.reportFormat = "csv"
iterations = 15
iterationTime = 1000
iterationTimeUnit = "ms"
warmups = 5
outputTimeUnit = "ms"
mode = "avgt"
val tools = "toolName"
if (hasProperty(tools)) {
println("Run benchmarks for: .*${property(tools)}.*")
include(".*${property(tools)}.*")
}

}
}
targets {
register("main")
}
}
//benchmark {
// configurations {
// named("main") {
// val dataset = "dataset"
// if (!hasProperty(dataset)) {
// println("Error! Set dataset folder by property '$dataset'")
// throw Exception("Error! Set dataset folder by property '$dataset'")
// }
// param("fileName", *getArgs(property(dataset).toString()))
// this.reportFormat = "csv"
// iterations = 15
// iterationTime = 1000
// iterationTimeUnit = "ms"
// warmups = 5
// outputTimeUnit = "ms"
// mode = "avgt"
// val tools = "toolName"
// if (hasProperty(tools)) {
// println("Run benchmarks for: .*${property(tools)}.*")
// include(".*${property(tools)}.*")
// }
//
// }
// }
// targets {
// register("main")
// }
//}


allOpen {
annotation("org.openjdk.jmh.annotations.State")
}

kotlin { jvmToolchain(11) }



kotlin { jvmToolchain(11) }
18 changes: 0 additions & 18 deletions benchmarks/generate.sh

This file was deleted.

Loading

0 comments on commit b071547

Please sign in to comment.