@@ -23,7 +23,7 @@ object StreamingBitVectorTest extends App {
23
23
result
24
24
}
25
25
26
- def printMemoryStats : Unit = {
26
+ def printMemoryStats () : Unit = {
27
27
val R = java.lang.Runtime .getRuntime
28
28
println(s " Max memory: ${R .maxMemory.toDouble / 1e6 } MB " )
29
29
println(s " Total memory: ${R .totalMemory.toDouble / 1e6 } MB " )
@@ -70,33 +70,33 @@ object StreamingBitVectorTest extends App {
70
70
// reachable!
71
71
val N = countBits(BitVector .fromInputStream(in), 0 , touchBytes)
72
72
println(s " finished processing ${N .toDouble / 1e6 } MB " )
73
- printMemoryStats
73
+ printMemoryStats()
74
74
}
75
75
println
76
76
time(" BitVector.fromChannel(chunkSize=64kB)" , size) {
77
77
val N =
78
78
countBits(BitVector .fromChannel(nioIn1, chunkSizeInBytes = 1024 * 64 ), 0 , touchBytes)
79
79
println(s " finished processing ${N .toDouble / 1e6 } MB " )
80
- printMemoryStats
80
+ printMemoryStats()
81
81
}
82
82
println
83
83
time(" BitVector.fromChannel(direct=true, chunkSizeInBytes=64k)" , size) {
84
84
val N = countBits(BitVector .fromChannel(nioIn3, 64 * 1024 , direct = true ), 0 , touchBytes)
85
85
println(s " finished processing ${N .toDouble / 1e6 } MB " )
86
- printMemoryStats
86
+ printMemoryStats()
87
87
}
88
88
println
89
89
time(" BitVector.fromChannel(direct=true, chunkSize=16MB)" , size) {
90
90
val N =
91
91
countBits(BitVector .fromChannel(nioIn2, 16 * 1024 * 1000 , direct = true ), 0 , touchBytes)
92
92
println(s " finished processing ${N .toDouble / 1e6 } MB " )
93
- printMemoryStats
93
+ printMemoryStats()
94
94
}
95
95
println
96
96
time(" BitVector.fromMmap" , size) {
97
97
val N = countBits(BitVector .fromMmap(nioIn4), 0 , touchBytes)
98
98
println(s " finished processing ${N .toDouble / 1e6 } MB " )
99
- printMemoryStats
99
+ printMemoryStats()
100
100
}
101
101
} finally {
102
102
print(" closing files... " )
0 commit comments