-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
337 lines (295 loc) · 23.5 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
// Copyright (c) 2012-2021 Dynatrace LLC. All rights reserved.
//
// This software and associated documentation files (the "Software")
// are being made available by Dynatrace LLC for purposes of
// illustrating the implementation of certain algorithms which have
// been published by Dynatrace LLC. Permission is hereby granted,
// free of charge, to any person obtaining a copy of the Software,
// to view and use the Software for internal, non-productive,
// non-commercial purposes only – the Software may not be used to
// process live data or distributed, sublicensed, modified and/or
// sold either alone or as part of or in combination with any other
// software.
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
ext {
paperDir = 'paper'
pythonDir = 'python'
cppDir = 'c++'
wyhashDir = "wyhash"
dataDir = 'data'
wyhashZipFile = "wyhash_v4.zip"
wyhashCppDir = "${cppDir}/${wyhashDir}"
wyhashSourceDir = "${wyhashCppDir}/wyhash-wyhash_v4"
wyhashHeaderFile = "wyhash.h"
}
//#########################
// tests
//#########################
task buildBitstreamTestExecutable(type: Exec) {
inputs.files "${cppDir}/bitstream_test.cpp", "${cppDir}/bitstream_random.hpp"
outputs.files "${cppDir}/bitstream_test.out"
standardOutput = new ByteArrayOutputStream()
commandLine 'g++','-O3','-std=c++17','-Wall',"${cppDir}/bitstream_test.cpp",'-o',"${cppDir}/bitstream_test.out"
}
task executeBitstreamTest (type: Exec) {
inputs.files "${cppDir}/bitstream_test.out"
commandLine "${cppDir}/bitstream_test.out","${dataDir}"
dependsOn buildBitstreamTestExecutable
}
task buildRandomTestExecutable(type: Exec) {
inputs.files "${cppDir}/random_test.cpp", "${cppDir}/bitstream_random.hpp","${cppDir}/exponential_distribution.hpp","${wyhashCppDir}/${wyhashHeaderFile}"
outputs.files "${cppDir}/random_test.out"
standardOutput = new ByteArrayOutputStream()
commandLine 'g++','-O3','-std=c++17','-Wall','-DNDEBUG',"${cppDir}/random_test.cpp",'-o',"${cppDir}/random_test.out"
//commandLine 'g++','-O3','-std=c++17','-Wall',"${cppDir}/random_test.cpp",'-o',"${cppDir}/random_test.out"
}
def randomTestFiles = [ \
"${dataDir}/boolean.txt", \
"${dataDir}/uniformLemire3.txt", \
"${dataDir}/uniformLemire11.txt", \
"${dataDir}/uniformLemire29.txt", \
"${dataDir}/uniformLemire256.txt", \
"${dataDir}/uniformLumbroso3.txt", \
"${dataDir}/uniformLumbroso11.txt", \
"${dataDir}/uniformLumbroso29.txt", \
"${dataDir}/uniformLumbroso256.txt", \
"${dataDir}/intPow3.txt", \
"${dataDir}/intPow8.txt", \
"${dataDir}/expZiggurat.txt", \
"${dataDir}/expStandard.txt", \
"${dataDir}/uniformDouble.txt", \
"${dataDir}/uniformDoubleHalf.txt", \
"${dataDir}/bernoulliReal0_2.txt", \
"${dataDir}/bernoulliRatio1_3.txt", \
"${dataDir}/truncatedExp0.txt", \
"${dataDir}/truncatedExp0_1.txt", \
"${dataDir}/truncatedExp0_5.txt", \
"${dataDir}/truncatedExp1.txt", \
"${dataDir}/truncatedExp2.txt" ]
def executeRandomTestOutput = "${dataDir}/random_test_calculation_times.txt"
task executeRandomTest (type: Exec) {
inputs.files "${cppDir}/random_test.out"
outputs.files randomTestFiles
doFirst {
standardOutput = new FileOutputStream(executeRandomTestOutput)
}
commandLine "${cppDir}/random_test.out","${dataDir}"
dependsOn buildRandomTestExecutable
}
task performRandomTest (type: Exec) {
inputs.files randomTestFiles, "${pythonDir}/random_test.py"
outputs.files
standardOutput = new ByteArrayOutputStream()
commandLine 'python3', "${pythonDir}/random_test.py"
dependsOn executeRandomTest
}
task performTests {
group 'Main'
dependsOn performRandomTest, executeBitstreamTest
}
//#########################
def header_files = [ "${cppDir}/sketch.hpp","${cppDir}/util.hpp","${cppDir}/bitstream_random.hpp","${cppDir}/exponential_distribution.hpp","${wyhashCppDir}/${wyhashHeaderFile}"]
task buildCardinalityTestExecutable(type: Exec) {
inputs.files "${cppDir}/cardinality_test.cpp", header_files
outputs.files "${cppDir}/cardinality_test.out"
standardOutput = new ByteArrayOutputStream()
commandLine 'g++','-O3','-std=c++17','-fopenmp','-Wall',"${cppDir}/cardinality_test.cpp",'-o',"${cppDir}/cardinality_test.out"
//commandLine 'g++','-O0','-std=c++17','-fopenmp','-Wall',"${cppDir}/sketch_generation.cpp",'-o',"${cppDir}/sketch_generation.out"
}
task buildBulkUpdateTestExecutable(type: Exec) {
inputs.files "${cppDir}/bulk_update_test.cpp", header_files
outputs.files "${cppDir}/bulk_update_test.out"
standardOutput = new ByteArrayOutputStream()
commandLine 'g++','-O3','-std=c++17','-fopenmp','-Wall',"${cppDir}/bulk_update_test.cpp",'-o',"${cppDir}/bulk_update_test.out"
}
task buildPerformanceTestExecutable(type: Exec) {
inputs.files "${cppDir}/performance_test.cpp", header_files
outputs.files "${cppDir}/performance_test.out"
standardOutput = new ByteArrayOutputStream()
commandLine 'g++','-O3','-std=c++17','-Wall','-DNDEBUG',"${cppDir}/performance_test.cpp",'-o',"${cppDir}/performance_test.out"
// commandLine 'g++','-O3','-std=c++17','-Wall',"${cppDir}/performance_test.cpp",'-o',"${cppDir}/performance_test.out"
}
task buildJointEstimationTestExecutable(type: Exec) {
inputs.files "${cppDir}/joint_estimation_test.cpp", header_files
outputs.files "${cppDir}/joint_estimation_test.out"
standardOutput = new ByteArrayOutputStream()
commandLine 'g++','-O3','-std=c++17','-fopenmp','-Wall',"${cppDir}/joint_estimation_test.cpp", '-o',"${cppDir}/joint_estimation_test.out"
// commandLine 'g++','-O3','-std=c++17','-Wall',"${cppDir}/joint_estimation_test.cpp",'-o',"${cppDir}/joint_estimation_test.out"
}
def cardinalityTestResults = [ \
"${dataDir}/cardinality_test(name=GeneralizedHyperLogLog;numRegisters=256;q=62;base=2.00000000000000000e+00;a=3.90625000000000000e-03;registerStateType=registers with lower bound;).csv", \
"${dataDir}/cardinality_test(name=GeneralizedHyperLogLog;numRegisters=256;q=65534;base=1.00099999999999989e+00;a=3.90625000000000000e-03;registerStateType=registers with lower bound;).csv", \
"${dataDir}/cardinality_test(name=GeneralizedHyperLogLog;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.44140625000000000e-04;registerStateType=registers with lower bound;).csv", \
"${dataDir}/cardinality_test(name=GeneralizedHyperLogLog;numRegisters=4096;q=65534;base=1.00099999999999989e+00;a=2.44140625000000000e-04;registerStateType=registers with lower bound;).csv", \
"${dataDir}/cardinality_test(name=SetSketch1;numRegisters=256;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/cardinality_test(name=SetSketch1;numRegisters=256;q=65534;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/cardinality_test(name=SetSketch1;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/cardinality_test(name=SetSketch1;numRegisters=4096;q=65534;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/cardinality_test(name=SetSketch2;numRegisters=256;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/cardinality_test(name=SetSketch2;numRegisters=256;q=65534;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/cardinality_test(name=SetSketch2;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/cardinality_test(name=SetSketch2;numRegisters=4096;q=65534;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv"]
def performanceTestResults = [ \
"${dataDir}/performance_test(dummy;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=GeneralizedHyperLogLog;numRegisters=256;q=62;base=1.00099999999999989e+00;a=3.90625000000000000e-03;registerStateType=registers with lower bound;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=GeneralizedHyperLogLog;numRegisters=256;q=62;base=1.00099999999999989e+00;a=3.90625000000000000e-03;registerStateType=registers;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=GeneralizedHyperLogLog;numRegisters=256;q=62;base=2.00000000000000000e+00;a=3.90625000000000000e-03;registerStateType=registers with lower bound;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=GeneralizedHyperLogLog;numRegisters=256;q=62;base=2.00000000000000000e+00;a=3.90625000000000000e-03;registerStateType=registers;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=GeneralizedHyperLogLog;numRegisters=4096;q=62;base=1.00099999999999989e+00;a=2.44140625000000000e-04;registerStateType=registers with lower bound;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=GeneralizedHyperLogLog;numRegisters=4096;q=62;base=1.00099999999999989e+00;a=2.44140625000000000e-04;registerStateType=registers;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=GeneralizedHyperLogLog;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.44140625000000000e-04;registerStateType=registers with lower bound;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=GeneralizedHyperLogLog;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.44140625000000000e-04;registerStateType=registers;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=HyperLogLog;numRegisters=256;q=56;base=2.00000000000000000e+00;a=3.90625000000000000e-03;registerStateType=registers with lower bound;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=HyperLogLog;numRegisters=256;q=56;base=2.00000000000000000e+00;a=3.90625000000000000e-03;registerStateType=registers;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=HyperLogLog;numRegisters=4096;q=52;base=2.00000000000000000e+00;a=2.44140625000000000e-04;registerStateType=registers with lower bound;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=HyperLogLog;numRegisters=4096;q=52;base=2.00000000000000000e+00;a=2.44140625000000000e-04;registerStateType=registers;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=MinHash;base=1.00000000000000000e+00;numRegisters=256;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=MinHash;base=1.00000000000000000e+00;numRegisters=4096;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=SetSketch1;numRegisters=256;q=62;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=bulk;).csv", \
"${dataDir}/performance_test(name=SetSketch1;numRegisters=256;q=62;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=SetSketch1;numRegisters=256;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=bulk;).csv", \
"${dataDir}/performance_test(name=SetSketch1;numRegisters=256;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=SetSketch1;numRegisters=4096;q=62;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=bulk;).csv", \
"${dataDir}/performance_test(name=SetSketch1;numRegisters=4096;q=62;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=SetSketch1;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=bulk;).csv", \
"${dataDir}/performance_test(name=SetSketch1;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=SetSketch2;numRegisters=256;q=62;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=bulk;).csv", \
"${dataDir}/performance_test(name=SetSketch2;numRegisters=256;q=62;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=SetSketch2;numRegisters=256;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=bulk;).csv", \
"${dataDir}/performance_test(name=SetSketch2;numRegisters=256;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=SetSketch2;numRegisters=4096;q=62;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=bulk;).csv", \
"${dataDir}/performance_test(name=SetSketch2;numRegisters=4096;q=62;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=stream;).csv", \
"${dataDir}/performance_test(name=SetSketch2;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=bulk;).csv", \
"${dataDir}/performance_test(name=SetSketch2;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;aggregationMode=stream;).csv"]
def jointTestResults = [ \
"${dataDir}/joint_test(name=GeneralizedHyperLogLog;numRegisters=4096;q=254;base=1.19999999999999996e+00;a=2.44140625000000000e-04;registerStateType=registers with lower bound;).csv", \
"${dataDir}/joint_test(name=GeneralizedHyperLogLog;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.44140625000000000e-04;registerStateType=registers with lower bound;).csv", \
"${dataDir}/joint_test(name=GeneralizedHyperLogLog;numRegisters=4096;q=65534;base=1.00099999999999989e+00;a=2.44140625000000000e-04;registerStateType=registers with lower bound;).csv", \
"${dataDir}/joint_test(name=HyperMinHash;numRegisters=4096;base=1.00067713069306641e+00;bucketBits=12;bucketSize=6;subBucketSize=10;registerStateType=registers;).csv", \
"${dataDir}/joint_test(name=MinHash;base=1.00000000000000000e+00;numRegisters=4096;).csv", \
"${dataDir}/joint_test(name=SetSketch1;numRegisters=4096;q=254;base=1.19999999999999996e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/joint_test(name=SetSketch1;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/joint_test(name=SetSketch1;numRegisters=4096;q=65534;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/joint_test(name=SetSketch2;numRegisters=4096;q=254;base=1.19999999999999996e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/joint_test(name=SetSketch2;numRegisters=4096;q=62;base=2.00000000000000000e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv", \
"${dataDir}/joint_test(name=SetSketch2;numRegisters=4096;q=65534;base=1.00099999999999989e+00;a=2.00000000000000000e+01;registerStateType=registers with lower bound;bulkAddFirstAttemptSuccessProbability=9.49999999999999956e-01;).csv"]
def bulkUpdateTestResults = [ \
"${dataDir}/data/bulk_update_test(name=SetSketch1;numRegisters=256;q=62;base=2.00000000000000000e+00;a=3.00000000000000000e+01;).csv", \
"${dataDir}/data/bulk_update_test(name=SetSketch1;numRegisters=256;q=65534;base=1.00099999999999989e+00;a=3.00000000000000000e+01;).csv", \
"${dataDir}/data/bulk_update_test(name=SetSketch2;numRegisters=256;q=62;base=2.00000000000000000e+00;a=3.00000000000000000e+01;).csv", \
"${dataDir}/data/bulk_update_test(name=SetSketch2;numRegisters=256;q=65534;base=1.00099999999999989e+00;a=3.00000000000000000e+01;).csv"]
task runCardinalityTest(type: Exec) {
group 'Main'
inputs.files "${cppDir}/cardinality_test.out"
outputs.files cardinalityTestResults
standardOutput = new ByteArrayOutputStream()
commandLine "${cppDir}/cardinality_test.out"
dependsOn buildCardinalityTestExecutable
}
task runBulkUpdateTest(type: Exec) {
group 'Main'
inputs.files "${cppDir}/bulk_update_test.out"
outputs.files bulkUpdateTestResults
standardOutput = new ByteArrayOutputStream()
commandLine "${cppDir}/bulk_update_test.out"
dependsOn buildBulkUpdateTestExecutable
}
task runPerformanceTest(type: Exec) {
group 'Main'
inputs.files "${cppDir}/performance_test.out"
outputs.files performanceTestResults
standardOutput = new ByteArrayOutputStream()
commandLine "${cppDir}/performance_test.out"
dependsOn buildPerformanceTestExecutable
}
task runJointTest(type: Exec) {
group 'Main'
inputs.files "${cppDir}/joint_estimation_test.out"
outputs.files jointTestResults
standardOutput = new ByteArrayOutputStream()
commandLine "${cppDir}/joint_estimation_test.out"
dependsOn buildJointEstimationTestExecutable
}
def figFiles = []
task makeHelperFuncErrorFigure (type: Exec) {
inputs.files "${pythonDir}/helper_func_error.py", "${pythonDir}/color_defs.py"
outputs.files "${paperDir}/helper_func_error.pdf"
commandLine 'python3', "${pythonDir}/helper_func_error.py"
}
figFiles += "${paperDir}/helper_func_error.pdf"
task makeExpectedRelativeErrorFigure (type: Exec) {
inputs.files "${pythonDir}/expected_relative_error.py", "${pythonDir}/color_defs.py"
outputs.files "${paperDir}/expected_relative_error.pdf"
commandLine 'python3', "${pythonDir}/expected_relative_error.py"
}
figFiles += "${paperDir}/expected_relative_error.pdf"
task makeProbabilityDensitiesFigure (type: Exec) {
inputs.files "${pythonDir}/probability_densities.py", "${pythonDir}/color_defs.py"
outputs.files "${paperDir}/probability_densities.pdf"
commandLine 'python3', "${pythonDir}/probability_densities.py"
}
figFiles += "${paperDir}/probability_densities.pdf"
task makeCollisionProbabilityFigure (type: Exec) {
inputs.files "${pythonDir}/collision_probability.py", "${pythonDir}/color_defs.py"
outputs.files "${paperDir}/collision_probability.pdf","${paperDir}/mse_upperbound_estimation.pdf"
commandLine 'python3', "${pythonDir}/collision_probability.py"
}
figFiles += "${paperDir}/collision_probability.pdf"
figFiles += "${paperDir}/mse_upperbound_estimation.pdf"
task makeTheoreticalVarianceFigure (type: Exec) {
inputs.files "${pythonDir}/theoretical_variance.py", "${pythonDir}/color_defs.py"
outputs.files "${paperDir}/theoretical_variance.pdf"
commandLine 'python3', "${pythonDir}/theoretical_variance.py"
}
figFiles += "${paperDir}/theoretical_variance.pdf"
def cardinalityFigFiles = [\
"${paperDir}/cardinality_ml.pdf", \
"${paperDir}/cardinality_simple.pdf"]
task makeCardinalityFigure (type: Exec) {
inputs.files cardinalityTestResults, "${pythonDir}/cardinality_error_charts.py", "${pythonDir}/color_defs.py"
outputs.files cardinalityFigFiles
commandLine 'python3', "${pythonDir}/cardinality_error_charts.py"
}
figFiles += cardinalityFigFiles
task makePerformanceFigure (type: Exec) {
inputs.files performanceTestResults, "${pythonDir}/performance_charts.py", "${pythonDir}/color_defs.py"
outputs.files "${paperDir}/performance.pdf"
commandLine 'python3', "${pythonDir}/performance_charts.py"
}
figFiles += "${paperDir}/performance.pdf"
def jointFigFiles = [\
"${paperDir}/joint_GeneralizedHyperLogLog_1000.pdf", \
"${paperDir}/joint_GeneralizedHyperLogLog_1000000.pdf", \
"${paperDir}/joint_HyperMinHash_1000000_1_0006771306930664.pdf", \
"${paperDir}/joint_HyperMinHash_1000_1_0006771306930664.pdf", \
"${paperDir}/joint_MinHash_1000000_1_0.pdf", \
"${paperDir}/joint_MinHash_1000_1_0.pdf", \
"${paperDir}/joint_SetSketch1_1000.pdf", \
"${paperDir}/joint_SetSketch1_1000000.pdf", \
"${paperDir}/joint_SetSketch2_1000.pdf", \
"${paperDir}/joint_SetSketch2_1000000.pdf"]
task makeJointFigures(type: Exec) {
inputs.files jointTestResults, "${pythonDir}/joint_charts.py", "${pythonDir}/color_defs.py"
outputs.files jointFigFiles
commandLine 'python3', "${pythonDir}/joint_charts.py"
}
figFiles += jointFigFiles
task pdfFigures {
group 'Main'
dependsOn makeJointFigures, makeCardinalityFigure, makeHelperFuncErrorFigure, makeExpectedRelativeErrorFigure, makeProbabilityDensitiesFigure, makeCollisionProbabilityFigure, makePerformanceFigure, makeTheoreticalVarianceFigure
}
task buildAll {
group 'Main'
dependsOn buildRandomTestExecutable, buildBitstreamTestExecutable, buildCardinalityTestExecutable, buildPerformanceTestExecutable, buildJointEstimationTestExecutable, buildBulkUpdateTestExecutable
}