Skip to content

Commit

Permalink
Improved Lushu test measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitor-Git15 committed Nov 10, 2023
1 parent 9c976eb commit d7c6f47
Show file tree
Hide file tree
Showing 52 changed files with 122 additions and 103 deletions.
1 change: 1 addition & 0 deletions Lushu/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fun newJarTask(
): Task {
return task(name, type = Jar::class) {
description = desc
archiveBaseName.set(name.substring(0, name.length - 3))
manifest {
attributes(manifestAttributes)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import java.io.File
import kotlin.system.measureTimeMillis

fun main(args: Array<String>) {
val runtime = Runtime.getRuntime()

if (args.size < 4) {
println(
"Usage: <this-program> <merger-config-file>\n" +
Expand All @@ -26,13 +28,14 @@ fun main(args: Array<String>) {
var file = File(patternsFilePath)
grammar.trainMap(file)
}

var time: Long = 0
time = measureTimeMillis {

grammar.testMap(testFilePath, outputFilePath)
}
val runtime = Runtime.getRuntime()
val memory = (runtime.totalMemory() - runtime.freeMemory())

val totalMemory = runtime.totalMemory()
val usedMemory = totalMemory - runtime.freeMemory()
System.err.println("$time")
System.err.println("$memory")
System.err.println("$usedMemory")
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
53 changes: 34 additions & 19 deletions test/context_tests/compare_to_comby/analysis.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1-0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
3
4501008
4
20745816
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1-1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
2
4500864
4
20749096
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1-2
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
2
4500864
4
20889472
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1-3
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
2
4500864
4
13411864
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1-4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1
4500656
3
14424312
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10-0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
4
4500800
7
21043376
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10-1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
3
4500656
6
9148904
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10-2
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
3
4500488
9
14686304
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10-3
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
3
4501008
9
6191848
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10-4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
2
4500864
9
20924896
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100-0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
20
4504608
54
5935768
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100-1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
21
4504248
39
15548392
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100-2
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
13
4504000
51
8880800
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100-3
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
21
4504392
53
6897920
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100-4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
16
4504080
55
6913968
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000-0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
85
4506488
218
8084176
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000-1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
60
4504760
200
23665712
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000-2
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
53
4504840
231
13275944
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000-3
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
73
4505112
178
22647728
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000-4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
70
4505824
193
22634592
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000-0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
230
4507552
691
40646688
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000-1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
213
4506760
734
27910512
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000-2
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
242
4507272
760
21787712
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000-3
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
230
4507480
857
53226384
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000-4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
236
4507480
671
97106976
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100000-0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1555
4507040
4339
86115376
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100000-1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1424
4507112
4029
87379536
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100000-2
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1492
4507760
3866
27392048
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100000-3
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1640
4507320
3888
40063552
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/100000-4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1473
4506800
3792
53654576
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000000-0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
16941
4507312
35522
131937152
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000000-1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
14805
4507864
38970
76254048
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000000-2
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
15097
4507880
47122
9093184
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000000-3
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
13186
4507424
37979
23731808
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/1000000-4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
14818
4507520
37154
58330672
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000000-0
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
158779
4507416
239249
95039024
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000000-1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
148593
4507416
167604
58400864
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000000-2
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
164726
4507760
165382
144452704
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000000-3
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
166293
4508136
163725
114485328
4 changes: 2 additions & 2 deletions test/context_tests/compare_to_comby/results/Lushu/10000000-4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
155655
4507616
136982
146422352
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit d7c6f47

Please sign in to comment.